x86: only build disassembly with gcc
The assembler options are specific to the gnu toolchain. Change-Id: I8424767ef186ef2d4c18bfbcae1f54e0da2e4f47 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/4715 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
This commit is contained in:
parent
938ef9fb8d
commit
327a86603c
|
@ -27,6 +27,12 @@ subdirs-y += boot
|
||||||
subdirs-y += lib
|
subdirs-y += lib
|
||||||
subdirs-y += smp
|
subdirs-y += smp
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_COMPILER_GCC),y)
|
||||||
|
DISASSEMBLY=-Wa,-acdlns
|
||||||
|
else
|
||||||
|
DISASSEMBLY=
|
||||||
|
endif
|
||||||
|
|
||||||
OPTION_TABLE_H:=
|
OPTION_TABLE_H:=
|
||||||
ifeq ($(CONFIG_HAVE_OPTION_TABLE),y)
|
ifeq ($(CONFIG_HAVE_OPTION_TABLE),y)
|
||||||
cbfs-files-y += cmos_layout.bin
|
cbfs-files-y += cmos_layout.bin
|
||||||
|
@ -365,7 +371,7 @@ $(objgenerated)/bootblock_inc.S: $$(bootblock_inc)
|
||||||
|
|
||||||
$(objgenerated)/bootblock.o: $(objgenerated)/bootblock.s
|
$(objgenerated)/bootblock.o: $(objgenerated)/bootblock.s
|
||||||
@printf " CC $(subst $(obj)/,,$(@))\n"
|
@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
|
$(objgenerated)/bootblock.s: $(objgenerated)/bootblock_inc.S $(obj)/config.h $(obj)/build.h
|
||||||
@printf " CC $(subst $(obj)/,,$(@))\n"
|
@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
|
$(objcbfs)/bootblock.debug: $(objgenerated)/bootblock.o $(objgenerated)/bootblock.ld
|
||||||
@printf " LINK $(subst $(obj)/,,$(@))\n"
|
@printf " LINK $(subst $(obj)/,,$(@))\n"
|
||||||
ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y)
|
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
|
else
|
||||||
$(CC) -nostdlib -nostartfiles -static -o $@ -L$(obj) -T $(objgenerated)/bootblock.ld $<
|
$(CC) -nostdlib -nostartfiles -static -o $@ -L$(obj) -T $(objgenerated)/bootblock.ld $<
|
||||||
endif
|
endif
|
||||||
|
@ -434,7 +440,7 @@ $(objgenerated)/crt0.romstage.S: $$(crt0s)
|
||||||
|
|
||||||
$(objgenerated)/crt0.romstage.o: $(objgenerated)/crt0.s
|
$(objgenerated)/crt0.romstage.o: $(objgenerated)/crt0.s
|
||||||
@printf " CC $(subst $(obj)/,,$(@))\n"
|
@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
|
$(objgenerated)/crt0.s: $(objgenerated)/crt0.romstage.S $(obj)/config.h $(obj)/build.h
|
||||||
@printf " CC $(subst $(obj)/,,$(@))\n"
|
@printf " CC $(subst $(obj)/,,$(@))\n"
|
||||||
|
|
Loading…
Reference in New Issue