From b2229dc1997b22d6497ebc1664b2c710584e8117 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Thu, 7 Apr 2016 16:58:10 -0500 Subject: util/crossgcc/buildgcc: correct clang test On certain versions of /bin/sh the following sequence causes problems. '$CC --version | grep clang &>/dev/null && ...' The above is a bashish for 2>&1 >/dev/null. However, buildgcc is interpeted by /bin/sh which doesn't necessarily mean bash. On dash it's effectively forking grep off into the background and always evaluating an empty statement to /dev/null while unconditionally running whatever follows the &&. Change-Id: Ie3a2ebb12226434d50a7b2a7e254c8b80ae4c46b Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/14281 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- util/crossgcc/buildgcc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index e2a30d8981..a3da9c0908 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 2>&1 && \ HOSTCFLAGS="$HOSTCFLAGS -fbracket-depth=1024" # GCC does not honor HOSTCFLAGS at all. CFLAGS are used for -- cgit v1.2.3