This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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

RE: Updated HOWTO [Re: Linux target, cygwin host ]


On Wed, 24 Jan 2001, Mumit Khan wrote:

> First of all, GCC is GNU Compiler Collection, and you sound like you're
> talking about only the *C* compiler which is part of GCC. So assuming
> that you're only talking about the C compiler, you're correct that you
> don't need the target includes/libraries to build xgcc/cc1 (the compiler
> driver and the backend compiler respectively), but there's one slight
> problem in building libgcc.a, which is built when you build the C
> compiler. Unless the "inhibit_libc" macro is defined, GCC will try to
> look for and include stdio.h and unistd.h. If you looked in libgcc2.c,
> this would have been apparent. GCC's configure defines this macro when
> you use --with-newlib at configure time. In this case, you can build
> the C compiler and libgcc2 without any target includes or libraries.

Thanks for the info, but using --with-newlib seems to fail for me:

1) first I build and installed binutils
2) then I tried to build gcc
gcc-build]$ ../gcc-2.95.2/configure
--target=powerpc-eabi
--prefix=/tools/linux-x86 --enable-languages=c --with-newlib
--without-dwarf2 ; make

/home/aba/tool-src/gcc-build/gcc/xgcc
-B/home/aba/tool-src/gcc-build/gcc/
-B/tools/linux-x86/powerpc-eabi/bin/ -c -DHAVE_CONFIG_H -g -O2
-I. -I../../../gcc-2.95.2/libiberty/../include
../../../gcc-2.95.2/libiberty/choose-temp.c
../../../gcc-2.95.2/libiberty/choose-temp.c:29: stdio.h: No such file or
directory
../../../gcc-2.95.2/libiberty/choose-temp.c:30: sys/types.h: No such file
or directory
../../../gcc-2.95.2/libiberty/choose-temp.c:32: unistd.h: No such file or
directory
../../../gcc-2.95.2/libiberty/choose-temp.c:35: stdlib.h: No such file or
directory
../../../gcc-2.95.2/libiberty/choose-temp.c:38: sys/file.h: No such file
or directory
make[1]: *** [choose-temp.o] Error 1
make[1]: Leaving directory
`/home/aba/tool-src/gcc-build/powerpc-eabi/libiberty'
make: *** [all-target-libiberty] Error 2

xgcc is build, but it seems like it still needs target libraries even if
--with-newlib is set. So --with-newlib don't work the same way as if I
define inhibit_libc early in both gcc/libgcc2.c and gcc/frame.c.

> Some of the other language runtimes may/will not build without access 
> to the target runtime.

I only need the C compiler. So should I expect these troubles ?

> CrossGCC FAQ is always a good place to start, followed by a search using
> google, altavista, what not. I'm assuming you've looked in the obvious 
> places. 

The CrossGCC FAQ is good but a bit too old. A search on the net for
inhibit_libc just gives confusion. People just set it without knowing the
effect (expect that the compilation now doesn't fail anymore).
 
Regards,
-- 
Andreas Bach Aaen


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


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