diff mbox

[6/6] qt5base: add patch to fix gold linker issue

Message ID 1431714233-24324-6-git-send-email-thomas.petazzoni@free-electrons.com
State Accepted
Commit a138be5d701685a6e3122fb61f267c28f18c0771
Headers show

Commit Message

Thomas Petazzoni May 15, 2015, 6:23 p.m. UTC
The newly added patch makes sure that gold linker functionality is not
used when doing host builds, since qt5 only tests the availability of
this feature with the target compiler.

Fixes:

  http://autobuild.buildroot.net/results/f403a76ac0abbf8488373c0dffb4487f5d98c55d/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../0005-no-gold-linker-for-host-build.patch       | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 package/qt5/qt5base/0005-no-gold-linker-for-host-build.patch

Comments

Peter Korsgaard May 16, 2015, 1:13 p.m. UTC | #1
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > The newly added patch makes sure that gold linker functionality is not
 > used when doing host builds, since qt5 only tests the availability of
 > this feature with the target compiler.

 > Fixes:

 >   http://autobuild.buildroot.net/results/f403a76ac0abbf8488373c0dffb4487f5d98c55d/

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks. Don't forget to send the patch upstream.
Thomas Petazzoni May 16, 2015, 1:31 p.m. UTC | #2
Dear Peter Korsgaard,

On Sat, 16 May 2015 15:13:44 +0200, Peter Korsgaard wrote:
> >>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> 
>  > The newly added patch makes sure that gold linker functionality is not
>  > used when doing host builds, since qt5 only tests the availability of
>  > this feature with the target compiler.
> 
>  > Fixes:
> 
>  >   http://autobuild.buildroot.net/results/f403a76ac0abbf8488373c0dffb4487f5d98c55d/
> 
>  > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> Committed, thanks. Don't forget to send the patch upstream.

I already submitted the patch as part of a bug report, which URL is
mentioned in my Buildroot patch. However, they ask me to follow the
entire Qt contribution process for just a one line patch, which I'm not
sure I'm willing to do :-/

Thomas
Peter Korsgaard May 16, 2015, 1:35 p.m. UTC | #3
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

Hi,

>> Committed, thanks. Don't forget to send the patch upstream.

 > I already submitted the patch as part of a bug report, which URL is
 > mentioned in my Buildroot patch. However, they ask me to follow the
 > entire Qt contribution process for just a one line patch, which I'm not
 > sure I'm willing to do :-/

Sorry, somehow I missed that line in the patch description.

Yeah, I understand that you don't want to go through a bunch of hoops
for that patch.
diff mbox

Patch

diff --git a/package/qt5/qt5base/0005-no-gold-linker-for-host-build.patch b/package/qt5/qt5base/0005-no-gold-linker-for-host-build.patch
new file mode 100644
index 0000000..99d5928
--- /dev/null
+++ b/package/qt5/qt5base/0005-no-gold-linker-for-host-build.patch
@@ -0,0 +1,27 @@ 
+Use the gold linker only for target builds
+
+Availability of the gold linker is only tested with the
+cross-compiler, not the host compiler, so Qt shouldn't assume it's
+available when doing host builds.
+
+This fixes build failures occuring when cross-compiling Qt5 with a
+gold capable cross-compiler, on a host that has a too old compiler to
+support gold.
+
+Bug reported upstream at https://bugreports.qt.io/browse/QTBUG-46125.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/mkspecs/features/default_post.prf
+===================================================================
+--- a/mkspecs/features/default_post.prf
++++ b/mkspecs/features/default_post.prf
+@@ -62,7 +62,7 @@
+     QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_RELEASE
+ }
+ 
+-use_gold_linker: QMAKE_LFLAGS += $$QMAKE_LFLAGS_USE_GOLD
++!host_build: use_gold_linker: QMAKE_LFLAGS += $$QMAKE_LFLAGS_USE_GOLD
+ 
+ dll:win32: QMAKE_LFLAGS += $$QMAKE_LFLAGS_DLL
+ static:mac: QMAKE_LFLAGS += $$QMAKE_LFLAGS_STATIC_LIB