mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 03:43:37 +08:00
use cc-option for optionrom
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
791e08c753
commit
3c87f43bd4
@ -5,29 +5,9 @@ include ../../rules.mak
|
||||
|
||||
VPATH=$(SRC_PATH)/pc-bios/optionrom
|
||||
|
||||
# from kernel sources - scripts/Kbuild.include
|
||||
# try-run
|
||||
# Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise)
|
||||
# Exit code chooses option. "$$TMP" is can be used as temporary file and
|
||||
# is automatically cleaned up.
|
||||
try-run = $(shell set -e; \
|
||||
TMP="$(TMPOUT).$$$$.tmp"; \
|
||||
if ($(1)) >/dev/null 2>&1; \
|
||||
then echo "$(2)"; \
|
||||
else echo "$(3)"; \
|
||||
fi; \
|
||||
rm -f "$$TMP")
|
||||
|
||||
# cc-option-yn
|
||||
# Usage: flag := $(call cc-option-yn,-march=winchip-c6)
|
||||
cc-option-yn = $(call try-run,\
|
||||
$(CC) $(KBUILD_CFLAGS) $(1) -S -xc /dev/null -o "$$TMP",y,n)
|
||||
|
||||
CPPFLAGS = -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin
|
||||
CPPFLAGS += -I$(SRC_PATH)
|
||||
ifeq ($(call cc-option-yn,-fno-stack-protector),y)
|
||||
CPPFLAGS += -fno-stack-protector
|
||||
endif
|
||||
CPPFLAGS += $(call cc-option, $(CFLAGS), -fno-stack-protector,"")
|
||||
|
||||
build-all: multiboot.bin
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user