Commit b5142f280a5dba87422b8f3df1dc7350f476bd35
Committed by
Tom Rini
1 parent
0931ed3c0d
Exists in
smarc_8mq_lf_v2020.04
and in
17 other branches
scripts/ld-version.sh: regular expression compile fails
ld --version | scripts/ld-version.sh fails with awk: scripts/ld-version.sh: line 4: regular expression compile failed (missing '(') .*) So let's refresh the script from Linux kernel v4.14-rc8. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Showing 1 changed file with 5 additions and 2 deletions Side-by-side Diff
scripts/ld-version.sh
1 | 1 | #!/usr/bin/awk -f |
2 | +# SPDX-License-Identifier: GPL-2.0 | |
2 | 3 | # extract linker version number from stdin and turn into single number |
3 | 4 | { |
4 | - gsub(".*)", ""); | |
5 | + gsub(".*\\)", ""); | |
6 | + gsub(".*version ", ""); | |
7 | + gsub("-.*", ""); | |
5 | 8 | split($1,a, "."); |
6 | - print a[1]*10000000 + a[2]*100000 + a[3]*10000 + a[4]*100 + a[5]; | |
9 | + print a[1]*100000000 + a[2]*1000000 + a[3]*10000; | |
7 | 10 | exit |
8 | 11 | } |