[coreboot-gerrit] New patch to review for coreboot: util/crossgcc/buildgcc: correct clang test

Aaron Durbin (adurbin@chromium.org) gerrit at coreboot.org
Fri Apr 8 00:02:59 CEST 2016


Aaron Durbin (adurbin at chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14281

-gerrit

commit abf4ca3eb9dd2c31cdf1bbbbf466523be4a3c15e
Author: Aaron Durbin <adurbin at chromium.org>
Date:   Thu Apr 7 16:58:10 2016 -0500

    util/crossgcc/buildgcc: correct clang test
    
    On certain versions of /bin/sh the following sequence
    causes problems.
    '$CC --version | grep clang &>/dev/null && ...'
    
    I'm not sure how bash handles that case, but it's effectively
    forking grep off into the background and always evaluating an
    empty statement to /dev/null while unconditionally running
    whatever follows &&.
    
    Change-Id: Ie3a2ebb12226434d50a7b2a7e254c8b80ae4c46b
    Signed-off-by: Aaron Durbin <adurbin at chromium.org>
---
 util/crossgcc/buildgcc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index e2a30d8..049c3e1 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -455,7 +455,7 @@ build_BINUTILS() {
 
 build_GCC() {
 	# Work around crazy code generator in GCC that confuses CLANG.
-	$CC --version | grep clang &>/dev/null &&
+	$CC --version | grep clang >/dev/null &&
 		HOSTCFLAGS="$HOSTCFLAGS -fbracket-depth=1024"
 
 	# GCC does not honor HOSTCFLAGS at all. CFLAGS are used for



More information about the coreboot-gerrit mailing list