[coreboot-gerrit] New patch to review for coreboot: 11dbd0b Makefile.inc: Use response files to avoid Windows build fail

Scott Duplichan (scott@notabs.org) gerrit at coreboot.org
Sat Dec 13 05:15:45 CET 2014


Scott Duplichan (scott at notabs.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7792

-gerrit

commit 11dbd0bd2947ea888a494658469c78bc5ff29aed
Author: Scott Duplichan <scott at notabs.org>
Date:   Fri Dec 12 22:13:51 2014 -0600

    Makefile.inc: Use response files to avoid Windows build fail
    
    Windows has a 32KB length limitation on the command line passed to an
    application such as gcc, ld or ar. In some cases a Windows hosted coreboot
    build fails due to this length limit. Use response files to keep command
    length less than 32KB so that Windows abuild can pass.
    
    Change-Id: I69bf9bcf8d22a8856cc49269ceb972ad7d64aae0
    Signed-off-by: Scott Duplichan <scott at notabs.org>
---
 src/arch/x86/Makefile.inc                   | 9 +++++++--
 src/vendorcode/amd/agesa/f10/Makefile.inc   | 5 ++++-
 src/vendorcode/amd/agesa/f14/Makefile.inc   | 5 ++++-
 src/vendorcode/amd/agesa/f15/Makefile.inc   | 5 ++++-
 src/vendorcode/amd/agesa/f15tn/Makefile.inc | 5 ++++-
 5 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index a92c55c..23f7260 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -203,9 +203,12 @@ romstage-srcs += $(objgenerated)/crt0.s
 
 romstage-libs ?=
 
+response-file := $(shell mktemp)
 $(objcbfs)/romstage_null.debug: $$(romstage-objs) $(objgenerated)/romstage_null.ld $$(romstage-libs)
 	@printf "    LINK       $(subst $(obj)/,,$(@))\n"
-	$(LD_romstage) -nostdlib -nostartfiles -static -o $@ -L$(obj) $(COMPILER_RT_FLAGS_romstage) --start-group $(romstage-objs) $(romstage-libs) $(COMPILER_RT_romstage) --end-group -T $(objgenerated)/romstage_null.ld
+	echo $(romstage-objs) > $(response-file)
+	$(LD_romstage) -nostdlib -nostartfiles -static -o $@ -L$(obj) $(COMPILER_RT_FLAGS_romstage) --start-group @$(response-file) $(romstage-libs) $(COMPILER_RT_romstage) --end-group -T $(objgenerated)/romstage_null.ld
+	rm $(response-file)
 	$(OBJCOPY_romstage) --only-section .illegal_globals $(@) $(objcbfs)/romstage_null.offenders && \
 	$(NM_romstage) $(objcbfs)/romstage_null.offenders | grep -q ""; if [ $$? -eq 0 ]; then \
 		echo "Forbidden global variables in romstage:"; \
@@ -214,7 +217,9 @@ $(objcbfs)/romstage_null.debug: $$(romstage-objs) $(objgenerated)/romstage_null.
 
 $(objcbfs)/romstage.debug: $$(romstage-objs) $(objgenerated)/romstage.ld $$(romstage-libs)
 	@printf "    LINK       $(subst $(obj)/,,$(@))\n"
-	$(LD_romstage) -nostdlib -nostartfiles -static -o $@ -L$(obj) $(COMPILER_RT_FLAGS_romstage) --start-group $(romstage-objs) $(romstage-libs) $(COMPILER_RT_romstage) --end-group -T $(objgenerated)/romstage.ld
+	echo $(romstage-objs) > $(response-file)
+	$(LD_romstage) -nostdlib -nostartfiles -static -o $@ -L$(obj) $(COMPILER_RT_FLAGS_romstage) --start-group @$(response-file) $(romstage-libs) $(COMPILER_RT_romstage) --end-group -T $(objgenerated)/romstage.ld
+	rm $(response-file)
 
 $(objgenerated)/romstage_null.ld: $$(ldscripts) $(obj)/ldoptions
 	@printf "    GEN        $(subst $(obj)/,,$(@))\n"
diff --git a/src/vendorcode/amd/agesa/f10/Makefile.inc b/src/vendorcode/amd/agesa/f10/Makefile.inc
index b6b2c77..3cecce9 100644
--- a/src/vendorcode/amd/agesa/f10/Makefile.inc
+++ b/src/vendorcode/amd/agesa/f10/Makefile.inc
@@ -325,9 +325,12 @@ libagesa-y += Proc/CPU/Family/0x10/F10PmNbPstateInit.c
 ##C32
 #libagesa-y += Proc/Mem/Main/C32/mmflowC32.c
 
+response-file := $(shell mktemp)
 $(obj)/libagesa.fam10.a: $$(libagesa-objs)
 	@printf "    AGESA        $(subst $(obj)/,,$(@))\n"
-	ar rcs $@ $+
+	echo $(libagesa-objs) > $(response-file)
+	ar rcs $@ @$(response-file)
+	rm $(response-file)
 
 romstage-libs  += $(obj)/libagesa.fam10.a
 ramstage-libs  += $(obj)/libagesa.fam10.a
diff --git a/src/vendorcode/amd/agesa/f14/Makefile.inc b/src/vendorcode/amd/agesa/f14/Makefile.inc
index d1c8911..1adafe2 100644
--- a/src/vendorcode/amd/agesa/f14/Makefile.inc
+++ b/src/vendorcode/amd/agesa/f14/Makefile.inc
@@ -324,9 +324,12 @@ libagesa-y += Proc/GNB/Nb/NbPowerMgmt.c
 libagesa-y += Proc/Recovery/HT/htInitReset.c
 libagesa-y += Proc/Mem/Main/mu.c
 
+response-file := $(shell mktemp)
 $(obj)/libagesa.fam14.a: $$(libagesa-objs)
 	@printf " AGESA $(subst $(obj)/,,$(@))\n"
-	ar rcs $@ $+
+	echo $(libagesa-objs) > $(response-file)
+	ar rcs $@ @$(response-file)
+	rm $(response-file)
 
 romstage-libs += $(obj)/libagesa.fam14.a
 ramstage-libs += $(obj)/libagesa.fam14.a
diff --git a/src/vendorcode/amd/agesa/f15/Makefile.inc b/src/vendorcode/amd/agesa/f15/Makefile.inc
index d709199..bbba863 100644
--- a/src/vendorcode/amd/agesa/f15/Makefile.inc
+++ b/src/vendorcode/amd/agesa/f15/Makefile.inc
@@ -522,9 +522,12 @@ ifeq ($(CONFIG_CPU_AMD_SOCKET_AM3R2), y)
 	libagesa-y += Proc/Mem/Ps/RB/mpsRb3.c
 endif
 
+response-file := $(shell mktemp)
 $(obj)/libagesa.fam15.a: $$(libagesa-objs)
 	@printf "    AGESA        $(subst $(obj)/,,$(@))\n"
-	ar rcs $@ $+
+	echo $(libagesa-objs) > $(response-file)
+	ar rcs $@ @$(response-file)
+	rm $(response-file)
 
 romstage-libs  += $(obj)/libagesa.fam15.a
 ramstage-libs  += $(obj)/libagesa.fam15.a
diff --git a/src/vendorcode/amd/agesa/f15tn/Makefile.inc b/src/vendorcode/amd/agesa/f15tn/Makefile.inc
index 0de46b0..a176ada 100644
--- a/src/vendorcode/amd/agesa/f15tn/Makefile.inc
+++ b/src/vendorcode/amd/agesa/f15tn/Makefile.inc
@@ -515,9 +515,12 @@ libagesa-y += Proc/Fch/Usb/XhciLate.c
 libagesa-y += Proc/Fch/Usb/XhciMid.c
 libagesa-y += Proc/Fch/Usb/XhciReset.c
 
+response-file := $(shell mktemp)
 $(obj)/libagesa.fam15tn.a: $$(libagesa-objs)
 	@printf "    AGESA        $(subst $(obj)/,,$(@))\n"
-	ar rcs $@ $+
+	echo $(libagesa-objs) > $(response-file)
+	ar rcs $@ @$(response-file)
+	rm $(response-file)
 
 romstage-libs  += $(obj)/libagesa.fam15tn.a
 ramstage-libs  += $(obj)/libagesa.fam15tn.a



More information about the coreboot-gerrit mailing list