qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH for-2.7] optionrom: cope with multiple -O options


From: Paolo Bonzini
Subject: [Qemu-devel] [PATCH for-2.7] optionrom: cope with multiple -O options
Date: Tue, 30 Aug 2016 14:30:26 +0200

Reproducer:

    CFLAGS="-g3 -O0" ./configure --target-list=aarch64-softmmu,arm-softmmu 
--enable-vhost-net --enable-virtfs

Here CFLAGS ends up with "-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 ... -g3 -O0"
and pc-bios/optionrom/Makefile forgets to add the -O2 it needs.

Signed-off-by: Paolo Bonzini <address@hidden>
---
 pc-bios/optionrom/Makefile | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
index 9bdc497..afa48f1 100644
--- a/pc-bios/optionrom/Makefile
+++ b/pc-bios/optionrom/Makefile
@@ -10,10 +10,7 @@ $(call set-vpath, $(SRC_PATH)/pc-bios/optionrom)
 .PHONY : all clean build-all
 
 # Compiling with no optimization creates ROMs that are too large
-ifeq ($(filter -O%, $(CFLAGS)),)
-override CFLAGS += -O2
-endif
-ifeq ($(filter -O%, $(CFLAGS)),-O0)
+ifeq ($(lastword $(filter -O%, -O0 $(CFLAGS))),-O0)
 override CFLAGS += -O2
 endif
 
-- 
2.7.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]