This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Am I crazy? Does newlib build nothing?


CCing list in case others have additional comments

On 08/04/2011 03:41 PM, Matt Johnson wrote:
Hi Bryan,

On 08/04/2011 03:36 PM, Bryan Ischo wrote:
Hello!

I have had a very interesting time trying to get a gcc cross-compiler
for mips built. I'm perhaps more frustrated than I have ever been in my
39 years of existence, so if my tone reflects that, I apologize in advance.


I'll spare everyone on the list my long litany of complaints and
problems getting anything at all to work with a gcc cross-compile; I'd
like to focus on a particular problem that has be absolutely baffled.

I have tried, as an experiment, to build newlib on a couple of different
systems because the results I am getting are impossible for me to
comprehend.

Simply put, when I build newlib ... nothing happens. Well, almost nothing.

I can download any old version of newlib you like from this location:

ftp://sources.redhat.com/pub/newlib/index.html

(I've tried 1.19.0, 1.14.0, and 1.9.0).

I unzip/untar the archive, make myself a newlib-build directory, and run
the newlib configure to build a Makefile in my newlib-build directory.

Then I run make and very little happens. Example:

bji$ mkdir foo
bji$ cd foo
bji/foo$ wget --quiet
ftp://sources.redhat.com/pub/newlib/newlib-1.19.0.tar.gz
bji/foo$ tar zxf newlib-1.19.0.tar.gz
bji/foo$ mkdir newlib-build
cd bji/foo$ cd newlib-build
bji/foo/newlib-build$ ../newlib-1.19.0/configure 2>&1>  configure.out
bji/foo/newlib-build$ make

If you look at the Makefile generated by configure, the default "all" target doesn't do much. You want:


make all-target-newlib
make install-target-newlib

and possibly (depending on your target):

make all-target-libgloss
make install-target-libgloss

There are other useful Makefile targets, but these are the ones I use.


make[1]: Entering directory `/home/bji/foo/newlib-build'
mkdir -p -- ./etc
Configuring in ./etc
configure: creating cache ./config.cache
checking for a BSD-compatible install... /bin/install -c
configure: updating cache ./config.cache
configure: creating ./config.status
config.status: creating Makefile
make[2]: Entering directory `/home/bji/foo/newlib-build/etc'
for f in standards.info configure.info; do \
           if test -f ../../newlib-1.19.0/etc/`echo $f | sed -e
's/.info$/.texi/'`; then \
             if make "MAKEINFO=makeinfo --split-size=5000000
--split-size=5000000" $f; then \
               true; \
             else \
               exit 1; \
             fi; \
           fi; \
         done
make[3]: Entering directory `/home/bji/foo/newlib-build/etc'
makeinfo --split-size=5000000 --split-size=5000000 --no-split
-I../../newlib-1.19.0/etc -o standards.info
../../newlib-1.19.0/etc/standards.texi
make[3]: Leaving directory `/home/bji/foo/newlib-build/etc'
make[3]: Entering directory `/home/bji/foo/newlib-build/etc'
rm -f configdev.txt configbuild.txt
cp ../../newlib-1.19.0/etc/configdev.tin configdev.txt
cp ../../newlib-1.19.0/etc/configbuild.tin configbuild.txt
makeinfo --split-size=5000000 --split-size=5000000
-I../../newlib-1.19.0/etc -o configure.info
../../newlib-1.19.0/etc/configure.texi
rm -f configdev.txt configbuild.txt
make[3]: Leaving directory `/home/bji/foo/newlib-build/etc'
make[2]: Leaving directory `/home/bji/foo/newlib-build/etc'
make[1]: Nothing to be done for `all-target'.
make[1]: Leaving directory `/home/bji/foo/newlib-build'
bji/foo/newlib-build$

I have elided the tar operation and also the configure above to keep the
output readable; here is the output of the configure script just in case
it indicates a problem:

bji/foo/newlib-build$ cat configure.out
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /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 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 version 0.10 (or later revision) of PPL... yes
checking for installed CLooG PPL Legacy... no
checking for default BUILD_CONFIG...
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... makeinfo
checking for expect... expect
checking for runtest... 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 ranlib... ranlib
checking for strip... strip
checking for windres... no
checking for windmc... no
checking for objcopy... objcopy
checking for objdump... objdump
checking for cc... cc
checking for c++... c++
checking for gcc... gcc
checking for gcj... no
checking for gfortran... no
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 objdump... objdump
checking for ranlib... ranlib
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 objdump... host tool
checking where to find the target ranlib... 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
checking whether -fkeep-inline-functions is supported... yes
configure: creating ./config.status
config.status: creating Makefile



I have done this on three separate systems:


1. A 64 bit x86 Linux system with gcc 4.6.0
2. A 32 bit x86 Linux system with gcc 4.6.0
3. A 32 bit x86 Linux system with gcc 4.3.2

I am extremely baffled about why newlib build just doesn't do anything
interesting; I mean it builds its "etc" but doesn't actually build any
libc library of any kind.

For what it's worth, I've tried building gcc with the newlib sources
copied into it and with --with-newlib but that doesn't seem to build
newlib either.

Any help at all would be appreciated.

Thanks,
Bryan

-Matt


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]