This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: cross-compilation documentation



On Sunday, Jun 22, 2003, at 13:09 US/Eastern, Peter Barada wrote:



No you do not have install the headers because you can pass to gcc
--without-headers and that will make sure that you do not compile
the sources that require glibc's headers.

So total process is:
cd gccobjdir
.../gcc-sources/configure --without-headers --target=???-linux-gnu
--prefix=??? --enable-languages=c

That doesn't work (at least for ppc-linux) since gcc-3.3/config/rs6000/linux.h #includes <signal.h> when building libgcc2, which causes it to fail since there are no headers(yet).

The *real* solution is to suppress building libgcc as part of the
cross compilation bootstrap so the circular dependency of
compiler-headers-compiler is broken.
I have succeeded in building a ppc-linux target by tweaking the
obj/gcc-bootstrap/gcc/Makefile to suppress the definitions of LIBGCC
and INSTALL_LIBGCC(the following fragment from my master build Makefile):


fix-bootstrap1-makefile:
cd ${BOOTSTRAP1_BUILDDIR}/gcc ; \
sed -e '1,$$s/^LIBGCC =/# LIBGCC =/;1,$$s/^INSTALL_LIBGCC =/# INSTALL_LIBGCC =/' < Makefile > Makefile.new ; \
mv Makefile.new Makefile


I'm working(slowly) on adding a --without-libgcc to gcc/configure to
do this...

That is a bug in the config of rs6000 of gcc which should be fixed, I have a patch for it and there is no need for --without-libgcc:

try this patch:

Attachment: temp.linux.diff
Description: Binary data



I will submit it if it works for you.


Thanks, Andrew Pinski

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