summaryrefslogtreecommitdiff
path: root/rules.mak
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2016-06-23 10:39:18 -0700
committerRichard Henderson <rth@twiddle.net>2016-07-05 20:50:11 -0700
commit5f6f0e27fb242fe985591b16ad604ac52822a0dd (patch)
tree43a90cb961dc1b5840958532de22bd699e7c1629 /rules.mak
parent791b7d2340cfafcac9af7864343cf23504d57804 (diff)
downloadqemu-5f6f0e27fb242fe985591b16ad604ac52822a0dd.tar.gz
build: Use $(CCAS) for compiling .S files
We fail to pass to $(AS) all of the different flags that may be required for a given set of CFLAGS. Rather than figuring out the host-specific mapping, it's better to allow the compiler driver to do that. However, simply using $(CC) runs afoul of clang trying to build the option roms. C.f. 3dd46c78525a30e98c68, wherein we changed from using $(CC) to using $(AS) in the first place. Work around this by passing -fno-integrated-as to clang, so that we use the external assembler, and the clang driver still passes along all of the options that the assembler might require. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net> Message-Id: <1466703558-7723-1-git-send-email-rth@twiddle.net>
Diffstat (limited to 'rules.mak')
-rw-r--r--rules.mak7
1 files changed, 2 insertions, 5 deletions
diff --git a/rules.mak b/rules.mak
index 72c5955954..7d7d83b124 100644
--- a/rules.mak
+++ b/rules.mak
@@ -68,11 +68,8 @@ LINK = $(call quiet-command, $(LINKPROG) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o
$(call process-archive-undefs, $1) \
$(version-obj-y) $(call extract-libs,$1) $(LIBS)," LINK $(TARGET_DIR)$@")
-%.asm: %.S
- $(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -o $@ $<," CPP $(TARGET_DIR)$@")
-
-%.o: %.asm
- $(call quiet-command,$(AS) $(ASFLAGS) -o $@ $<," AS $(TARGET_DIR)$@")
+%.o: %.S
+ $(call quiet-command,$(CCAS) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<," AS $(TARGET_DIR)$@")
%.o: %.cc
$(call quiet-command,$(CXX) $(QEMU_INCLUDES) $(QEMU_CXXFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) $($@-cflags) -c -o $@ $<," CXX $(TARGET_DIR)$@")