Skip to content

Commit c839d6e

Browse files
James Hogansashalevin
authored andcommitted
ld-version: Fix awk regex compile failure
[ Upstream commit 4b7b1ef ] 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]> Signed-off-by: Sasha Levin <[email protected]>
1 parent c7d4bd1 commit c839d6e

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
split($1,a, ".");
66
print a[1]*10000000 + a[2]*100000 + a[3]*10000 + a[4]*100 + a[5];
77
exit

0 commit comments

Comments
 (0)