openwrt-packages/utils/qemu/patches/0005-pc-bios-fix-compilatio...

30 lines
978 B
Diff

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","$@")