Kernel – GCC 13 Plugins fail – and Fix..
Fedora 38 (beta..) has GCC 13, and this causes an error when compiling the kernel with ‘gcc_plugins‘ selected:
………………….
CC scripts/mod/devicetable-offsets.s
cc1: error: cannot load plugin ./scripts/gcc-plugins/randomize_layout_plugin.so: ./scripts/gcc-plugins/randomize_layout_plugin.so: undefined symbol: tree_code_type
make[1]: *** [scripts/Makefile.build:252: scripts/mod/empty.o] Error 1
make[1]: *** Waiting for unfinished jobs….
cc1: error: cannot load plugin ./scripts/gcc-plugins/randomize_layout_plugin.so: ./scripts/gcc-plugins/randomize_layout_plugin.so: undefined symbol: tree_code_type
make[1]: *** [scripts/Makefile.build:114: scripts/mod/devicetable-offsets.s] Error 1
make: *** [Makefile:1297: prepare0] Error 2
make: *** Waiting for unfinished jobs….
LD /usr/src/linux-6.2/tools/objtool/objtool-in.o
LINK /usr/src/linux-6.2/tools/objtool/objtool
——————–
# gcc –version
gcc (GCC) 13.0.1 20230215 (Red Hat 13.0.1-0)
The workaround is to simply de-select ‘gcc_plugins’ in the kernel config, but if you need this, then there is a patch – and more info – at: https://www.spinics.net/lists/kernel/msg4674124.html
I have applied this to Kernel 6.2 on Fedora 38 / GCC 13.0.1, and the kernel compile etc. now works OK..
Robert Gadsdon February 21st 2023.
Comments
Kernel – GCC 13 Plugins fail – and Fix.. — No Comments