sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
CC arch/arm/kernel/asm-offsets.s
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.
^
make[1]: *** [arch/arm/kernel/asm-offsets.s] 错误 1
----------------------------------------------------------------------------------------
这个坑用什么姿势过?
离线
gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-16ubuntu4)
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty
最近编辑记录 john78 (2018-07-19 13:17:45)
离线
问题很简单, >= 4.8.0 and < 4.8.3 的gcc有bug,不能编译内核
https://blog.csdn.net/CaspianSea/article/details/51714440
据说是 , GCC 4.8.0到 GCC 4.8.2之间的arm gcc 编译器有问题:
https://github.com/raspberrypi/linux/issues/758
Looks like >= 4.8.0 and < 4.8.3 is considered buggy by kernel.
This is really a raspbian issue. Did you install gcc-4.8 from raspian/jessie?
我的版本:
debugdump@ubuntu:/disk2/licheepi/linux$ arm-linux-gnueabihf-gcc -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabihf-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/arm-linux-gnueabihf/include/c++/4.8.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf-cross/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf-cross --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-armhf-cross --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libgcj --enable-objc-gc --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-linux-gnueabihf --program-prefix=arm-linux-gnueabihf- --includedir=/usr/arm-linux-gnueabihf/include
Thread model: posix
gcc version 4.8.4 (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.1)
离线
sudo apt remove --auto-remove gcc-arm-linux-gnueabi 卸载不了???
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
Package 'gcc-arm-linux-gnueabi' is not installed, so not removed
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 466 个软件包未被升级。
arm-linux-gnueabihf-gcc -v
还是显示4.8.2
离线
搞定了 sudo apt remove --auto-remove gcc-arm-linux-gnueabihf
离线
可以了,谢谢
离线