This is the mail archive of the crossgcc@sourceware.org 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] |
Other format: | [Raw text] |
I'm trying to build for the powerpc-eabi target. I am not using a unified source tree. Initially, I was having problems build gcc-4.3.0 due to the libssp library (sounds like a useful library for detecting stack corruption, but can't be used in a non-hosted (i.e. no C library) environment). To work around it, I thought I would build a minimal boot gcc with out libssp, build the newlib, and then re-build gcc with libssp. But as it turns out, newlib has the a problem with the configure failing due to the C compiler not creating an executable (because it can't find a -lc which I'm trying to build (???)). CROSS BUILD CONFIGURATION Building on Red Hat Enterprise Linux ES release 4 (Nahant Update 5) with the following cross-compile configuration: BLD_HOST=x86_64-redhat-linux BLD_TARGET=ppc-eabi gmp-4.2.2 mpfr-2.3.1 bintutils-2.18 newlib-1.16.0 gcc-4.3.0 LOG OF STEPS - gmp/mpfr "make check" for both passed all tests. Installed libraries/headers into prefix/lib and prefix/include. Modified LD_LIBRARY_PATH and LD_RUN_PATH to include the prefix/lib dir. - Ran configure for binutils (from the config.log): $ /aspen/Users/mike.cox/tools/packages/toolchain/branches/2.0/binutils/con figu re --prefix=/aspen/Users/mike.cox/install --bindir=/aspen/Users/mike.cox/install /bin --target=ppc-eabi --enable-multilib - Built, checked, and installed binutils: make -C /aspen/Users/mike.cox/build/tools-1.0/toolchain-2.0/binutils all make -C /aspen/Users/mike.cox/build/tools-1.0/toolchain-2.0/binutils make -C /aspen/Users/mike.cox/build/tools-1.0/toolchain-2.0/binutils - Configured (see config.log excerpt below) a minimal (--without-libssp) boot-gcc to compile my newlib: $ /aspen/Users/mike.cox/tools/packages/toolchain/branches/2.0/boot-gcc/con figu re --prefix=/aspen/Users/mike.cox/install --bindir=/aspen/Users/mike.cox/install /bin --target=ppc-eabi --disable-nls --with-gnu-as --with-gnu-ld --with-gmp=/asp en/Users/mike.cox/install --with-mfpr=/aspen/Users/mike.cox/install --disable-li bssp --enable-languages=c - Built and installed boot-gcc: make -C /aspen/Users/mike.cox/build/tools-1.0/toolchain-2.0/boot-gcc all make -C /aspen/Users/mike.cox/build/tools-1.0/toolchain-2.0/boot-gcc install - Configured my newlib: $ /aspen/Users/mike.cox/tools/packages/toolchain/branches/2.0/newlib/confi gure --host=ppc-eabi --prefix=/aspen/Users/mike.cox/install The configuration failed with the following info in the config.log: configure:3158: $? = 0 configure:3160: ppc-eabi-gcc -v </dev/null >&5 Using built-in specs. Target: ppc-eabi Configured with: /aspen/Users/mike.cox/tools/packages/toolchain/branches/2.0/boo t-gcc/configure --prefix=/aspen/Users/mike.cox/install --bindir=/aspen/Users/mik e.cox/install/bin --target=ppc-eabi --disable-nls --with-gnu-as --with-gnu-ld -- with-gmp=/aspen/Users/mike.cox/install --with-mfpr=/aspen/Users/mike.cox/install --disable-libssp --enable-languages=c Thread model: single gcc version 4.3.0 (GCC) configure:3163: $? = 0 configure:3165: ppc-eabi-gcc -V </dev/null >&5 ppc-eabi-gcc: '-V' option must have argument configure:3168: $? = 1 configure:3191: checking for C compiler default output file name configure:3194: ppc-eabi-gcc conftest.c >&5 /aspen/Users/mike.cox/install/lib/gcc/ppc-eabi/4.3.0/../../../../ppc-eab i/bin/ld : cannot find -lc collect2: ld returned 1 exit status configure:3197: $? = 1 configure: failed program was: | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:3236: error: C compiler cannot create executables See `config.log' for more details. Note the error message: /aspen/Users/mike.cox/install/lib/gcc/ppc-eabi/4.3.0/../../../../ppc-eab i/bin/ld : cannot find -lc I am not too familiar with the autoconf, but it appears this initial test is assuming a hosted environment, i.e. that there is a C library, which won't work for any cross, non-hosted build. Any ideas how to work around this? Michael H. Cox (Mike) Senior Embedded Sotware Engineer Aspen Avionics Inc. -- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |