qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] build: Use $(CC) for compiling .S files


From: Richard Henderson
Subject: [Qemu-devel] [PATCH] build: Use $(CC) for compiling .S files
Date: Fri, 17 Jun 2016 23:47:12 -0700

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.

This fixes e.g. ../configure --cpu=i686, but would also
be required for ppc and sparc.

Signed-off-by: Richard Henderson <address@hidden>
---
 rules.mak | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/rules.mak b/rules.mak
index 72c5955..f16598b 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,$(CC) $(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) $(address@hidden) -c -o $@ $<,"  CXX   
$(TARGET_DIR)$@")
-- 
2.5.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]