Skip to content

Commit

Permalink
kbuild: fix buglet in gcc-version.sh
Browse files Browse the repository at this point in the history
Greg Schafer <gschafer@zip.com.au> reported:
====
$make mrproper
scripts/gcc-version.sh: [[: command not found

This is on a very old host with an ancient bash as /bin/sh. But I have
CONFIG_SHELL set and pointing to a modern bash. Something is wrong.

This doesn't happen with 2.6.23
====

Fixed using a more common string equality test.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Greg Schafer <gschafer@zip.com.au>
Cc: Jesper Juhl <jesper.juhl@gmail.com>
  • Loading branch information
Sam Ravnborg committed Jan 28, 2008
1 parent 899c384 commit 0484f12
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/gcc-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
# gcc-2.95.3, `030301' for gcc-3.3.1, etc.
#

if [[ $1 = "-p" ]] ; then with_patchlevel=1; shift; fi
if [ "$1" = "-p" ] ; then
with_patchlevel=1;
shift;
fi

compiler="$*"

Expand Down

0 comments on commit 0484f12

Please sign in to comment.