aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pc-bios/optionrom/Makefile2
-rw-r--r--rules.mak2
2 files changed, 3 insertions, 1 deletions
diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
index d88ce119ce..72abb3c9a0 100644
--- a/pc-bios/optionrom/Makefile
+++ b/pc-bios/optionrom/Makefile
@@ -30,7 +30,7 @@ QEMU_INCLUDES += -I$(SRC_PATH)
Wa = -Wa,
ASFLAGS += -32
-QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), $(Wa)-32)
+QEMU_CFLAGS += $(call cc-c-option, $(QEMU_CFLAGS), $(Wa)-32)
build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin
diff --git a/rules.mak b/rules.mak
index ed8e482780..99cd0b3371 100644
--- a/rules.mak
+++ b/rules.mak
@@ -113,6 +113,8 @@ quiet-command = $(if $(V),$1,$(if $(2),@echo $2 && $1, @$1))
cc-option = $(if $(shell $(CC) $1 $2 -S -o /dev/null -xc /dev/null \
>/dev/null 2>&1 && echo OK), $2, $3)
+cc-c-option = $(if $(shell $(CC) $1 $2 -c -o /dev/null -xc /dev/null \
+ >/dev/null 2>&1 && echo OK), $2, $3)
VPATH_SUFFIXES = %.c %.h %.S %.cc %.cpp %.m %.mak %.texi %.sh %.rc
set-vpath = $(if $1,$(foreach PATTERN,$(VPATH_SUFFIXES),$(eval vpath $(PATTERN) $1)))