GCC kompilieren und linken gegen MUSL führt zu Fehlern



  • Hi zusammen,
    Ich hoffe es passt hier im Forum.
    Und zwar habe ich das Problem, ich versuche seit gestern LFS zu bauen.
    Das ist auch im Grunde kein Problem, aber der GCC macht mich noch wahnsinnig.

    Und zwar versuche ich ihn gegen MUSL statt GLibc zu linken.
    Nun klappt das beim ersten bauen auch (mit dem systemeigenen gcc und musl-gcc) aber wenn ich jetzt das zweite mal versuche gcc mit dem zuvor kompilierten Cross Compiler zu kompilieren erhalte ich immer die Fehler:

    checking for x86_64-unknown-linux-gnu-gcc... /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools/x86_64-unknown-linux-gnu/bin/ -B/tools/x86_64-unknown-linux-gnu/lib/ -isystem /tools/x86_64-unknown-linux-gnu/include -isystem /tools/x86_64-unknown-linux-gnu/sys-include   
    checking for --enable-version-specific-runtime-libs... no
    checking whether to enable maintainer-specific portions of Makefiles... no
    checking for x86_64-unknown-linux-gnu-gcc... /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools/x86_64-unknown-linux-gnu/bin/ -B/tools/x86_64-unknown-linux-gnu/lib/ -isystem /tools/x86_64-unknown-linux-gnu/include -isystem /tools/x86_64-unknown-linux-gnu/sys-include   
    checking for --enable-version-specific-runtime-libs... no
    checking for style of include used by make... GNU
    checking for x86_64-unknown-linux-gnu-gcc... /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools/x86_64-unknown-linux-gnu/bin/ -B/tools/x86_64-unknown-linux-gnu/lib/ -isystem /tools/x86_64-unknown-linux-gnu/include -isystem /tools/x86_64-unknown-linux-gnu/sys-include   
    checking for C compiler default output file name... checking for C compiler default output file name... checking for C compiler default output file name... a.out
    checking whether the C compiler works... configure: error: in `/mnt/lfs/sources/gcc-build/x86_64-unknown-linux-gnu/libstdc++-v3':
    configure: error: cannot run C compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details.
    a.out
    checking whether the C compiler works... a.out
    checking whether the C compiler works... configure: error: in `/mnt/lfs/sources/gcc-build/x86_64-unknown-linux-gnu/libquadmath':
    configure: error: cannot run C compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details.
    configure: error: in `/mnt/lfs/sources/gcc-build/x86_64-unknown-linux-gnu/libssp':
    configure: error: cannot run C compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details.
    make[1]: *** [configure-target-libstdc++-v3] Error 1
    make[1]: *** Waiting for unfinished jobs....
    make[1]: *** [configure-target-libquadmath] Error 1
    make[1]: *** [configure-target-libssp] Error 1
    make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
    make: *** [all] Error 2
    

    Hat zufällig jemand eine Idee was dort schief gehen kann?
    GCC Quellcode ist die 4.9.2 mit den Patches von musl gcc.

    Kleine Info: Der CrossCompiler geht sich, hab gerade extra nochmal getestet und er spuckt funktionierende Programme aus (die auch alle gegen musl gelinkt sind (readelf -a verräts).

    Mit freundlichen Grüßen,
    Fer


Anmelden zum Antworten