aboutsummaryrefslogtreecommitdiff
path: root/utils/qemu/patches/0005-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch
blob: 3774be35f9a34005a89539d1a650e9a1ab6fd2d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 905f3b7b6115f303f964b5aa1d3bc9bdae9d5bec Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Sat, 24 Feb 2018 13:46:31 +0800
Subject: [PATCH] pc-bios: fix compilation when $(AS) is actually gcc driver

---
 pc-bios/optionrom/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/pc-bios/optionrom/Makefile
+++ b/pc-bios/optionrom/Makefile
@@ -35,7 +35,7 @@ override CFLAGS += -m32 -include $(SRC_D
 endif
 
 Wa = -Wa,
-override ASFLAGS += -32
+override ASFLAGS += $(Wa)-32
 override CFLAGS += $(call cc-option, $(Wa)-32)
 
 LD_I386_EMULATION ?= elf_i386
@@ -44,7 +44,7 @@ override LDFLAGS = -m $(LD_I386_EMULATIO
 pvh.img: pvh.o pvh_main.o
 
 %.o: %.S
-	$(call quiet-command,$(CPP) $(CPPFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@,"AS","$@")
+	$(call quiet-command,$(CPP) $(CPPFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@ -x assembler -,"AS","$@")
 
 %.o: %.c
 	$(call quiet-command,$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@,"CC","$@")