Skip to content
Snippets Groups Projects
Commit 336d5881 authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

optionrom: cope with multiple -O options


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: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 61601835
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment