[lkml]   [2013]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectProblem with (scripts/Makefile.lto helper tool)

I'm experimenting with your LTO kernel tree and found something strange with
your helper script: scripts/

It doesn't seem to produce sensible numbers for the linker version:

I have version of the Linux binutils.
But the version produced by scripts/ is weird.

$ /opt/binutils- -version
GNU ld (Linux/GNU Binutils)
Copyright 2012 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

$ /opt/binutils- -version | scripts/

The number of digits reserved for the third portion of the version string
is only 1, and it should be 2. The '51' is combining with the '23' to
produce the '28' in the strings produced by

I would recommend changing the script (and the Makefile.lto that
depends on it) as follows:

diff --git a/scripts/Makefile.lto b/scripts/Makefile.lto
index da54968..74a17e2 100644
--- a/scripts/Makefile.lto
+++ b/scripts/Makefile.lto
@@ -16,7 +16,7 @@ ifneq ($(call cc-option,${LTO_CFLAGS},n),n)
# 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
-ifeq ($(call ld-ifversion,-ge,22710001,y),y)
+ifeq ($(call ld-ifversion,-ge,222510001,y),y)
# should use -flto=jobserver, but we need a fix for
LTO_CFLAGS := -flto -fno-toplevel-reorder
LTO_FINAL_CFLAGS := -fuse-linker-plugin -flto=$(shell getconf _NPROCESSORS_ONLN) -fno-toplevel-reorder
diff --git a/scripts/ b/scripts/
index 7eb0b76..6aed2be 100755
--- a/scripts/
+++ b/scripts/
@@ -3,6 +3,6 @@
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 + a[4]*100 + a[5];
I presume that the required version of binutils is actually, and not
2.27.<something> (which appears to not exist yet).

-- Tim

Tim Bird
Architecture Group Chair, CE Workgroup of the Linux Foundation
Senior Staff Engineer, Sony Network Entertainment

 \ /
  Last update: 2013-01-08 21:41    [W:0.113 / U:1.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site