[coreboot-gerrit] Change in coreboot[master]: payloads/external/GRUB2: Pass the architecture to grub's configure sc...

Jonathan Neuschäfer (Code Review) gerrit at coreboot.org
Mon Jan 8 18:58:14 CET 2018


Jonathan Neuschäfer has uploaded this change for review. ( https://review.coreboot.org/23172


Change subject: payloads/external/GRUB2: Pass the architecture to grub's configure script
......................................................................

payloads/external/GRUB2: Pass the architecture to grub's configure script

This fixes the build on an ARM build machine, because GRUB2's build system
doesn't try to build *for* ARM anymore.

Change-Id: Ied7a5535cd93ffc2b69563a55e69dc7370db4793
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
---
M payloads/external/GRUB2/Makefile
1 file changed, 7 insertions(+), 1 deletion(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/23172/1

diff --git a/payloads/external/GRUB2/Makefile b/payloads/external/GRUB2/Makefile
index db15d46..e2d8293 100644
--- a/payloads/external/GRUB2/Makefile
+++ b/payloads/external/GRUB2/Makefile
@@ -24,6 +24,12 @@
 			git branch -f $(NAME-y) $(TAG-y) && \
 			git checkout $(NAME-y) || true
 
+ifeq ($(CONFIG_ARCH_X86),y)
+ARCH_TRIPLE=i386-linux-gnu
+else
+ARCH_TRIPLE=unsupported
+endif
+
 grub2/build/config.h: $(CONFIG_DEP) | checkout
 	echo "    CONFIG     GRUB2 $(NAME-y)"
 	rm -rf grub2/build
@@ -31,7 +37,7 @@
 	cd grub2 && ./autogen.sh
 	cd grub2/build && ../configure CC="$(HOSTCC)" LD="$(LD)" \
 	TARGET_CC="$(CC)" TARGET_OBJCOPY="$(OBJCOPY)" TARGET_STRIP="$(STRIP)" \
-	CFLAGS=-O2 TARGET_CFLAGS=-Os \
+	CFLAGS=-O2 TARGET_CFLAGS=-Os --host=$(ARCH_TRIPLE) \
 	--with-platform=coreboot --enable-boot-time --disable-werror
 
 config: grub2/build/config.h checkout

-- 
To view, visit https://review.coreboot.org/23172
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ied7a5535cd93ffc2b69563a55e69dc7370db4793
Gerrit-Change-Number: 23172
Gerrit-PatchSet: 1
Gerrit-Owner: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180108/c6387b70/attachment.html>


More information about the coreboot-gerrit mailing list