Commit 3c87f43bd4be56bc47fb105bc0b76f4eaee83088
Committed by
Anthony Liguori
1 parent
791e08c7
use cc-option for optionrom
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing
1 changed file
with
1 additions
and
21 deletions
pc-bios/optionrom/Makefile
... | ... | @@ -5,29 +5,9 @@ include ../../rules.mak |
5 | 5 | |
6 | 6 | VPATH=$(SRC_PATH)/pc-bios/optionrom |
7 | 7 | |
8 | -# from kernel sources - scripts/Kbuild.include | |
9 | -# try-run | |
10 | -# Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise) | |
11 | -# Exit code chooses option. "$$TMP" is can be used as temporary file and | |
12 | -# is automatically cleaned up. | |
13 | -try-run = $(shell set -e; \ | |
14 | - TMP="$(TMPOUT).$$$$.tmp"; \ | |
15 | - if ($(1)) >/dev/null 2>&1; \ | |
16 | - then echo "$(2)"; \ | |
17 | - else echo "$(3)"; \ | |
18 | - fi; \ | |
19 | - rm -f "$$TMP") | |
20 | - | |
21 | -# cc-option-yn | |
22 | -# Usage: flag := $(call cc-option-yn,-march=winchip-c6) | |
23 | -cc-option-yn = $(call try-run,\ | |
24 | - $(CC) $(KBUILD_CFLAGS) $(1) -S -xc /dev/null -o "$$TMP",y,n) | |
25 | - | |
26 | 8 | CPPFLAGS = -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin |
27 | 9 | CPPFLAGS += -I$(SRC_PATH) |
28 | -ifeq ($(call cc-option-yn,-fno-stack-protector),y) | |
29 | -CPPFLAGS += -fno-stack-protector | |
30 | -endif | |
10 | +CPPFLAGS += $(call cc-option, $(CFLAGS), -fno-stack-protector,"") | |
31 | 11 | |
32 | 12 | build-all: multiboot.bin |
33 | 13 | ... | ... |