path: root/scripts/
diff options
authorMasahiro Yamada <>2020-12-13 01:54:30 +0900
committerMasahiro Yamada <>2021-02-12 05:12:31 +0900
commit052c805a1851a4415f9e2adfa9654a0b793e0c45 (patch)
tree7849374df6d7c83a8d3f27f1f86383162aa3ed68 /scripts/
parent83272e6d4765df775e43d5fc4797b4b3fe9a97fa (diff)
kbuild: LD_VERSION redenomination
Commit ccbef1674a15 ("Kbuild, lto: add ld-version and ld-ifversion macros") introduced scripts/ for GCC LTO. At that time, this script handled 5 version fields because GCC LTO needed the downstream binutils. ( The code snippet from the submitted patch was as follows: # We need HJ Lu's Linux binutils because mainline binutils does not # support mixing assembler and LTO code in the same ld -r object. # XXX check if the gcc plugin ld is the expected one too # XXX some Fedora binutils should also support it. How to check for that? ifeq ($(call ld-ifversion,-ge,22710001,y),y) ... However, GCC LTO was not merged into the mainline after all. ( So, the 4th and 5th fields were never used, and finally removed by commit 0d61ed17dd30 ("ld-version: Drop the 4th and 5th version components"). Since then, the last 4-digits returned by this script is always zeros. Remove the meaningless last 4-digits. This makes the version format consistent with GCC_VERSION, CLANG_VERSION, LLD_VERSION. Signed-off-by: Masahiro Yamada <> Acked-by: Will Deacon <> Acked-by: Thomas Bogendoerfer <>
Diffstat (limited to 'scripts/')
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/ b/scripts/
index f2be0ff9a738..0f8a2c0f9502 100755
--- a/scripts/
+++ b/scripts/
@@ -6,6 +6,6 @@
gsub(".*version ", "");
gsub("-.*", "");
split($1,a, ".");
- print a[1]*100000000 + a[2]*1000000 + a[3]*10000;
+ print a[1]*10000 + a[2]*100 + a[3];