summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2014-06-03 17:28:22 +0100
committerKevin O'Connor <kevin@koconnor.net>2014-06-05 10:58:29 -0400
commit04b531ab15e60a3023ab7c4f48088ee15206ae7b (patch)
tree2370dac3ab7c8624e4b9e59b7a1ada9d9b333b94 /Makefile
parentec44fac1f69bd3d513204a6192623de511b11144 (diff)
downloadqemu-seabios-04b531ab15e60a3023ab7c4f48088ee15206ae7b.tar.gz
build: use -m16 where available instead of asm(".code16gcc")
GCC 4.9 and clang 3.5 support the -m16 option on the command line which supersedes the hackish ".code16gcc" assembler directive. Use it where possible. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index edc8d8d..d788ffe 100644
--- a/Makefile
+++ b/Makefile
@@ -61,13 +61,15 @@ COMMONCFLAGS := -I$(OUT) -Isrc -Os -MD -g \
COMMONCFLAGS += $(call cc-option,$(CC),-nopie,)
COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
+COMMA := ,
CFLAGS32FLAT := $(COMMONCFLAGS) -DMODE16=0 -DMODESEGMENT=0 -fomit-frame-pointer
CFLAGSSEG := $(COMMONCFLAGS) -DMODESEGMENT=1 -fno-defer-pop \
$(call cc-option,$(CC),-fno-jump-tables,-DMANUAL_NO_JUMP_TABLE) \
$(call cc-option,$(CC),-fno-tree-switch-conversion,)
CFLAGS32SEG := $(CFLAGSSEG) -DMODE16=0 -fomit-frame-pointer
-CFLAGS16INC := $(CFLAGSSEG) -DMODE16=1 -Wa,src/code16gcc.s \
+CFLAGS16INC := $(CFLAGSSEG) -DMODE16=1 \
+ $(call cc-option,$(CC),-m16,-Wa$(COMMA)src/code16gcc.s) \
$(call cc-option,$(CC),--param large-stack-frame=4,-fno-inline)
CFLAGS16 := $(CFLAGS16INC) -fomit-frame-pointer