Hello,
I'm trying to build a crossed native gcc 4.9.1 for arm (linux) on a x86
host. Thus, I have tried to configure gcc tree with :
../gcc-4.9.1/configure --target=arm-cortexa9_neon-linux-gnueabihf
--enable-languages=c,c++,fortran --enable-bootstrap
--with-gmp=/home/bertrand/cross --prefix=/home/bertrand/q7
--with-build-sysroot=/home/bertrand/x-tools/arm-cortexa9_neon-linux-gnueabihf/arm-cortexa9_neon-linux-gnueabihf/sysroot
--disable-threads --build=x86_64-unknown-linux-gnu
--host=arm-cortexa9_neon-linux-gnueabihf
Build aborts in stage 2 with :
checking for arm-cortexa9_neon-linux-gnueabihf-gcc...
/home/bertrand/cross/build/./prev-gcc/xgcc
-B/home/bertrand/cross/build/./prev-gcc/
-B/home/bertrand/q7/arm-cortexa9_neon-linux-gnueabihf/bin/
--sysroot=/home/bertrand/x-tools/arm-cortexa9_neon-linux-gnueabihf/arm-cortexa9_neon-linux-gnueabihf/sysroot
checking for C compiler default output file name...
configure: error: in `/home/bertrand/cross/build/intl':
configure: error: C compiler cannot create executables
See `config.log' for more details.
Makefile:5792: recipe for target 'configure-stage2-intl' failed
make[2]: *** [configure-stage2-intl] Error 77
make[2]: Leaving directory '/home/bertrand/cross/build'
Makefile:19319: recipe for target 'stage2-bubble' failed
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory '/home/bertrand/cross/build'
Makefile:888: recipe for target 'all' failed
make: *** [all] Error 2
In config.log, I have :
configure:3000: /home/bertrand/cross/build/./prev-gcc/xgcc
-B/home/bertrand/cross/build/./prev-gcc/
-B/home/bertrand/q7/arm-cortexa9_neon-linux-gnueabihf/bin/
--sysroot=/home/bertrand/x-tools/arm-cortexa9_neon-linux-gnueabihf/arm-cortexa9_neon-linux-gnueabihf/sysroot
-g -O2 -static-libstdc++ -static-libgcc conftest.c >&5
/lib/ld-linux-armhf.so.3: No such file or directory
configure:3004: $? = 255
configure:3041: result:
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3047: error: in `/home/bertrand/cross/build/intl':
configure:3051: error: C compiler cannot create executables
See `config.log' for more details.
I have checked xgcc format and xgcc is built for arm, not for x86 :
schroedinger:[~/cross/build/intl] > file
/home/bertrand/cross/build/./prev-gcc/xgcc
/home/bertrand/cross/build/./prev-gcc/xgcc: ELF 32-bit LSB executable,
ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for
GNU/Linux 2.6.16, not stripped
On https://gcc.gnu.org/onlinedocs/gccint/Configure-Terms.html, I can read :
"If host and target are the same, but build is different, you are using
a cross-compiler to build a native for a different system."
I suppose I have done a mistake... Any idea to build a crossed native
compiler ?
Best regards,
JKB