diff options
authorJames Hogan <>2016-03-08 16:47:53 +0000
committerRalf Baechle <>2016-03-13 10:54:42 +0100
commit4b7b1ef2c2f83d702272555e8adb839a50ba0f8e (patch)
parentba9e72c2290fcdeeff5f0105590a03e0f341b059 (diff)
ld-version: Fix awk regex compile failure
The script fails on some versions of awk with the following error, resulting in build failures for MIPS: awk: scripts/ 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 <> Signed-off-by: James Hogan <> Tested-by: Michael S. Tsirkin <> Acked-by: Michael S. Tsirkin <> Tested-by: Sudip Mukherjee <> Cc: Michal Marek <> Cc: Andi Kleen <> Cc: Geert Uytterhoeven <> Cc: Cc: Cc: Cc: # 4.4.x- Patchwork: Signed-off-by: Ralf Baechle <>
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/ b/scripts/
index d154f0877fd8..7bfe9fa1c8dc 100755
--- a/scripts/
+++ b/scripts/
@@ -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, ".");