[coreboot-gerrit] Change in coreboot[master]: buildgcc: Do not try to install GCC if build failed

Nico Huber (Code Review) gerrit at coreboot.org
Wed May 23 17:14:51 CEST 2018


Nico Huber has uploaded this change for review. ( https://review.coreboot.org/26496


Change subject: buildgcc: Do not try to install GCC if build failed
......................................................................

buildgcc: Do not try to install GCC if build failed

We didn't bail out if configuring or building of GCC failed but run
`make install` and later steps instead. This resulted in very confusing
logs that concealed the actual error.

Change-Id: Ia064e0bfd96f0cbad391da3bb19e4dc304d988ff
Signed-off-by: Nico Huber <nico.h at gmx.de>
---
M util/crossgcc/buildgcc
1 file changed, 4 insertions(+), 4 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/96/26496/1

diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index 9068e86..93c8aad 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -751,12 +751,12 @@
 		--with-gmp=$DESTDIR$TARGETDIR --with-mpfr=$DESTDIR$TARGETDIR \
 		--with-mpc=$DESTDIR$TARGETDIR \
 		--with-pkgversion="coreboot toolchain v$CROSSGCC_VERSION $CROSSGCC_DATE" \
-		|| touch .failed
-	$MAKE $JOBS CFLAGS_FOR_BUILD="$HOSTCFLAGS" all-gcc || touch .failed
+		&& \
+	$MAKE $JOBS CFLAGS_FOR_BUILD="$HOSTCFLAGS" all-gcc && \
 	$MAKE install-gcc DESTDIR=$DESTDIR || touch .failed
 
-	if [ "$(echo $TARGETARCH | grep -c -- -mingw32)" -eq 0 ]; then
-		$MAKE $JOBS CFLAGS_FOR_BUILD="$HOSTCFLAGS" all-target-libgcc || touch .failed
+	if [ ! -f .failed -a "$(echo $TARGETARCH | grep -c -- -mingw32)" -eq 0 ]; then
+		$MAKE $JOBS CFLAGS_FOR_BUILD="$HOSTCFLAGS" all-target-libgcc && \
 		$MAKE install-target-libgcc DESTDIR=$DESTDIR || touch .failed
 	fi
 }

-- 
To view, visit https://review.coreboot.org/26496
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: Ia064e0bfd96f0cbad391da3bb19e4dc304d988ff
Gerrit-Change-Number: 26496
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h at gmx.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180523/196ba17c/attachment-0001.html>


More information about the coreboot-gerrit mailing list