[Bug 1940029] Re: Default of fcf-protection should only be enabled where it can work
Launchpad Bug Tracker
1940029 at bugs.launchpad.net
Thu Mar 31 23:59:37 UTC 2022
This bug was fixed in the package gcc-10 - 10.3.0-15ubuntu1
---------------
gcc-10 (10.3.0-15ubuntu1) jammy; urgency=medium
* Merge with Debian; remaining changes:
- Build from upstream sources.
gcc-10 (10.3.0-15) unstable; urgency=medium
* Update to git 20220324 from the gcc-10 branch.
- Fix PR tree-optimization/103237, PR middle-end/103181,
PR middle-end/103248, PR tree-optimization/102798, PR ipa/102762,
PR tree-optimization/100923, PR tree-optimization/101158,
PR target/103627 (PPC), PR target/103627 (PPC), PR target/104469 (x86),
PR target/104458 (x86), PR target/104451 (x86), PR target/104090 (PPC),
PR middle-end/95115, PR target/102976 (PPC), PR ada/103538,
PR ada/103538, PR fortran/104619, PR fortran/104311, PR fortran/104331,
PR fortran/83079, PR fortran/104127, PR fortran/104227,
PR fortran/101762, PR fortran/67804, PR fortran/103782,
PR fortran/103692, PR fortran/102332, PR sanitizer/102911,
PR libstdc++/102358, PR target/87496 (PPC), PR target/104208 (PPC),
PR target/104453 (x86), PR tree-optimization/104511,
PR target/100784 (x86), PR target/104253 (PPC).
* Support the ld.mold linker, patch taken from the trunk.
* Don't enable -fcf-protection with -m16 and -m32. LP: #1940029.
* Don't run the tests on ppc64 and sh4, hanging on the buildds.
-- Matthias Klose <doko at ubuntu.com> Thu, 24 Mar 2022 13:12:38 +0100
** Changed in: gcc-10 (Ubuntu)
Status: Fix Committed => Fix Released
** Changed in: gcc-11 (Ubuntu)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-10 in Ubuntu.
https://bugs.launchpad.net/bugs/1940029
Title:
Default of fcf-protection should only be enabled where it can work
Status in gcc-10 package in Ubuntu:
Fix Released
Status in gcc-11 package in Ubuntu:
Fix Released
Status in gcc-12 package in Ubuntu:
Fix Committed
Status in qemu package in Ubuntu:
Fix Released
Bug description:
Hi,
I've happened to find this breaking a qemu build that was breaking like:
c -MMD -MP -MT linuxboot_dma.o -MF ./linuxboot_dma.d -O2 -g -march=i486 -Wall -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes -Wformat -Werror=format-security -Wdate-time -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fno-pie -ffreestanding -I/<<PKGBUILDDIR>>/pc-bios/optionrom//../../include -fno-stack-protector -m16 -Wa,-32 -c /<<PKGBUILDDIR>>/pc-bios/optionrom/linuxboot_dma.c -o linuxboot_dma.o
cc1: error: ‘-fcf-protection’ is not compatible with this target
As usual this looks complex but it can be reduced to your favorite C
hello world.
It should work if you build it with:
$ cc -Wall -Werror test.c -o test.o
But the following will fail:
$ cc -Wall -Werror -march=i486 -m16 test.c -o test.o
cc1: error: ‘-fcf-protection’ is not compatible with this target
This is some of the always crazy boot blobs that virtualization needs here and there - and I hope I can resolve it for qemu in the build. But in general while I think the fcf default (https://wiki.ubuntu.com/ToolChain/CompilerFlags#A-fcf-protection) is ok, it should not be default on arch combinations where it can never work.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-10/+bug/1940029/+subscriptions
More information about the foundations-bugs
mailing list