X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=scripts%2Fld-version.sh;h=1bf3aadde9def9d18628c445751d00fbf46c4928;hb=b0a752d43b1566451332bcb5b52b9694dfe7896c;hp=a463273509b56bfce6157fc47e16b014971c3086;hpb=360db2b422f16305e5b8523b4b730521fbc8fb5d;p=linux-2.6-microblaze.git diff --git a/scripts/ld-version.sh b/scripts/ld-version.sh index a463273509b5..1bf3aadde9de 100755 --- a/scripts/ld-version.sh +++ b/scripts/ld-version.sh @@ -29,7 +29,7 @@ orig_args="$@" # Get the first line of the --version output. IFS=' ' -set -- $("$@" --version) +set -- $(LC_ALL=C "$@" --version) # Split the line on spaces. IFS=' ' @@ -44,14 +44,20 @@ if [ "$1" = GNU -a "$2" = ld ]; then elif [ "$1" = GNU -a "$2" = gold ]; then echo "gold linker is not supported as it is not capable of linking the kernel proper." >&2 exit 1 -elif [ "$1" = LLD ]; then - version=$2 - min_version=$lld_min_version - name=LLD - disp_name=LLD else - echo "$orig_args: unknown linker" >&2 - exit 1 + while [ $# -gt 1 -a "$1" != "LLD" ]; do + shift + done + + if [ "$1" = LLD ]; then + version=$2 + min_version=$lld_min_version + name=LLD + disp_name=LLD + else + echo "$orig_args: unknown linker" >&2 + exit 1 + fi fi # Some distributions append a package release number, as in 2.34-4.fc32