Received: from eggs.gnu.org ([2001:4830:134:3::10]:35389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEA2K-0002Kb-40 for qemu-devel@nongnu.org; Sat, 18 Jun 2016 02:47:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEA2F-0000MS-UU for qemu-devel@nongnu.org; Sat, 18 Jun 2016 02:47:19 -0400 Received: from mail-pa0-x242.google.com ([2607:f8b0:400e:c03::242]:35537) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEA2F-0000MM-NN for qemu-devel@nongnu.org; Sat, 18 Jun 2016 02:47:15 -0400 Received: by mail-pa0-x242.google.com with SMTP id hf6so7098973pac.2 for ; Fri, 17 Jun 2016 23:47:15 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Fri, 17 Jun 2016 23:47:12 -0700 Message-Id: <1466232432-27513-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH] build: Use $(CC) for compiling .S files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org 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 --- 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) $($@-cflags) -c -o $@ $<," CXX $(TARGET_DIR)$@") -- 2.5.5