Closed ytrezq closed 10 years ago
On Mon, Mar 10, 2014 at 12:42:49PM -0700, ytrezq wrote:
I'm using latest Debian jessie on x86_64 and I've cloned the project using the lto-3.14.
I got the warming produced by the line
$(warning "WARNING: Too old linker version $(call ld-version) for kernel LTO. You need Linux binutils. CONFIG_LTO disabled.")
in scripts/Makefile.lto.So I read this part in the same Makefile:
# 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)`
The problem is that there are no information on where to find the "HJ Lu's" version of binutils, After googling I tried downloading ftp://www.kernel.org/pub/linux/devel/binutils/binutils-2.24.51.0.3.tar.xz and compile it with configure --enable-lto --enable-libssp --prefix=/usr --disable-strip --disable-werror --enable-plugins --enable-gold=default --with-zlib --enable-nls --enable-threads --with-build-sysroot=/usr.
It's all documented in Documentation/lto-build
Please follow the suggested procedure there and see if things work.
-Andi
Ok I tried with make AR=gcc-ar-4.8 NM=gcc-nm-4.8, and I'm steel getting :"WARNING: Too old linker version 11100000 for kernel LTO. You need Linux binutils. CONFIG_LTO disabled."
additional info:
root@localhost:/usr/src/linux-misc# ld --version
GNU gold (Linux/GNU Binutils 2.24.51.0.3.20140127) 1.11
Copyright 2014 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.
Documentation/lto-build don't contain any specific info on where to download the required binutils.
On Tue, Mar 11, 2014 at 08:54:25AM -0700, ytrezq wrote:
Ok I tried with make AR=gcc-ar-4.8 NM=gcc-nm-4.8, and I'm steel getting :
"WARNING: Too old linker version 11100000 for kernel LTO. You need Linux binutils. CONFIG_LTO disabled."
additional info:root@localhost:/usr/src/linux-misc# ld --version GNU gold (Linux/GNU Binutils 2.24.51.0.3.20140127) 1.11
You cannot use gold for kernel LTO, needs the BFD linker.
-Andi
Also not installing the correct binutils is not a bug.
Thanks for you help. So, why not pass the "-fuse-ld=bfd" flag to gcc. It would make sure bfd is always used even if gold is the default...
On Tue, Mar 11, 2014 at 03:42:59PM -0700, ytrezq wrote:
Thanks for you help. So Is it possible to pass the "-fuse-ld=bfd" flag to gcc. It would make sure bfd is always used even if gold is the default...
That only works if the linker is named "bfd".
Mine is just called "ld"
Typically it shouldn't be a problem because you need to point to the Linux binutils anyways.
-Andi
Anyway, Is the required linker version >2.27. If yes, where I may find it?
On Wed, Mar 12, 2014 at 04:06:16AM -0700, ytrezq wrote:
Anyway, Is the required linker version >2.27. If yes, where I may find it?
See Documentation/lto-build
Reply to this email directly or view it on GitHub: https://github.com/andikleen/linux-misc/issues/7#issuecomment-37396701
ak@linux.intel.com -- Speaking for myself only.
Hello, I'm using latest Debian jessie on x86_64 and I've cloned the project using the lto-3.14.
I got the warming produced by the line
$(warning "WARNING: Too old linker version $(call ld-version) for kernel LTO. You need Linux binutils. CONFIG_LTO disabled.")
in scripts/Makefile.lto.So I read this part in the same Makefile:
The problem is that there are no information on where to find the "HJ Lu's" version of binutils, After googling I tried downloading ftp://www.kernel.org/pub/linux/devel/binutils/binutils-2.24.51.0.3.tar.xz and compile it with configure --enable-lto --enable-libssp --prefix=/usr --disable-strip --disable-werror --enable-plugins --enable-gold=default --with-zlib --enable-nls --enable-threads --with-build-sysroot=/usr. But I'm steel getting the warning, so the kernel without lto support.
Here's my .config