Hallo
ich versuche seit einigen Stunden, den GCC als Cross Compiler für MIPS Prozessoren zu bauen. Ich habe eine einfache Anleitung gefunden, aber ich komme beim ersten compilieren des GCCs nicht weiter.
Ich habe die folgenden Quellen reruntergeladen:
gcc-core-4.6.2.tar.bz2
mpc-0.8.1.tar.gz
gmp-4.3.2.tar.bz2
gdb-7.5.tar.bz2
mpfr-2.4.2.tar.bz2
binutils-2.23.1.tar.gz
Binutils, mpc, gmp, gdb und mpfr habe ich übersetzt und installiert. Das Makefile hab ich mit
1 | ./configure --target=mips-elf --prefix=/usr/local --enable-multilib --disable-libssp --with-system-zlib --disable-shared --with-gmp='/usr/local/lib' --with-mpfr='/usr/local/lib' --with-mpc='/usr/local/lib' |
erzeugt. Mein Problem ist jetzt an der Stelle
1 | make CFLAGS="-Os -w" |
Es wird immer der Fehler ausgegeben:
1 2 3 4 5 6 | checking for suffix of object files... configure: error: in `/home/tux/Downloads/gcc-obj/mips-elf/libgcc': configure: error: cannot compute suffix of object files: cannot compile See `config.log' for more details. make[1]: *** [configure-target-libgcc] Fehler 1 make[1]: Verlasse Verzeichnis '/home/tux/Downloads/gcc-obj' make: *** [all] Fehler 2 |
In der config.log ist folgender Inhalt:
This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by GNU C Runtime Library configure 1.0, which was generated by GNU Autoconf 2.64. Invocation command line was $ /home/tux/Downloads/gcc-obj/libgcc/configure --cache-file=./config.cache --with-cross-host=x86_64-unknown-linux-gnu --prefix=/usr/local --enable-multilib --disable-libssp --with-system-zlib --disable-shared --enable-languages=c,lto --program-transform-name=s&^&mips-elf-& --disable-option-checking --with-target-subdir=mips-elf --build=x86_64-unknown-linux-gnu --host=mips-elf --target=mips-elf --srcdir=../.././libgcc ## --------- ## ## Platform. ## ## --------- ## hostname = tux-Aspire-5742G uname -m = x86_64 uname -r = 3.2.0-23-generic uname -s = Linux uname -v = #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 /usr/bin/uname -p = unknown /bin/uname -X = unknown /bin/arch = unknown /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown PATH: /usr/lib/lightdm/lightdm PATH: /usr/local/sbin PATH: /usr/local/bin PATH: /usr/sbin PATH: /usr/bin PATH: /sbin PATH: /bin PATH: /usr/games ## ----------- ## ## Core tests. ## ## ----------- ## configure:1734: loading cache ./config.cache configure:1903: checking for --enable-version-specific-runtime-libs configure:1916: result: no configure:1964: checking for a BSD-compatible install configure:2032: result: /usr/bin/install -c configure:2048: checking for gawk configure:2075: result: gawk configure:2095: checking build system type configure:2109: result: x86_64-unknown-linux-gnu configure:2129: checking host system type configure:2142: result: mips-unknown-elf configure:2245: checking for mips-elf-ar configure:2272: result: /usr/local/mips-elf/bin/ar configure:2337: checking for mips-elf-lipo configure:2364: result: mips-elf-lipo configure:2429: checking for mips-elf-nm configure:2456: result: /home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/nm configure:2521: checking for mips-elf-ranlib configure:2548: result: /usr/local/mips-elf/bin/ranlib configure:2613: checking for mips-elf-strip configure:2640: result: /usr/local/mips-elf/bin/strip configure:2702: checking whether ln -s works configure:2706: result: yes configure:2723: checking for mips-elf-gcc configure:2750: result: /home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/local/mips-elf/bin/ -B/usr/local/mips-elf/lib/ -isystem /usr/local/mips-elf/include -isystem /usr/local/mips-elf/sys-include configure:3019: checking for C compiler version configure:3028: /home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/local/mips-elf/bin/ -B/usr/local/mips-elf/lib/ -isystem /usr/local/mips-elf/include -isystem /usr/local/mips-elf/sys-include --version >&5 xgcc (GCC) 4.6.2 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. configure:3039: $? = 0 configure:3028: /home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/local/mips-elf/bin/ -B/usr/local/mips-elf/lib/ -isystem /usr/local/mips-elf/include -isystem /usr/local/mips-elf/sys-include -v >&5 Reading specs from /home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/specs COLLECT_GCC=/home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/xgcc COLLECT_LTO_WRAPPER=/home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/lto-wrapper Target: mips-elf Configured with: ./configure --target=mips-elf --prefix=/usr/local --enable-multilib --disable-libssp --with-system-zlib --disable-shared --with-gmp=/usr/local/lib --with-mpfr=/usr/local/lib --with-mpc=/usr/local/lib Thread model: single gcc version 4.6.2 (GCC) configure:3039: $? = 0 configure:3028: /home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/local/mips-elf/bin/ -B/usr/local/mips-elf/lib/ -isystem /usr/local/mips-elf/include -isystem /usr/local/mips-elf/sys-include -V >&5 xgcc: error: unrecognized option '-V' xgcc: fatal error: no input files compilation terminated. configure:3039: $? = 1 configure:3028: /home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/local/mips-elf/bin/ -B/usr/local/mips-elf/lib/ -isystem /usr/local/mips-elf/include -isystem /usr/local/mips-elf/sys-include -qversion >&5 xgcc: error: unrecognized option '-qversion' xgcc: fatal error: no input files compilation terminated. configure:3039: $? = 1 configure:3055: /home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/local/mips-elf/bin/ -B/usr/local/mips-elf/lib/ -isystem /usr/local/mips-elf/include -isystem /usr/local/mips-elf/sys-include -o conftest -g -O2 conftest.c >&5 /home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/cc1: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory configure:3058: $? = 1 configure:3246: checking for suffix of object files configure:3268: /home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/local/mips-elf/bin/ -B/usr/local/mips-elf/lib/ -isystem /usr/local/mips-elf/include -isystem /usr/local/mips-elf/sys-include -c -g -O2 conftest.c >&5 /home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/cc1: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory configure:3272: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "GNU C Runtime Library" | #define PACKAGE_TARNAME "libgcc" | #define PACKAGE_VERSION "1.0" | #define PACKAGE_STRING "GNU C Runtime Library 1.0" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "http://www.gnu.org/software/libgcc/" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:3286: error: in `/home/tux/Downloads/gcc-obj/mips-elf/libgcc': configure:3289: error: cannot compute suffix of object files: cannot compile See `config.log' for more details. ## ---------------- ## ## Cache variables. ## ## ---------------- ## ac_cv_build=x86_64-unknown-linux-gnu ac_cv_env_CC_set=set ac_cv_env_CC_value='/home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/local/mips-elf/bin/ -B/usr/local/mips-elf/lib/ -isystem /usr/local/mips-elf/include -isystem /usr/local/mips-elf/sys-include ' ac_cv_env_CFLAGS_set=set ac_cv_env_CFLAGS_value='-g -O2' ac_cv_env_CPPFLAGS_set=set ac_cv_env_CPPFLAGS_value= ac_cv_env_CPP_set= ac_cv_env_CPP_value= ac_cv_env_LDFLAGS_set=set ac_cv_env_LDFLAGS_value= ac_cv_env_LIBS_set= ac_cv_env_LIBS_value= ac_cv_env_build_alias_set=set ac_cv_env_build_alias_value=x86_64-unknown-linux-gnu ac_cv_env_host_alias_set=set ac_cv_env_host_alias_value=mips-elf ac_cv_env_target_alias_set=set ac_cv_env_target_alias_value=mips-elf ac_cv_host=mips-unknown-elf ac_cv_prog_AR=/usr/local/mips-elf/bin/ar ac_cv_prog_AWK=gawk ac_cv_prog_CC='/home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/local/mips-elf/bin/ -B/usr/local/mips-elf/lib/ -isystem /usr/local/mips-elf/include -isystem /usr/local/mips-elf/sys-include ' ac_cv_prog_LIPO=mips-elf-lipo ac_cv_prog_NM=/home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/nm ac_cv_prog_RANLIB=/usr/local/mips-elf/bin/ranlib ac_cv_prog_STRIP=/usr/local/mips-elf/bin/strip ## ----------------- ## ## Output variables. ## ## ----------------- ## AR='/usr/local/mips-elf/bin/ar' AWK='gawk' CC='/home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/local/mips-elf/bin/ -B/usr/local/mips-elf/lib/ -isystem /usr/local/mips-elf/include -isystem /usr/local/mips-elf/sys-include ' CFLAGS='-g -O2' CPP='' CPPFLAGS='' DEFS='' ECHO_C='' ECHO_N='-n' ECHO_T='' EXEEXT='' INSTALL_DATA='/usr/bin/install -c -m 644' INSTALL_PROGRAM='/usr/bin/install -c' INSTALL_SCRIPT='/usr/bin/install -c' LDFLAGS='' LIBOBJS='' LIBS='' LIPO='mips-elf-lipo' LN_S='ln -s' LTLIBOBJS='' MAINT='#' NM='/home/tux/Downloads/gcc-obj/host-x86_64-unknown-linux-gnu/gcc/nm' OBJEXT='' PACKAGE_BUGREPORT='' PACKAGE_NAME='GNU C Runtime Library' PACKAGE_STRING='GNU C Runtime Library 1.0' PACKAGE_TARNAME='libgcc' PACKAGE_URL='http://www.gnu.org/software/libgcc/' PACKAGE_VERSION='1.0' PATH_SEPARATOR=':' RANLIB='/usr/local/mips-elf/bin/ranlib' SHELL='/bin/bash' STRIP='/usr/local/mips-elf/bin/strip' ac_ct_CC='' asm_hidden_op='' bindir='${exec_prefix}/bin' build='x86_64-unknown-linux-gnu' build_alias='x86_64-unknown-linux-gnu' build_cpu='x86_64' build_libsubdir='build-x86_64-unknown-linux-gnu' build_os='linux-gnu' build_subdir='build-x86_64-unknown-linux-gnu' build_vendor='unknown' datadir='${datarootdir}' datarootdir='${prefix}/share' decimal_float='' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' dvidir='${docdir}' enable_decimal_float='' enable_shared='no' exec_prefix='NONE' extra_parts='' fixed_point='' host='mips-unknown-elf' host_alias='mips-elf' host_cpu='mips' host_noncanonical='mips-elf' host_os='elf' host_subdir='.' host_vendor='unknown' htmldir='${docdir}' includedir='${prefix}/include' infodir='${datarootdir}/info' libdir='${exec_prefix}/lib' libexecdir='${exec_prefix}/libexec' libgcc_topdir='../.././libgcc/..' localedir='${datarootdir}/locale' localstatedir='${prefix}/var' mandir='${datarootdir}/man' oldincludedir='/usr/include' pdfdir='${docdir}' prefix='/usr/local' program_transform_name='s&^&mips-elf-&' psdir='${docdir}' sbindir='${exec_prefix}/sbin' set_have_cc_tls='' set_use_emutls='' sharedstatedir='${prefix}/com' slibdir='$(exec_prefix)/$(host_noncanonical)/lib' sysconfdir='${prefix}/etc' target_alias='mips-elf' target_noncanonical='mips-elf' target_subdir='mips-elf' tmake_file='' toolexecdir='$(exec_prefix)/$(target_noncanonical)' toolexeclibdir='$(toolexecdir)/lib' vis_hide='' ## ----------- ## ## confdefs.h. ## ## ----------- ## /* confdefs.h */ #define PACKAGE_NAME "GNU C Runtime Library" #define PACKAGE_TARNAME "libgcc" #define PACKAGE_VERSION "1.0" #define PACKAGE_STRING "GNU C Runtime Library 1.0" #define PACKAGE_BUGREPORT "" #define PACKAGE_URL "http://www.gnu.org/software/libgcc/" configure: exit 1
So wie ich das sehe, findet der Compiler die vorher erzeugten Librarys nicht, obwohl ich deren Speicherort beim ./configure übergeben habe. Kann mir jemand sagen, was beim Übersetzen falsch läuft?