今天在编内核代码的时候,报下面的错误:
arch/arm/kernel/asm-offsets.c:54:2: error: #error Your compiler is too buggy; it is known to miscompile kernels
#error Your compiler is too buggy; it is known to miscompile kernels
^
arch/arm/kernel/asm-offsets.c:55:2: error: #error and result in filesystem corruption and oopses.
#error and result in filesystem corruption and oopses.
^
Kbuild:80: recipe for target 'arch/arm/kernel/asm-offsets.s' failed
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
Makefile:986: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
用的toolchain:
$ arm-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/toolchain/arm-linux-4.8.2/bin/../libexec/gcc/arm-linux-gnueabi/4.8.2/lto-wrapper
Target: arm-linux-gnueabi
Configured with: ../../src/gcc-4.8.2/configure --build=i686-pc-linux-gnu --target=arm-linux-gnueabi --prefix=/home/charles/code/build_toolchain/toolchain --with-sysroot=/home/charles/code/build_toolchain/toolchain/arm-linux-gnueabi/sysroot --disable-libmudflap --disable-libssp --disable-nls --disable-libstdcxx-pch --with-interwork --with-mode=arm --with-fpu=vfpv3 --with-arch=armv7-a --with-float=softfp --enable-libgomp --enable-poison-system-directories --enable-symvers=gnu --enable-long-long --enable-threads --enable-languages=c,c++ --enable-shared --enable-lto --enable-__cxa_atexit --with-gnu-as --with-gnu-ld --enable-__cxa_atexit --with-gmp=/home/charles/code/build_toolchain/toolchain --with-mpfr=/home/charles/code/build_toolchain/toolchain --with-ppl=/home/charles/code/build_toolchain/toolchain --with-cloog=/home/charles/code/build_toolchain/toolchain
Thread model: posix
gcc version 4.8.2 (GCC)
据说是 , GCC 4.8.0到 GCC 4.8.2之间的arm gcc 编译器有问题: