Actually my problem seems still unsolved…
I got the same problem at the end of this post:
@ Akemi Yagi @ Michael Savisko
Could u please be more specific about the “build environment was adjusted” “this was an installation issue, not compilation.”? We are experiencing the same failure on CentOS 7.9 and GCC version is already gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) that supports retpoline and it is the only gcc that has been installed.
Since my gcc version is also 4.8.5 20150623, and in this post it said:
Marek Polacek 2018-04-13 13:11:27 UTC
You have to use gcc-4.8.5-28.el7 or newer; older gccs don’t support -mindirect-branch= yet. Not a bug.
I had a similar issue and I had to update my kernel-headers version to match my kernel-devel version.
Run ‘yum list installed kernel-devel’ to see your current package
Then ‘yum list available --showduplicates kernel-headers’ to find the available packages
Then run ‘yum install kernel-header-XXX’ to match your kernel-devel package.