Public bug reported:

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.

** Affects: gcc-11 (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: qemu (Ubuntu)
     Importance: Undecided
         Status: New

** Also affects: qemu (Ubuntu)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1940029

Title:
  Default of fcf-protection should only be enabled where it can work

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-11/+bug/1940029/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to