Skip to contentSkip to conversation

qt5base: disable gold linker

PATCH New Peter Seiderer 4 participants 7 messages Feb 11, 2015 – Feb 14, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qt5base: disable gold linker

Fixes [1],[2]:
powerpc-ctng_e500v2-linux-gnuspe-g++: error: unrecognized command line option '-fuse-ld=gold' Makefile:1192: recipe for target '../../lib/libQt5Core.so.5.4.0' failed

[1] http://autobuild.buildroot.net/results/92c/92c3fb4ddb934115b228652bb8c972bb7459bb40/
[2] http://autobuild.buildroot.net/results/384/384db0b6b29fc434da73f78cb872080fde918aee/

---
 package/qt5/qt5base/qt5base.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/qt5/qt5base/qt5base.mk +2 -1
index aaf4da0..478d355 100644
@@ -26,7 +26,8 @@ QT5BASE_CONFIGURE_OPTS += \
 	-no-iconv \
 	-system-zlib \
 	-system-pcre \
-	-no-pch
+	-no-pch \
+	-no-use-gold-linker
 
 ifeq ($(BR2_ENABLE_DEBUG),y)
 QT5BASE_CONFIGURE_OPTS += -debug
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 qt5base: disable gold linker

Dear Peter Seiderer,

Quoted 3 lines · Peter Seiderer

Fixes [1],[2]:
powerpc-ctng_e500v2-linux-gnuspe-g++: error: unrecognized command line option '-fuse-ld=gold' Makefile:1192: recipe for target '../../lib/libQt5Core.so.5.4.0' failed

The Qt configure script has some logic to detect whether the compiler supports -fuse-ld=gold or not. Do you know why this logic is not properly working, and not detecting that this specific compiler doesn't support this?

Disabling unconditionally this feature is maybe OK, but I'd like to understand why the configure script logic to auto-detect this is not working.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 qt5base: disable gold linker

Dear All;

Seems to be the problem here too.

home/buildroot12git/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib -lglib-2.0 -lrt
arm-buildroot-linux-gnueabi-g++: error: unrecognized command line option '-fuse-ld=gold'
make[3]: *** [../../lib/libQt5Core.so.5.4.0] Error 1

Regards, Johan

-----Oorspronkelijk bericht-----
Van: buildroot [mailto:buildroot-bounces at busybox.net] Namens Thomas Petazzoni
Verzonden: woensdag 11 februari 2015 15:33
Aan: Peter Seiderer
CC: buildroot at busybox.net
Onderwerp: Re: [Buildroot] [PATCH v1] qt5base: disable gold linker

Dear Peter Seiderer,

Quoted 4 lines · Peter Seiderer

Fixes [1],[2]:
powerpc-ctng_e500v2-linux-gnuspe-g++: error: unrecognized command line option '-fuse-ld=gold' Makefile:1192: recipe for target '../../lib/libQt5Core.so.5.4.0'
failed

The Qt configure script has some logic to detect whether the compiler supports -fuse-ld=gold or not. Do you know why this logic is not properly working, and not detecting that this specific compiler doesn't support this?

Disabling unconditionally this feature is maybe OK, but I'd like to understand why the configure script logic to auto-detect this is not working.

Thanks,

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering http://free-electrons.com _______________________________________________ buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6253 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150211/0d6a7ab7/attachment.bin>

#3 lore raw

PATCH 1/1 qt5base: disable gold linker

In reply to Thomas Petazzoni

Hello Thomas,

Quoted 9 lines

Gesendet: Mittwoch, 11. Februar 2015 um 15:32 Uhr
Von: "Thomas Petazzoni" <[email protected]>
An: "Peter Seiderer" <[email protected]>
Cc: buildroot at busybox.net
Betreff: Re: [Buildroot] [PATCH v1] qt5base: disable gold linker

Dear Peter Seiderer,

On Wed, 11 Feb 2015 07:47:11 +0100, Peter Seiderer wrote:

Quoted 9 lines
Quoted 3 lines

Fixes [1],[2]:
powerpc-ctng_e500v2-linux-gnuspe-g++: error: unrecognized command line option '-fuse-ld=gold' Makefile:1192: recipe for target '../../lib/libQt5Core.so.5.4.0' failed

The Qt configure script has some logic to detect whether the compiler supports -fuse-ld=gold or not. Do you know why this logic is not properly working, and not detecting that this specific compiler doesn't support this?

No (did not investigate further, disabling gold unconditionally worked for me for ptxdist/qt-5.4.0)...

Quoted 3 lines

Disabling unconditionally this feature is maybe OK, but I'd like to understand why the configure script logic to auto-detect this is not working.

O.k, will try (but may last some time)...

Quoted 9 lines

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 1/1 qt5base: disable gold linker

In reply to Thomas Petazzoni

-----Oorspronkelijk bericht-----
Van: buildroot [mailto:buildroot-bounces at busybox.net] Namens Thomas Petazzoni
Verzonden: woensdag 11 februari 2015 15:33
Aan: Peter Seiderer
CC: buildroot at busybox.net
Onderwerp: Re: [Buildroot] [PATCH v1] qt5base: disable gold linker

Dear Peter Seiderer,

Quoted 4 lines · Peter Seiderer

Fixes [1],[2]:
powerpc-ctng_e500v2-linux-gnuspe-g++: error: unrecognized command line option '-fuse-ld=gold' Makefile:1192: recipe for target '../../lib/libQt5Core.so.5.4.0'
failed

The Qt configure script has some logic to detect whether the compiler supports -fuse-ld=gold or not. Do you know why this logic is not properly working, and not detecting that this specific compiler doesn't support this?

Disabling unconditionally this feature is maybe OK, but I'd like to understand why the configure script logic to auto-detect this is not working.

Thanks,

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering http://free-electrons.com _______________________________________________ buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

------------------------------------------------------------------------------------------------------------------------------------
----

Dear Thomas

There was something similar in qt 4.7
Testing for /usr/ld.gold ...

From :
https://lists.fedoraproject.org/pipermail/scm-commits/2012-January/725442.html

snip
contains(JAVASCRIPTCORE_JIT,no): DEFINES+=ENABLE_JIT=0
+

+-linux-g++ {
+-isEmpty($$(SBOX_DPKG_INST_ARCH)):exists(/usr/bin/ld.gold) {
+-    message(Using gold linker)
+-    QMAKE_LFLAGS+=-fuse-ld=gold
+-}
+-}

++#linux-g++ { ++#isEmpty($$(SBOX_DPKG_INST_ARCH)):exists(/usr/bin/ld.gold) {
++# message(Using gold linker)
++# QMAKE_LFLAGS+=-fuse-ld=gold
++#}
++#}
snip

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6253 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150211/c05c606c/attachment.bin>

#5 lore raw

PATCH 1/1 qt5base: disable gold linker

In reply to Thomas Petazzoni
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Dear Peter Seiderer,

Quoted 3 lines · Peter Seiderer

Fixes [1],[2]:
powerpc-ctng_e500v2-linux-gnuspe-g++: error: unrecognized command line option '-fuse-ld=gold' Makefile:1192: recipe for target '../../lib/libQt5Core.so.5.4.0' failed

Quoted 8 lines

The Qt configure script has some logic to detect whether the compiler supports -fuse-ld=gold or not. Do you know why this logic is not properly working, and not detecting that this specific compiler doesn't support this?

Disabling unconditionally this feature is maybe OK, but I'd like to understand why the configure script logic to auto-detect this is not working.

The problem is that the configure script is confused. While this is related to linking, -fuse-ld=gold is an argument to the compiler driver to tell it what linker to execute, NOT an option to tell the linker to behave differently. So it shouldn't get prefixed with -Wl when passed though the compiler driver.

Qt does the right thing when it uses it, but the configure script does:

if linkerSupportsFlag $TEST_COMPILER -fuse-ld=gold; then
CFG_USE_GOLD_LINKER=yes

This should be compilerSupportsFlag instead.

I'll create a patch and apply / send upstream.

Signature · 1 line
Bye, Peter Korsgaard
#6 lore raw

PATCH 1/1 qt5base: disable gold linker

Dear Peter Korsgaard,

Quoted 6 lines · Peter Korsgaard

The problem is that the configure script is confused. While this is related to linking, -fuse-ld=gold is an argument to the compiler driver to tell it what linker to execute, NOT an option to tell the linker to behave differently. So it shouldn't get prefixed with -Wl when passed though the compiler driver.

Quoted 8 lines

Qt does the right thing when it uses it, but the configure script does:

if linkerSupportsFlag $TEST_COMPILER -fuse-ld=gold; then
CFG_USE_GOLD_LINKER=yes

This should be compilerSupportsFlag instead.

I'll create a patch and apply / send upstream.

Thanks. In the mean time, I've marked the original patch from Peter Seiderer as Rejected in patchwork.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com