aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorperl <perl@immunant.com>2021-11-16 14:37:00 -0800
committerperl <perl@immunant.com>2021-11-16 14:37:00 -0800
commit44a0c36c76aa8ddc01f5c874f80c11c82eb74cf2 (patch)
tree1348cffdb6805ef18c4f6570514366ae7a259a00
parent0bfea6599b8a3ebd2c3f98bf6e0d2705e5cb609c (diff)
downloadqemu-7.0.0.tar.gz
pc-bios/optionrom: Drop -fcf-protectionqemu-7.0.0
Earlier this year, Ubuntu gcc packages turned on -fcf-protection which causes build failures for the optionrom code likely because it builds with -march=i486 and -fcf-protection is only supported for i686 targets or newer. Test: checkout and build trusty with GCC 11.2.0 or newer. Bug: None Change-Id: I735ab4b5d840254968217bfe016b9d52f483536f
-rw-r--r--pc-bios/optionrom/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
index a9a9e5e7eb..9c31ba63d8 100644
--- a/pc-bios/optionrom/Makefile
+++ b/pc-bios/optionrom/Makefile
@@ -18,6 +18,7 @@ override CFLAGS += -march=i486
# Drop -fstack-protector and the like
QEMU_CFLAGS := $(filter -W%, $(QEMU_CFLAGS)) $(CFLAGS_NOPIE) -ffreestanding
QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -fno-stack-protector)
+QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -fcf-protection=none)
QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -m16)
ifeq ($(filter -m16, $(QEMU_CFLAGS)),)
# Attempt to work around compilers that lack -m16 (GCC <= 4.8, clang <= ??)