When I upgraded from VirtualBox 6.1.34 to 6.1.36, the build suddenly failed. From the logs I found it is due to my CFLAGS (or CXXFLAGS, which are the same): /etc/portage/make.conf: COMMON_FLAGS="-O2 -pipe" COMMON_ARCH_FLAGS="-march=znver3" COMMON_MITIGATION_FLAGS="-fstack-protector-strong -fno-plt -fexceptions -fcf-protection" CFLAGS="${COMMON_ARCH_FLAGS} ${COMMON_FLAGS} ${COMMON_MITIGATION_FLAGS}" CXXFLAGS="${COMMON_ARCH_FLAGS} ${COMMON_FLAGS} ${COMMON_MITIGATION_FLAGS}" FCFLAGS="${COMMON_ARCH_FLAGS} ${COMMON_FLAGS} ${COMMON_MITIGATION_FLAGS}" FFLAGS="${COMMON_ARCH_FLAGS} ${COMMON_FLAGS} ${COMMON_MITIGATION_FLAGS}" LDFLAGS="-Wl,-O2 -Wl,--as-needed -Wl,--sort-common -Wl,--hash-style=both -Wl,-z,relro -Wl,-z,now ${COMMON_MITIGATION_FLAGS}" Build error from the log: cc1: error: ‘-fcf-protection’ is not compatible with this target The build works without -fcf-protection. Maybe it would be possible to a) filter out -fcf-protection or b) make it compile again with this flag (since we are on Gentoo Linux, it should be the users choice). Reproducible: Always
Created attachment 799861 [details] build log
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30a5e942654517bbb07962187a4a619b281ff3ca commit 30a5e942654517bbb07962187a4a619b281ff3ca Author: Viorel Munteanu <ceamac.paragon@gmail.com> AuthorDate: 2022-08-17 06:52:07 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-08-18 18:42:14 +0000 app-emulation/virtualbox: Fix compilation with -fcf-protection Closes: https://bugs.gentoo.org/865361 Signed-off-by: Viorel Munteanu <ceamac.paragon@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/26889 Signed-off-by: Sam James <sam@gentoo.org> .../files/virtualbox-6.1.36-fcf-protection.patch | 16 ++++++++++++++++ app-emulation/virtualbox/virtualbox-6.1.36-r1.ebuild | 3 +++ 2 files changed, 19 insertions(+)
Thanks!