summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2016-03-08 19:47:53 +0300
committerRalf Baechle <ralf@linux-mips.org>2016-03-13 12:54:42 +0300
commit4b7b1ef2c2f83d702272555e8adb839a50ba0f8e (patch)
tree5c45bc4e64ec0d38db6e4e08f0a657e4fb0fb1a8 /scripts
parentba9e72c2290fcdeeff5f0105590a03e0f341b059 (diff)
downloadlinux-4b7b1ef2c2f83d702272555e8adb839a50ba0f8e.tar.xz
ld-version: Fix awk regex compile failure
The ld-version.sh script fails on some versions of awk with the following error, resulting in build failures for MIPS: awk: scripts/ld-version.sh: line 4: regular expression compile failed (missing '(') This is due to the regular expression ".*)", meant to strip off the beginning of the ld version string up to the close bracket, however brackets have a meaning in regular expressions, so lets escape it so that awk doesn't expect a corresponding open bracket. Fixes: ccbef1674a15 ("Kbuild, lto: add ld-version and ld-ifversion ...") Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Hogan <james.hogan@imgtec.com> Tested-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Cc: Michal Marek <mmarek@suse.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: linux-mips@linux-mips.org Cc: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org # 4.4.x- Patchwork: https://patchwork.linux-mips.org/patch/12838/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/ld-version.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/ld-version.sh b/scripts/ld-version.sh
index d154f0877fd8..7bfe9fa1c8dc 100755
--- a/scripts/ld-version.sh
+++ b/scripts/ld-version.sh
@@ -1,7 +1,7 @@
#!/usr/bin/awk -f
# extract linker version number from stdin and turn into single number
{
- gsub(".*)", "");
+ gsub(".*\\)", "");
gsub(".*version ", "");
gsub("-.*", "");
split($1,a, ".");