Thanks for the reply, Will Newton.
Then can we expect the fix to be included for the official Android toolchain 2014.11?
And, thanks for explaining the culprit of this bug, Jongsung Kim! :)
On Wed, Oct 29, 2014 at 9:00 PM, linaro-toolchain-request@lists.linaro.org wrote:
Send linaro-toolchain mailing list submissions to linaro-toolchain@lists.linaro.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.linaro.org/mailman/listinfo/linaro-toolchain or, via email, send a message with subject or body 'help' to linaro-toolchain-request@lists.linaro.org
You can reach the person managing the list at linaro-toolchain-owner@lists.linaro.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of linaro-toolchain digest..."
Today's Topics:
- RE: Enabling back linker plugin for Linaro Android toolchain (Jongsung Kim)
- Re: Enabling back linker plugin for Linaro Android toolchain (Will Newton)
Message: 1 Date: Wed, 29 Oct 2014 11:26:30 +0900 From: "Jongsung Kim" neidhard.kim@lge.com To: '???' qkrwngud825@gmail.com, linaro-android@lists.linaro.org, linaro-toolchain@lists.linaro.org Subject: RE: Enabling back linker plugin for Linaro Android toolchain Message-ID: 012f01cff31f$c01cea90$4056bfb0$@lge.com Content-Type: text/plain; charset="UTF-8"
The version-string from binutils-linaro looks to be blamed. It once was:
GNU ld (crosstool-NG linaro-1.13.1-4.7-2013.04-20130415 - Linaro GCC 2013.04) 2.23.1
and the linker plugin works with this version of Linaro prebuilt toolchain. Now it is:
GNU ld (crosstool-NG linaro-1.13.1-4.8-2014.04 - Linaro GCC 4.8-2014.04) 2.24.0.20140311 Linaro 2014.03 GNU ld (crosstool-NG linaro-1.13.1-4.9-2014.08 - Linaro GCC 4.9-2014.08) 2.24.0.20140801 Linaro 2014.08
and the linker plugin is not supported:
$ arm-linux-gnueabihf-gcc -flto -fuse-linker-plugin -o hello hello.c arm-linux-gnueabihf-gcc: error: -fuse-linker-plugin is not supported in this configuration
Look into gcc/configure script. It uses the version of ld to determine whether ld supports linker plugin. It extracts the version by doing something like:
$ arm-linux-gnueabihf-ld --version | sed 1q | sed -n -e 's,^.*[ ]([0-9][0-9]*.[0-9][0-9]*.*)$,\1,p'
and it will extract the last 2014.03 or 2014.08. By using proper substitution expression like 's,^GNU ld (.*) ([0-9][.0-9]*).*$,\1,p', the script may enable linker plugin.
However, patching the script looks like a bad idea, because it doesn?t help handling the version of gold:
GNU gold (GNU Binutils for Ubuntu 2.24) 1.11 GNU gold (crosstool-NG linaro-1.13.1-4.7-2013.04-20130415 - Linaro GCC 2013.04 2.23.1) 1.11 GNU gold (crosstool-NG linaro-1.13.1-4.8-2014.04 - Linaro GCC 4.8-2014.04 2.24.0.20140311 Linaro 2014.03) 1.11 GNU gold (crosstool-NG linaro-1.13.1-4.9-2014.08 - Linaro GCC 4.9-2014.08 2.24.0.20140801 Linaro 2014.08) 1.11
I couldn?t find a reasonable general expression to extract the version.
From: linaro-toolchain-bounces@lists.linaro.org [mailto: linaro-toolchain-bounces@lists.linaro.org] On Behalf Of ??? Sent: Monday, October 27, 2014 10:15 PM To: linaro-android@lists.linaro.org; linaro-toolchain@lists.linaro.org Subject: Enabling back linker plugin for Linaro Android toolchain
I'm using Linaro Android toolchain's arm-eabi- for compiling my Android Linux kernel with LTO.
The main benefits of my kernel is that it uses LTO(Link-Time-Optimizations). (Patches found here: https://github.com/andikleen/linux-misc)
But now, it's broken with Linaro Android toolchains from 2014.09~
Building Linux kernel with LTO requires Linker plugin with the toolchain.
But for some reason, linker plugin is disabled with 2014.09 and 2014.10 (Which I used from here : https://android-build.linaro.org/builds/~linaro-android/toolchain-4.9-2014.0... https://android-build.linaro.org/builds/~linaro-android/toolchain-4.9-2014.1... )
LTO build works flawlessly with 2014.08.
With 2014.09 and 2014.10, I get the following error : cc1: error: -fno-fat-lto-objects are supported only with linker plugin
If I explicitly remove " -fno-fat-lto-objects " from the Makefile, the linker fails to link all of the object files.
I would like to ask Linaro to enable back the Linker plugin support :)
Thanks in advance..
Message: 2 Date: Wed, 29 Oct 2014 09:12:53 +0000 From: Will Newton will.newton@linaro.org To: Jongsung Kim neidhard.kim@lge.com Cc: ??? qkrwngud825@gmail.com, linaro-android@lists.linaro.org, Linaro Toolchain linaro-toolchain@lists.linaro.org Subject: Re: Enabling back linker plugin for Linaro Android toolchain Message-ID: <CANu=DmhPdCGYw0=hCs9tmkbCU6hMLLMJnYS-u_JGz= p17Bgonw@mail.gmail.com> Content-Type: text/plain; charset=UTF-8
On 29 October 2014 02:26, Jongsung Kim neidhard.kim@lge.com wrote:
The version-string from binutils-linaro looks to be blamed. It once was:
GNU ld (crosstool-NG linaro-1.13.1-4.7-2013.04-20130415 - Linaro GCC
2013.04) 2.23.1
and the linker plugin works with this version of Linaro prebuilt
toolchain. Now it is:
GNU ld (crosstool-NG linaro-1.13.1-4.8-2014.04 - Linaro GCC 4.8-2014.04)
2.24.0.20140311 Linaro 2014.03
GNU ld (crosstool-NG linaro-1.13.1-4.9-2014.08 - Linaro GCC 4.9-2014.08)
2.24.0.20140801 Linaro 2014.08
and the linker plugin is not supported:
$ arm-linux-gnueabihf-gcc -flto -fuse-linker-plugin -o hello hello.c arm-linux-gnueabihf-gcc: error: -fuse-linker-plugin is not supported in
this configuration
Look into gcc/configure script. It uses the version of ld to determine
whether ld supports linker plugin. It extracts the version by doing something like:
$ arm-linux-gnueabihf-ld --version | sed 1q | sed -n -e 's,^.*[
]([0-9][0-9]*.[0-9][0-9]*.*)$,\1,p'
and it will extract the last 2014.03 or 2014.08. By using proper
substitution expression like 's,^GNU ld (.*) ([0-9][.0-9]*).*$,\1,p', the script may enable linker plugin.
However, patching the script looks like a bad idea, because it doesn?t
help handling the version of gold:
GNU gold (GNU Binutils for Ubuntu 2.24) 1.11 GNU gold (crosstool-NG linaro-1.13.1-4.7-2013.04-20130415 - Linaro GCC
2013.04 2.23.1) 1.11
GNU gold (crosstool-NG linaro-1.13.1-4.8-2014.04 - Linaro GCC
4.8-2014.04 2.24.0.20140311 Linaro 2014.03) 1.11
GNU gold (crosstool-NG linaro-1.13.1-4.9-2014.08 - Linaro GCC
4.9-2014.08 2.24.0.20140801 Linaro 2014.08) 1.11
I couldn?t find a reasonable general expression to extract the version.
This should be fixed in binutils-linaro-2.24-2014.11.
From: linaro-toolchain-bounces@lists.linaro.org [mailto:
linaro-toolchain-bounces@lists.linaro.org] On Behalf Of ???
Sent: Monday, October 27, 2014 10:15 PM To: linaro-android@lists.linaro.org; linaro-toolchain@lists.linaro.org Subject: Enabling back linker plugin for Linaro Android toolchain
I'm using Linaro Android toolchain's arm-eabi- for compiling my Android
Linux kernel with LTO.
The main benefits of my kernel is that it uses
LTO(Link-Time-Optimizations).
(Patches found here: https://github.com/andikleen/linux-misc)
But now, it's broken with Linaro Android toolchains from 2014.09~
Building Linux kernel with LTO requires Linker plugin with the toolchain.
But for some reason, linker plugin is disabled with 2014.09 and 2014.10 (Which I used from here :
https://android-build.linaro.org/builds/~linaro-android/toolchain-4.9-2014.0... https://android-build.linaro.org/builds/~linaro-android/toolchain-4.9-2014.1... )
LTO build works flawlessly with 2014.08.
With 2014.09 and 2014.10, I get the following error : cc1: error: -fno-fat-lto-objects are supported only with linker plugin
If I explicitly remove " -fno-fat-lto-objects " from the Makefile, the
linker fails to link all of the object files.
I would like to ask Linaro to enable back the Linker plugin support :)
Thanks in advance..
linaro-toolchain mailing list linaro-toolchain@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-toolchain
-- Will Newton Toolchain Working Group, Linaro
linaro-toolchain mailing list linaro-toolchain@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-toolchain
End of linaro-toolchain Digest, Vol 52, Issue 16