kernel/bounds.c:1:0: error: code model kernel does not support PIC mode
原因是,gcc-5这逼nc自己加了个fpie 所以
修改Makefile后面加个这个-fno-pie
arch/x86/vdso/vdso32/note.S:1:0: sorry, unimplemented: -mfentry isn’t supported for 32-bit in combination with -fpic
同理这sb又加了fpic,所以我们就
这加个-fno-pic
题外话
include/linux/compiler-gcc.h:121:1: fatal error: linux/compiler-gcc7.h: No such file or directory
#include gcc_header(__GNUC__)
用gcc7的时候编译报这个错
解决方法
cp include/linux/compiler-gcc5.h include/linux/compiler-gcc7.h
把5当成7来用