Building kernel module fails due to CONFIG_RETPOLINE=y but not supported by the compiler
Issue
-
After updated kernel to the version with the retpoline patches no longer able to compile kernel modules.
/arch/x86/Makefile:166: *** CONFIG_RETPOLINE=y, but not supported by the compiler. Compiler update recommended
-
After updated kernel to the version with the retpoline patches no longer able to use SystemTap.
# stap -v -g test.stp --all-modules [...] /usr/src/kernels/3.10.0-327.65.1.el7.x86_64/arch/x86/Makefile:163: *** CONFIG_RETPOLINE=y, but not supported by the compiler. Toolchain update recommended.. Stop. WARNING: kbuild exited with status: 2 Pass 4: compiled C into "stap_2f46bb3244dec16cdb8cccc7821af177_5130.ko" in 80usr/110sys/181real ms. Pass 4: compilation failed. [man error::pass4]
Environment
- Red Hat Enterprise Linux 7 (gcc-4.8.5-16.el7 or older)
- Red Hat Enterprise Linux 6 (gcc-4.4.7-18 or older)
- Red Hat Enterprise Linux 5 (gcc-4.1.2-55.el5 or older)
- kernel with retpoline
- gcc without retpoline support
- SystemTap
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.