The origin of this bug is the change in the gcc-9 package on 26 May 2019. Shouldn't the fcf-protection change there just be reverted?
As per the changelog: gcc-9 (9.1.0-3) experimental; urgency=medium * Update to SVN 20190526 (r271629) from the gcc-9-branch. - Fix PR libgomp/90527, PR c++/90532, PR libstdc++/90299, PR libstdc++/90454, PR debug/90197, PR pch/90326, PR c++/90484, PR tree-optimization/90385, PR c++/90383, PR tree-optimization/90303, PR tree-optimization/90316, PR tree-optimization/90316, PR libstdc++/90220, PR libstdc++/90557, PR sanitizer/90570, PR target/90547 (x86), PR libfortran/90038, PR fortran/90498, PR libfortran/90038, PR libfortran/90038, PR fortran/54613, PR fortran/54613, PR libstdc++/85965, PR target/90530 (PARISC), PR c++/90572. * Turn on -fstack-clash-protection and -fcf-protection in Ubuntu 19.10 on supported architectures. * Fix PR bootstrap/87338 on ia64 (James Clarke). Addresses: #927976. * Enable LTO builds on 64bit architectures. * Update libstdc++ symbols files for gcc-4-compatible builds. * Build the nvptx offload compiler on ppc64el. * Build the libgomp-hsa plugin. -- Matthias Klose <d...@debian.org> Sun, 26 May 2019 17:59:59 +0200 -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1830961 Title: Kernels & kernel drivers fail to build with gcc-9 [error: ‘-mindirect- branch’ and ‘-fcf-protection’ are not compatible] Status in gcc-9 package in Ubuntu: Confirmed Status in linux package in Ubuntu: Confirmed Status in nvidia-graphics-drivers-430 package in Ubuntu: Fix Committed Status in virtualbox package in Ubuntu: Confirmed Status in xtables-addons package in Ubuntu: New Bug description: Compiling kernels & kernel modules fails due to these errors: ./include/linux/compiler.h:193:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible (This happens with any kernel modules.) This appears to be due to the changes in 9.1.0-3ubuntu1 enabling -fcf- protection by default on 19.10's gcc-9. Switching to gcc-8 allows compilation to proceed. WORKAROUND: sudo ln -fs gcc-8 /usr/bin/gcc To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gcc-9/+bug/1830961/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp