summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2017-11-08 23:44:55 +0100
committerTom Rini <trini@konsulko.com>2017-11-20 20:18:37 -0500
commitb5142f280a5dba87422b8f3df1dc7350f476bd35 (patch)
tree479f12ea11189ac6cbcaf1934da130dcb09ee1ca /scripts
parent0931ed3c0d0fdea924b7b7196ad92c467b50debf (diff)
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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/ld-version.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/ld-version.sh b/scripts/ld-version.sh
index 198580d245e..f2be0ff9a73 100755
--- a/scripts/ld-version.sh
+++ b/scripts/ld-version.sh
@@ -1,8 +1,11 @@
#!/usr/bin/awk -f
+# SPDX-License-Identifier: GPL-2.0
# extract linker version number from stdin and turn into single number
{
- gsub(".*)", "");
+ gsub(".*\\)", "");
+ gsub(".*version ", "");
+ gsub("-.*", "");
split($1,a, ".");
- print a[1]*10000000 + a[2]*100000 + a[3]*10000 + a[4]*100 + a[5];
+ print a[1]*100000000 + a[2]*1000000 + a[3]*10000;
exit
}