I build gcc for arm from scratch. In the final step of building gcc occur errors. I’m counting on your help.
bogdan@bogdan-VirtualBox:~/xtools/build2/final-gcc-2$ $gcc_src/configure --build=$buildmach --host=$targetmach --target=$targetmach --prefix=$installdir --with-sysroot=$sysrootdir --enable-languages=c --with-gnu-as --with-gnu-ld --disable-multilib --with-float=soft --disable-sjlj-exceptions --disable-nls --enable-threads=posix --disable-libmudflap --disable-libssp --enable-long-longx --with-shared --with-gmp=$installdir --with-mpfr=$installdir --without-isl
make
a lot of log checking how to run the C preprocessor... (cached) arm-none-linux-gnueabi-gcc -E checking for grep that handles long lines and -e... (cached) /bin/grep checking for egrep... (cached) /bin/grep -E checking for ANSI C header files... (cached) yes checking for sys/types.h... (cached) yes checking for sys/stat.h... (cached) yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking for memory.h... (cached) yes checking for strings.h... (cached) yes checking for inttypes.h... (cached) yes checking for stdint.h... (cached) yes checking for unistd.h... (cached) yes checking for minix/config.h... (cached) no checking whether it is safe to define __EXTENSIONS__... (cached) yes checking for arm-none-linux-gnueabi-gcc... (cached) arm-none-linux-gnueabi-gcc checking whether we are using the GNU C compiler... (cached) yes checking whether arm-none-linux-gnueabi-gcc accepts -g... (cached) yes checking for arm-none-linux-gnueabi-gcc option to accept ISO C89... (cached) none needed checking dependency style of arm-none-linux-gnueabi-gcc... (cached) gcc3 checking for special C compiler options needed for large files... (cached) no checking for _FILE_OFFSET_BITS value needed for large files... (cached) 64 checking whether arm-none-linux-gnueabi-gcc supports -Wall... (cached) yes checking for -static-libgcc... yes checking how to print strings... printf checking for a sed that does not truncate output... (cached) /bin/sed checking for fgrep... (cached) /bin/grep -F checking for ld used by arm-none-linux-gnueabi-gcc... (cached) arm-none-linux-gnueabi-ld checking if the linker (arm-none-linux-gnueabi-ld) is GNU ld... (cached) yes checking for BSD- or MS-compatible name lister (nm)... (cached) arm-none-linux-gnueabi-nm checking the name lister (arm-none-linux-gnueabi-nm) interface... (cached) BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... (cached) 1572864 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking for arm-none-linux-gnueabi-ld option to reload object files... (cached) -r checking for arm-none-linux-gnueabi-objdump... (cached) arm-none-linux-gnueabi-objdump checking how to recognize dependent libraries... (cached) pass_all checking for arm-none-linux-gnueabi-ar... (cached) arm-none-linux-gnueabi-ar checking for arm-none-linux-gnueabi-strip... (cached) arm-none-linux-gnueabi-strip checking for arm-none-linux-gnueabi-ranlib... (cached) arm-none-linux-gnueabi-ranlib checking command to parse arm-none-linux-gnueabi-nm output from arm-none-linux-gnueabi-gcc object... (cached) ok checking for dlfcn.h... (cached) yes checking for objdir... (cached) .libs checking if arm-none-linux-gnueabi-gcc supports -fno-rtti -fno-exceptions... (cached) no checking for arm-none-linux-gnueabi-gcc option to produce PIC... -fPIC -DPIC checking if arm-none-linux-gnueabi-gcc PIC flag -fPIC -DPIC works... (cached) yes checking if arm-none-linux-gnueabi-gcc static flag -static works... (cached) yes checking if arm-none-linux-gnueabi-gcc supports -c -o file.o... (cached) yes checking if arm-none-linux-gnueabi-gcc supports -c -o file.o... (cached) yes checking whether the arm-none-linux-gnueabi-gcc linker (arm-none-linux-gnueabi-ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... (cached) no checking dynamic linker characteristics... (cached) GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking for int64_t... (cached) yes checking for uint64_t... (cached) yes checking for sys/wait.h that is POSIX.1 compatible... (cached) yes configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands config.status: executing libtool commands make[2]: вход в каталог «/home/bogdan/xtools/build2/final-gcc-2/lto-plugin» make all-am make[3]: вход в каталог «/home/bogdan/xtools/build2/final-gcc-2/lto-plugin» WARNING: liblto_plugin.la is static, not copying to ../gcc/liblto_plugin.la make[3]: выход из каталога «/home/bogdan/xtools/build2/final-gcc-2/lto-plugin» make[2]: выход из каталога «/home/bogdan/xtools/build2/final-gcc-2/lto-plugin» Configuring in ./gcc configure: loading cache ./config.cache checking build system type... x86_64-pc-linux-gnu checking host system type... arm-none-linux-gnueabi checking target system type... arm-none-linux-gnueabi checking LIBRARY_PATH variable... ok checking GCC_EXEC_PREFIX variable... ok checking whether to place generated files in the source directory... no checking whether a default linker was specified... no checking whether a default assembler was specified... no checking for arm-none-linux-gnueabi-gcc... arm-none-linux-gnueabi-gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... yes checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether arm-none-linux-gnueabi-gcc accepts -g... yes checking for arm-none-linux-gnueabi-gcc option to accept ISO C89... none needed checking whether we are using the GNU C++ compiler... yes checking whether arm-none-linux-gnueabi-g++ accepts -g... yes checking for arm-none-linux-gnueabi-gnatbind... no checking for arm-none-linux-gnueabi-gnatmake... no checking whether compiler driver understands Ada... no checking how to run the C++ preprocessor... /lib/cpp checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... no checking for sys/types.h... no checking for sys/stat.h... no checking for stdlib.h... no checking for string.h... no checking for memory.h... no checking for strings.h... no checking for inttypes.h... no checking for stdint.h... no checking for unistd.h... no checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... no checking how to run the C preprocessor... arm-none-linux-gnueabi-gcc -E checking for inline... inline checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... unknown checking for _LARGE_FILES value needed for large files... unknown checking size of void *... 0 checking size of short... 0 checking size of int... 0 checking size of long... 0 checking for long long... no checking for int8_t... no checking for int16_t... no checking for int32_t... no checking for int64_t... no checking for long long int... no checking for intmax_t... no checking for intptr_t... no checking for uint8_t... no checking for uint16_t... no checking for uint32_t... no checking for uint64_t... no checking for unsigned long long int... no checking for uintmax_t... no checking for uintptr_t... no configure: error: uint64_t or int64_t not found Makefile:4200: recipe for target 'configure-gcc' failed make[1]: *** [configure-gcc] Error 1 make[1]: выход из каталога «/home/bogdan/xtools/build2/final-gcc-2» Makefile:891: recipe for target 'all' failed make: *** [all] Error 2
Update
Solution: bogdan@bogdan-VirtualBox:~/xtools/build2/final-gcc-2$ $gcc_src/configure –build=$buildmach –target=$targetmach –prefix=$installdir CC=gcc –with-sysroot=$sysrootdir –enable-languages=c –with-gnu-as –with-gnu-ld –disable-multilib –with-float=soft –disable-sjlj-exceptions –disable-nls –enable-threads=posix –disable-libmudflap –disable-libssp –enable-long-longx –with-shared –with-gmp=$installdir –with-mpfr=$installdir
With that another errors appeared:
checking for x86_64-pc-linux-gnu-strip... no checking for strip... strip checking for x86_64-pc-linux-gnu-ranlib... ranlib checking command to parse nm output from gcc object... ok checking for sysroot... /home/bogdan/xtools/arm/sysroot checking for a working dd... /bin/dd checking how to truncate binary pipes... /bin/dd bs=4096 count=1 checking for x86_64-pc-linux-gnu-mt... no checking for mt... mt checking if mt is a manifest tool... no checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (ld -m elf_x86_64) supports shared libraries... yes checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... no checking whether to build static libraries... yes checking whether gcc __attribute__ ((mode (XX))) works... yes checking for recent GMP... yes checking usable gmp.h at link time... yes checking for GMP_NUMB_BITS and sizeof(mp_limb_t) consistency... no configure: error: GMP_NUMB_BITS and sizeof(mp_limb_t) are not consistent. You probably need to change some of the GMP or MPFR compile options. See 'config.log' for details (search for GMP_NUMB_BITS). Makefile:5126: recipe for target 'configure-mpfr' failed make[1]: *** [configure-mpfr] Error 1 make[1]: выход из каталога «/home/bogdan/xtools/build/final-gcc» Makefile:891: recipe for target 'all' failed make: *** [all] Error 2
Advertisement
Answer
Solution: bogdan@bogdan-VirtualBox:~/xtools/build2/final-gcc-2$ $gcc_src/configure --build=$buildmach --target=$targetmach --prefix=$installdir CC=gcc --with-sysroot=$sysrootdir --enable-languages=c --with-gnu-as --with-gnu-ld --disable-multilib --with-float=soft --disable-sjlj-exceptions --disable-nls --enable-threads=posix --disable-libmudflap --disable-libssp --enable-long-longx --with-shared --with-gmp=$installdir --with-mpfr=$installdir