Мой кросс-компилятор arm-cortex_a8-linux-gnueabihf продолжает вызывать нативный ассемблер x86_64-linux-gnu - PullRequest
1 голос
/ 07 октября 2019

Я пытаюсь построить кросс-инструментальную цепочку ARM после Mastering Embedded Linux от Chris Simmons. Цепочка инструментов построена нормально, но когда я пытаюсь скомпилировать простой файл hello.c, я замечаю, что он пытается использовать собственный ассемблер x86_64-linux-gnu. Как я могу это исправить? Вывод экрана показан ниже

arm-cortex_a8-linux-gnueabihf-gcc -I ./x-tools/arm-cortex_a8-linux-gnueabihf/lib/gcc/arm-cortex_a8-linux-gnueabihf/8.3.0/include hello.c -o hello -v 
Using built-in specs.
COLLECT_GCC=arm-cortex_a8-linux-gnueabihf-gcc
Target: arm-cortex_a8-linux-gnueabihf
Configured with: /home/kiranand/crosstool-ng.old/.build/arm-cortex_a8-linux-gnueabihf/src/gcc/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=arm-cortex_a8-linux-gnueabihf --prefix=/home/kiranand/x-tools/arm-cortex_a8-linux-gnueabihf --with-sysroot=/home/kiranand/x-tools/arm-cortex_a8-linux-gnueabihf/arm-cortex_a8-linux-gnueabihf/sysroot --enable-languages=c,c++ --with-cpu=cortex-a8 --with-float=hard --with-pkgversion='crosstool-NG 1.24.0' --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath --disable-libquadmath-support --disable-libsanitizer --disable-libmpx --with-gmp=/home/kiranand/crosstool-ng.old/.build/arm-cortex_a8-linux-gnueabihf/buildtools --with-mpfr=/home/kiranand/crosstool-ng.old/.build/arm-cortex_a8-linux-gnueabihf/buildtools --with-mpc=/home/kiranand/crosstool-ng.old/.build/arm-cortex_a8-linux-gnueabihf/buildtools --with-isl=/home/kiranand/crosstool-ng.old/.build/arm-cortex_a8-linux-gnueabihf/buildtools --enable-lto --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --enable-threads=posix --enable-target-optspace --enable-plugin --enable-gold --disable-nls --disable-multilib --with-local-prefix=/home/kiranand/x-tools/arm-cortex_a8-linux-gnueabihf/arm-cortex_a8-linux-gnueabihf/sysroot --enable-long-long
Thread model: posix
gcc version 8.3.0 (crosstool-NG 1.24.0) 
COLLECT_GCC_OPTIONS='-I' './x-tools/arm-cortex_a8-linux-gnueabihf/lib/gcc/arm-cortex_a8-linux-gnueabihf/8.3.0/include' '-o' 'hello' '-v' '-mcpu=cortex-a8' '-mfloat-abi=hard' '-mtls-dialect=gnu' '-marm' '-march=armv7-a+sec+simd'
 cc1 -quiet -v -I ./x-tools/arm-cortex_a8-linux-gnueabihf/lib/gcc/arm-cortex_a8-linux-gnueabihf/8.3.0/include -iprefix ../lib/gcc/arm-cortex_a8-linux-gnueabihf/8.3.0/ hello.c -quiet -dumpbase hello.c -mcpu=cortex-a8 -mfloat-abi=hard -mtls-dialect=gnu -marm -march=armv7-a+sec+simd -auxbase hello -version -o /tmp/ccAZObGg.s
GNU C17 (crosstool-NG 1.24.0) version 8.3.0 (arm-cortex_a8-linux-gnueabihf)
    compiled by GNU C version 7.4.0, GMP version 6.1.2, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.20-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "../lib/gcc/arm-cortex_a8-linux-gnueabihf/8.3.0/include"
ignoring nonexistent directory "../lib/gcc/arm-cortex_a8-linux-gnueabihf/8.3.0/include-fixed"
ignoring nonexistent directory "../lib/gcc/arm-cortex_a8-linux-gnueabihf/8.3.0/../../../../arm-cortex_a8-linux-gnueabihf/include"
ignoring nonexistent directory "../lib/gcc/arm-cortex_a8-linux-gnueabihf/8.3.0/include"
ignoring nonexistent directory "/home/kiranand/x-tools/arm-cortex_a8-linux-gnueabihf/arm-cortex_a8-linux-gnueabihf/sysroot/home/kiranand/x-tools/arm-cortex_a8-linux-gnueabihf/arm-cortex_a8-linux-gnueabihf/sysroot/include"
ignoring nonexistent directory "../lib/gcc/arm-cortex_a8-linux-gnueabihf/8.3.0/include-fixed"
ignoring nonexistent directory "../arm-cortex_a8-linux-gnueabihf/include"
#include "..." search starts here:
#include <...> search starts here:
 ./x-tools/arm-cortex_a8-linux-gnueabihf/lib/gcc/arm-cortex_a8-linux-gnueabihf/8.3.0/include
 /home/kiranand/x-tools/arm-cortex_a8-linux-gnueabihf/arm-cortex_a8-linux-gnueabihf/sysroot/usr/include
End of search list.
GNU C17 (crosstool-NG 1.24.0) version 8.3.0 (arm-cortex_a8-linux-gnueabihf)
    compiled by GNU C version 7.4.0, GMP version 6.1.2, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.20-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 9bfeb3305b9bdb6c1c0abb4ab98a7070
COLLECT_GCC_OPTIONS='-I' './x-tools/arm-cortex_a8-linux-gnueabihf/lib/gcc/arm-cortex_a8-linux-gnueabihf/8.3.0/include' '-o' 'hello' '-v' '-mcpu=cortex-a8' '-mfloat-abi=hard' '-mtls-dialect=gnu' '-marm' '-march=armv7-a+sec+simd'
 as -v -I ./x-tools/arm-cortex_a8-linux-gnueabihf/lib/gcc/arm-cortex_a8-linux-gnueabihf/8.3.0/include -march=armv7-a+sec -mfloat-abi=hard -meabi=5 -o /tmp/ccnx3y8f.o /tmp/ccAZObGg.s
GNU assembler version 2.30 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.30
Assembler messages:
Fatal error: invalid -march= option: `armv7-a+sec'
...