aboutsummaryrefslogtreecommitdiff
path: root/scripts/ld-version.sh
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2014-02-08 09:01:13 +0100
committerH. Peter Anvin <hpa@linux.intel.com>2014-02-13 20:25:00 -0800
commitccbef1674a1579842c7dbdf554efca85d2cd245a (patch)
tree233741914e81874ff08fe288e806a8b6c5d08d3f /scripts/ld-version.sh
parent7d02b490e93c199a15b3c4bce1c393588c1300ca (diff)
downloadleg-kernel-ccbef1674a1579842c7dbdf554efca85d2cd245a.tar.gz
Kbuild, lto: add ld-version and ld-ifversion macros
To check the linker version. Used by the LTO makefile. Signed-off-by: Andi Kleen <ak@linux.intel.com> Link: http://lkml.kernel.org/r/1391846481-31491-9-git-send-email-ak@linux.intel.com Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'scripts/ld-version.sh')
-rwxr-xr-xscripts/ld-version.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/ld-version.sh b/scripts/ld-version.sh
new file mode 100755
index 000000000000..198580d245e0
--- /dev/null
+++ b/scripts/ld-version.sh
@@ -0,0 +1,8 @@
+#!/usr/bin/awk -f
+# extract linker version number from stdin and turn into single number
+ {
+ gsub(".*)", "");
+ split($1,a, ".");
+ print a[1]*10000000 + a[2]*100000 + a[3]*10000 + a[4]*100 + a[5];
+ exit
+ }