figozhang / runninglinuxkernel_5.0

奔跑吧linux内核第二版(卷1,卷2,入门篇) 实验平台
Other
252 stars 159 forks source link

./run_debian_x86_64.sh build_kernel error #14

Closed zaiqiang-dong closed 3 years ago

zaiqiang-dong commented 3 years ago

./include/linux/compiler.h: In function ‘read_once_size’: ./include/linux/compiler.h:192:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible 192 | { | ^ ./include/linux/compiler.h: In function ‘read_once_size_nocheck’: ./include/linux/compiler.h:210:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible 210 | { | ^ ./include/linux/compiler.h: In function ‘__write_once_size’: ./include/linux/compiler.h:215:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible 215 | { | ^ In file included from ./include/linux/compiler.h:250, from ./arch/x86/include/asm/vgtod.h:5, from arch/x86/entry/vdso/vclock_gettime.c:15: ./arch/x86/include/asm/barrier.h: In function ‘array_index_mask_nospec’: ./arch/x86/include/asm/barrier.h:38:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible 38 | { | ^ In file included from ./include/linux/compiler.h:251, from ./arch/x86/include/asm/vgtod.h:5, from arch/x86/entry/vdso/vclock_gettime.c:15: ./include/linux/kasan-checks.h: In function ‘kasan_check_read’: ./include/linux/kasan-checks.h:10:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible 10 | { } | ^ ./include/linux/kasan-checks.h: In function ‘kasan_check_write’: ./include/linux/kasan-checks.h:12:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible 12 | { } | ^ In file included from ./arch/x86/include/asm/vgtod.h:5, from arch/x86/entry/vdso/vclock_gettime.c:15: ./include/linux/compiler.h: In function ‘read_word_at_a_time’: ./include/linux/compiler.h:273:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible 273 | { | ^ ./include/linux/compiler.h: In function ‘offset_to_ptr’: ./include/linux/compiler.h:303:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible

figozhang commented 3 years ago

pls use GCC 7 for x86_64