No need to setup include paths with .s files
[coreboot.git] / src / arch / x86 / Makefile.inc
index c9cbb01b4a77ea9fdd9ebf2df88f3b65d872cfef..75546f1d0a1269d2c125a59efed7393d291542a1 100755 (executable)
@@ -318,7 +318,7 @@ $(obj)/bootblock/bootblock.S: $$(bootblock_inc)
 
 $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.o: $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.s
        @printf "    CC         $(subst $(obj)/,,$(@))\n"
-       $(CC) -I$(obj) -Wa,-acdlns -c -o $@ $<  > $(dir $@)/crt0.disasm
+       $(CC) -Wa,-acdlns -c -o $@ $<  > $(dir $@)/crt0.disasm
 
 $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.s: $(obj)/bootblock/bootblock.S $(obj)/config.h $(obj)/build.h
        @printf "    CC         $(subst $(obj)/,,$(@))\n"
@@ -346,7 +346,7 @@ $(obj)/coreboot.romstage: $(obj)/coreboot.pre1 $$(romstage-objs) $(obj)/romstage
        $(CC) -nostdlib -nostartfiles -static -o $(obj)/romstage.elf -L$(obj) -T $(obj)/romstage/ldscript.ld $(romstage-objs)
        $(OBJCOPY) -O binary $(obj)/romstage.elf $(obj)/romstage.bin
        printf "CONFIG_ROMBASE = 0x" > $(obj)/location.ld
-       $(CBFSTOOL) $(obj)/coreboot.pre1 locate $(obj)/romstage.bin $(CONFIG_CBFS_PREFIX)/romstage $(CONFIG_XIP_ROM_SIZE) > $(obj)/location.txt
+       $(CBFSTOOL) $(obj)/coreboot.pre1 locate $(obj)/romstage.bin $(CONFIG_CBFS_PREFIX)/romstage $(CONFIG_XIP_ROM_SIZE) > $(obj)/location.txt || { echo "The romstage is larger than XIP size. Please expand the CONFIG_XIP_ROM_SIZE" ; exit 1; }
        cat $(obj)/location.txt >> $(obj)/location.ld
        printf ';\n' >> $(obj)/location.ld
        $(CC) -nostdlib -nostartfiles -static -o $(obj)/romstage.elf -L$(obj) -T $(obj)/romstage/ldscript.ld $(romstage-objs)
@@ -368,7 +368,7 @@ $(obj)/romstage/crt0.S: $$(crt0s)
 
 $(obj)/mainboard/$(MAINBOARDDIR)/crt0.romstage.o: $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s
        @printf "    CC         $(subst $(obj)/,,$(@))\n"
-       $(CC) -I$(obj) -Wa,-acdlns -c -o $@ $<  > $(dir $@)/crt0.disasm
+       $(CC) -Wa,-acdlns -c -o $@ $<  > $(dir $@)/crt0.disasm
 
 $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s: $(obj)/romstage/crt0.S $(obj)/config.h $(obj)/build.h
        @printf "    CC         $(subst $(obj)/,,$(@))\n"