Skip to content

Commit 4b7b1ef

Browse files
James Hoganralfbaechle
authored andcommitted
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: ccbef16 ("Kbuild, lto: add ld-version and ld-ifversion ...") Reported-by: Geert Uytterhoeven <[email protected]> Signed-off-by: James Hogan <[email protected]> Tested-by: Michael S. Tsirkin <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Tested-by: Sudip Mukherjee <[email protected]> Cc: Michal Marek <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] # 4.4.x- Patchwork: https://patchwork.linux-mips.org/patch/12838/ Signed-off-by: Ralf Baechle <[email protected]>
1 parent ba9e72c commit 4b7b1ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/ld-version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/awk -f
22
# extract linker version number from stdin and turn into single number
33
{
4-
gsub(".*)", "");
4+
gsub(".*\\)", "");
55
gsub(".*version ", "");
66
gsub("-.*", "");
77
split($1,a, ".");

0 commit comments

Comments
 (0)