From 327a86603c861ece294f1c9db5875a178bcbcc76 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Sat, 18 Jan 2014 16:26:11 +0100 Subject: [PATCH] x86: only build disassembly with gcc The assembler options are specific to the gnu toolchain. Change-Id: I8424767ef186ef2d4c18bfbcae1f54e0da2e4f47 Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/4715 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Edward O'Callaghan --- src/arch/x86/Makefile.inc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc index 80e731f323..4b2869738c 100644 --- a/src/arch/x86/Makefile.inc +++ b/src/arch/x86/Makefile.inc @@ -27,6 +27,12 @@ subdirs-y += boot subdirs-y += lib subdirs-y += smp +ifeq ($(CONFIG_COMPILER_GCC),y) +DISASSEMBLY=-Wa,-acdlns +else +DISASSEMBLY= +endif + OPTION_TABLE_H:= ifeq ($(CONFIG_HAVE_OPTION_TABLE),y) cbfs-files-y += cmos_layout.bin @@ -365,7 +371,7 @@ $(objgenerated)/bootblock_inc.S: $$(bootblock_inc) $(objgenerated)/bootblock.o: $(objgenerated)/bootblock.s @printf " CC $(subst $(obj)/,,$(@))\n" - $(CC) -Wa,-acdlns -c -o $@ $< > $(basename $@).disasm + $(CC) $(DISASSEMBLY) -c -o $@ $< > $(basename $@).disasm $(objgenerated)/bootblock.s: $(objgenerated)/bootblock_inc.S $(obj)/config.h $(obj)/build.h @printf " CC $(subst $(obj)/,,$(@))\n" @@ -380,7 +386,7 @@ $(objgenerated)/bootblock.inc: $(src)/arch/x86/init/$(subst ",,$(CONFIG_BOOTBLOC $(objcbfs)/bootblock.debug: $(objgenerated)/bootblock.o $(objgenerated)/bootblock.ld @printf " LINK $(subst $(obj)/,,$(@))\n" ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y) - $(LD) -m elf_i386 -static -o $@.tmp -L$(obj) $< -T $(objgenerated)/bootblock.ld + $(LD) -m elf_i386 -static -o $@ -L$(obj) $< -T $(objgenerated)/bootblock.ld else $(CC) -nostdlib -nostartfiles -static -o $@ -L$(obj) -T $(objgenerated)/bootblock.ld $< endif @@ -434,7 +440,7 @@ $(objgenerated)/crt0.romstage.S: $$(crt0s) $(objgenerated)/crt0.romstage.o: $(objgenerated)/crt0.s @printf " CC $(subst $(obj)/,,$(@))\n" - $(CC) -Wa,-acdlns -c -o $@ $< > $(basename $@).disasm + $(CC) $(DISASSEMBLY) -c -o $@ $< > $(basename $@).disasm $(objgenerated)/crt0.s: $(objgenerated)/crt0.romstage.S $(obj)/config.h $(obj)/build.h @printf " CC $(subst $(obj)/,,$(@))\n"