[Bug 1830961] Re: Kernels & kernel drivers fail to build with gcc-9 [error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible]
Launchpad Bug Tracker
1830961 at bugs.launchpad.net
Mon Dec 2 11:15:13 UTC 2019
This bug was fixed in the package backport-iwlwifi-dkms -
7906-0ubuntu2~19.10.1
---------------
backport-iwlwifi-dkms (7906-0ubuntu2~19.10.1) eoan; urgency=low
* debian/patches/0006-NOUPSTREAM-backport-rename-ktime_get_boot_ns-for-v5..patch
- fix build against v5.3. (LP: #1848922)
* debian/patches/0005-Makefile.kernel-pass-fno-stack-clash-protection-and-.patch
- add -fcf-protection=none when using retpoline flags. (LP: #1830961)
- drop -fno-stack-clash-protection for it's no longer necessary.
-- You-Sheng Yang <vicamo.yang at canonical.com> Mon, 21 Oct 2019
20:22:27 +0800
** Changed in: backport-iwlwifi-dkms (Ubuntu Eoan)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-9 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 backport-iwlwifi-dkms package in Ubuntu:
Fix Released
Status in gcc-9 package in Ubuntu:
Won't Fix
Status in linux package in Ubuntu:
Fix Released
Status in nvidia-graphics-drivers-430 package in Ubuntu:
Fix Released
Status in virtualbox package in Ubuntu:
Won't Fix
Status in xtables-addons package in Ubuntu:
Won't Fix
Status in backport-iwlwifi-dkms source package in Eoan:
Fix Released
Status in gcc-9 source package in Eoan:
Won't Fix
Status in linux source package in Eoan:
Fix Released
Status in nvidia-graphics-drivers-430 source package in Eoan:
Fix Released
Status in virtualbox source package in Eoan:
Won't Fix
Status in xtables-addons source package in Eoan:
Won't Fix
Bug description:
[SRU Justification for backport-iwlwifi-dkms]
[Impact]
FTBFS against v5.3 kernels on Eoan/Focal.
[Fix]
* Backport fix from upstream commit f47729b94e11 (backport: rename ktime_get_boot_ns for v5.3+).
* Also updates -fcf-protection=none usage for bug
1830961.
[Test Case]
Verified DKMS module build on linux-oem/linux-oem-osp1/linux-generic >= 4.10 kernels on series Xenial/Bionic/Cosmic/Disco/Eoan and Focal.
[Regression Risk]
Low. There is no functional changes in comparison to 7906-0ubuntu1.
======== original 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/backport-iwlwifi-dkms/+bug/1830961/+subscriptions
More information about the foundations-bugs
mailing list