This is the mail archive of the newlib@sources.redhat.com 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]

Re: building newlib with i386-coff-gcc


Am Mittwoch, 15. August 2001 23:31 schrieben Sie:
> flo wrote:
> > hi,
> >
> > i do not know how to get with my cross-compiled i386-coff
> > the newlib working.
> >
> > first i built binutils:
> > # ../binutils/configure --target=$target --prefix=$prefix -v
> > # make all install
> >
> > then gcc-2.95.3:
> > # ../gcc/configure --target=$target --prefix=$prefix --with-newlib
> > --without-headers -v
> > # make install-gcc-cross
> >
> > # PATH=$PATH:$prefix/bin
> > # export CC_FOR_TARGET=/bar/bin/i386-coff-gcc
> > # export AS_FOR_TARGET=/bar/bin/i386-coff-as
> > # export LD_FOR_TARGET=/bar/bin/i386-coff-ld
> > # export AR_FOR_TARGET=/bar/bin/i386-coff-ar
> > # export RANLIB_FOR_TARGET=/bar/bin/i386-coff-ranlib
> > # ../newlib/configure --target=$target --prefix=$prefix -v
> > # make
> > ^C
> > (Makefile does not use i386-coff-gcc as expected but gcc)
> > so i edit in my BUILD directory the Makefile and replaced
> > gcc with i386-coff-gcc and as with ...etc.
>
> It looks like you have failed to use the top-level configure from above
> newlib.  For example, when you download the newlib source tree, you will
> have a directory called src which has a sub-directory newlib.  You need to
> use the src/configure not the src/newlib/configure.  It will do this for
> you. The same applies for all of the other components.  If you have merged
> your source trees properly, you want to configure once from the top.  This
> will configure all of your sub-components like gcc/binutils/newlib.  When
> you do this, gcc and newlib will figure out what to do automatically and
> you don't have to specify --with-newlib or what tools to use when building
> newlib.
>
> -- Jeff J.

hmm ok checked out and it seems to work, but now it doesn't build a crt0.o

i crawled the configures and Makefiles in the sub-directories and it looks 
like this is the failure:
# ../newlib/configure --target=$target --prefix=$prefix -v
# make all | tee loggy
# more loggy
[snip]

i386-coff-ar cru lib.a locale.o
i386-coff-ranlib lib.a
make[3]: Leaving directory 
`/download/build_newlib/i386-coff/newlib/libc/locale'
Making all in sys
make[3]: Entering directory `/download/build_newlib/i386-coff/newlib/libc/sys'
Making all in .
make[4]: Entering directory `/download/build_newlib/i386-coff/newlib/libc/sys'
make[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory `/download/build_newlib/i386-coff/newlib/libc/sys'
make[3]: Leaving directory `/download/build_newlib/i386-coff/newlib/libc/sys'
Making all in reent

[snap]

the 'configuring in sys' showed no warnings or errors.
a quick look at the Makefile shows:

all-am: Makefile $(LIBRARIES) $(DATA)
where $(LIBRARIES) = $(SYSLIB) and $(SYSLIB) is:

#SYSLIB = \
#lib.a

$(DATA) in turn is defined as $(noinst_DATA) and $(noinst_DATA) is $(CRT0)
and $(CRT0) is empty definition...

do i have the proper tree? i downloaded 
ftp://sources.redhat.com/pub/newlib/newlib-1.9.0.tar.gz

thx,
flo




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