From b75a08b1992902d1c2895e093b5d08d6e36211c2 Mon Sep 17 00:00:00 2001 From: Stefan Tauner Date: Wed, 1 Aug 2018 06:57:36 +0200 Subject: xgcc: fix grouping of conditions in buildgcc for Ada No idea where the escaped parentheses come from but they are no good. Without this patch I see errors with bash and dash: ./buildgcc: line 1198: (: command not found ./buildgcc: line 1199: (: command not found The patch uses curly brackets for grouping since they don't launch a subshell - unlike using unescaped parentheses which would work too. shellcheck is happy with either variant (and the original one(!)). Change-Id: I44fbc659f5b54515e43e85680b1ab0a824b781a7 Signed-off-by: Stefan Tauner Reviewed-on: https://review.coreboot.org/27771 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Patrick Georgi Reviewed-by: Nico Huber --- util/crossgcc/buildgcc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'util') diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index 5823707acf..08ba3c171d 100755 --- a/util/crossgcc/buildgcc +++ b/util/crossgcc/buildgcc @@ -1195,9 +1195,9 @@ fi if ada_requested; then if have_gnat; then if [ "$BOOTSTRAP" != 1 ] && \ - \( [ "$(hostcc_major)" -lt 4 ] || \ - \( [ "$(hostcc_major)" -eq 4 ] && \ - [ "$(hostcc_minor)" -lt 9 ] \) \) ] + { [ "$(hostcc_major)" -lt 4 ] || \ + { [ "$(hostcc_major)" -eq 4 ] && \ + [ "$(hostcc_minor)" -lt 9 ] ; } ; } then printf "\n${red}WARNING${NC}\n" printf "Building the Ada compiler (GNAT $(buildcc_version)) with a host compiler older\n" -- cgit v1.2.3