From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50154 invoked by alias); 23 Jun 2017 20:52:26 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 49852 invoked by uid 89); 23 Jun 2017 20:52:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=johnston, Johnston, H*f:sk:CAOox84, pang X-HELO: mail-pg0-f43.google.com Received: from mail-pg0-f43.google.com (HELO mail-pg0-f43.google.com) (74.125.83.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 23 Jun 2017 20:52:19 +0000 Received: by mail-pg0-f43.google.com with SMTP id u62so25567310pgb.3 for ; Fri, 23 Jun 2017 13:52:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xgshpqc4eGm1JZYl4cQrAkjEOFHtyC8LOfNGAl98eSk=; b=JuzatQqzeL9fLLSmGI1pi5UDsWkg3kz7b43IkNtYzMRdvw0ZgfAE6HgPwA3fUevg8i oS2zdgFY+UsMeufvO12wYqm1byEB/zvN0RcQOaUJ8kGzZxyFTfbh54ihirN8Lh3eLepi wOQDPLnVXEKRa1U+g+B/ajKfraWFQsFkAWfT4PGuZwGBt4qOF3FEQ55uzYfAfE0yX3Sl sCPLqB98XxZe67PPfMlapKCZDcxEHn/AwpmFph87jqYm06JZUggTt6Z8adJ+qL/ptIHk qc+Me6jbiIAaqkQ5bjQWCuGoUgIrkrPtw1Hso3ofC/cGWSbYCdXTApO86xlG+kgWB6NN BdvA== X-Gm-Message-State: AKS2vOzSRu8NeWbwzmc196TaTyQMLxRamCp0tb2rQuIGmyigp3ILlUZo SfGSWxW1UqTZOXXDw+n+iIyqcltVB4X3 X-Received: by 10.98.153.24 with SMTP id d24mr10154933pfe.223.1498251138248; Fri, 23 Jun 2017 13:52:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.181.45 with HTTP; Fri, 23 Jun 2017 13:52:17 -0700 (PDT) In-Reply-To: References: From: Jeff Johnston Date: Fri, 23 Jun 2017 20:52:00 -0000 Message-ID: Subject: Re: Newlib on Sparc64? To: Yihan Pang Cc: Rob Lyerly , Newlib Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2017/txt/msg00462.txt.bz2 The difference is what level of syscalls and C library functions will be available. The basic newlib uses a minimal set of syscalls and provides C89 functionality++ (there are C99, Posix, and SYSV functions as well). Linux support provides/requires more library functions/syscalls. There is a Linux port in newlib but it only supports x86 and at the moment it is probably out of date as it requires some system glibc headers to be present which likely have changed. Whether your sparc64-elf executable will run or not depends on what functions and syscalls you require. Looking in libgloss, there is a sparc directory that appears to provide a lot of syscall stubs (i.e. syscalls that simply return failure). If you need some of these to work, you may have to write some assembler to access the sparc Linux syscalls, but the good news is that there aren't many syscalls in the basic set and you might not need all of them. If all your function and syscall needs are met, the sparc64-elf executable should run fine on sparc Linux. -- Jeff J. On Fri, Jun 23, 2017 at 3:37 PM, Yihan Pang wrote: > Hi Jeff, > I have some follow up questions. What is the difference between the > Linux version and ELF version of newlib? We want our application to > run on sparc Linux, if we built one using sparc64-elf tool-chain, will > the application be able to run on sparc Linux? > > Best, > Yihan Pang > > On Wed, Jun 21, 2017 at 4:20 PM, Jeff Johnston wrote: >> Newlib does not support building for sparc64 linux. >> >> You could try sparc64-elf assuming you have, or can build, the >> sparc64-elf toolchain. You would then need to specify >> --target=sparc64-elf on your newlib configure call. >> >> -- Jeff J. >> >> On Wed, Jun 21, 2017 at 4:06 PM, Yihan Pang wrote: >>> Hi All, >>> >>> I am trying to use newlib on a SPARC S7 server that is running Oracle >>> Linux 6 OS. However, when I finished running the configuring script, >>> and execute the make command, it print out nothing to be done for all, >>> all-target. I checked the newlib folders and there is a sparc folder >>> under newlib/libc/machine/ so I assumed I don't need to port it >>> manually. >>> >>> My question is does newlib currently support sparc64 or not, if so do >>> I have to manually port it? >>> >>> Below is my configure script output and make command output >>> >>> [yihan@localhost nlib_build]$ ../newlib-2.5.0/configure >>> checking build system type... sparc64-unknown-linux-gnu >>> checking host system type... sparc64-unknown-linux-gnu >>> checking target system type... sparc64-unknown-linux-gnu >>> checking for a BSD-compatible install... /usr/bin/install -c >>> checking whether ln works... yes >>> checking whether ln -s works... yes >>> checking for a sed that does not truncate output... /bin/sed >>> checking for gawk... gawk >>> checking for gcc... gcc >>> checking for C compiler default output file name... a.out >>> checking whether the C compiler works... yes >>> checking whether we are cross compiling... no >>> checking for suffix of executables... >>> checking for suffix of object files... o >>> checking whether we are using the GNU C compiler... yes >>> checking whether gcc accepts -g... yes >>> checking for gcc option to accept ISO C89... none needed >>> checking for g++... g++ >>> checking whether we are using the GNU C++ compiler... yes >>> checking whether g++ accepts -g... yes >>> checking whether g++ accepts -static-libstdc++ -static-libgcc... yes >>> checking for gnatbind... no >>> checking for gnatmake... no >>> checking whether compiler driver understands Ada... no >>> checking how to compare bootstrapped objects... cmp >>> --ignore-initial=16 $$f1 $$f2 >>> checking for objdir... .libs >>> checking for isl 0.16, 0.15, or deprecated 0.14... yes >>> checking for isl 0.16 or 0.15... yes >>> checking for default BUILD_CONFIG... >>> checking for --enable-vtable-verify... no >>> checking for bison... bison -y >>> checking for bison... bison >>> checking for gm4... no >>> checking for gnum4... no >>> checking for m4... m4 >>> checking for flex... flex >>> checking for flex... flex >>> checking for makeinfo... no >>> /home/yihan/newlib-2.5.0/missing: line 81: makeinfo: command not found >>> checking for expect... expect >>> checking for runtest... runtest >>> checking for ar... ar >>> checking for as... as >>> checking for dlltool... no >>> checking for ld... (cached) >>> /opt/rh/devtoolset-3/root/usr/libexec/gcc/sparc64-redhat-linux/4.9.2/ld >>> checking for lipo... no >>> checking for nm... nm >>> checking for ranlib... ranlib >>> checking for strip... strip >>> checking for windres... no >>> checking for windmc... no >>> checking for objcopy... objcopy >>> checking for objdump... objdump >>> checking for readelf... readelf >>> checking for cc... cc >>> checking for c++... c++ >>> checking for gcc... gcc >>> checking for gcj... no >>> checking for gfortran... gfortran >>> checking for gccgo... no >>> checking for ar... ar >>> checking for as... as >>> checking for dlltool... no >>> checking for ld... ld >>> checking for lipo... no >>> checking for nm... nm >>> checking for objcopy... objcopy >>> checking for objdump... objdump >>> checking for ranlib... ranlib >>> checking for readelf... readelf >>> checking for strip... strip >>> checking for windres... no >>> checking for windmc... no >>> checking where to find the target ar... host tool >>> checking where to find the target as... host tool >>> checking where to find the target cc... host tool >>> checking where to find the target c++... host tool >>> checking where to find the target c++ for libstdc++... host tool >>> checking where to find the target dlltool... host tool >>> checking where to find the target gcc... host tool >>> checking where to find the target gcj... host tool >>> checking where to find the target gfortran... host tool >>> checking where to find the target gccgo... host tool >>> checking where to find the target ld... host tool >>> checking where to find the target lipo... host tool >>> checking where to find the target nm... host tool >>> checking where to find the target objcopy... host tool >>> checking where to find the target objdump... host tool >>> checking where to find the target ranlib... host tool >>> checking where to find the target readelf... host tool >>> checking where to find the target strip... host tool >>> checking where to find the target windres... host tool >>> checking where to find the target windmc... host tool >>> checking whether to enable maintainer-specific portions of Makefiles... no >>> configure: creating ./config.status >>> config.status: creating Makefile >>> [yihan@localhost nlib_build]$ make >>> make[1]: Entering directory `/home/yihan/nlib_build' >>> mkdir -p -- ./etc >>> Configuring in ./etc >>> configure: creating cache ./config.cache >>> checking for a BSD-compatible install... /usr/bin/install -c >>> configure: updating cache ./config.cache >>> configure: creating ./config.status >>> config.status: creating Makefile >>> make[2]: Entering directory `/home/yihan/nlib_build/etc' >>> make[2]: Nothing to be done for `all'. >>> make[2]: Leaving directory `/home/yihan/nlib_build/etc' >>> make[1]: Nothing to be done for `all-target'. >>> make[1]: Leaving directory `/home/yihan/nlib_build' >>> >>> >>> >>> Thanks, >>> Yihan Pang