Skip to contentSkip to conversation

Qt 4.8 GCC 4.7 fixes

PATCH Applied Ken Werner 5 participants 8 messages Apr 27, 2012 – May 1, 2012

lore
Share & tools
lore

Ken Werner

author
#0 lore raw

PATCH 1/1 Qt 4.8 GCC 4.7 fixes

This change introduces two new patches to Qt 4.8. One prevents the build system from using the -fuse-ld=gold GCC flag as this isn't upstream and therefore not supported by many toolchains out there. The second patch fixes a compile time error when using toolchains based on GCC 4.7.

---
 meta/recipes-qt/qt4/qt-4.8.1.inc                   |    2 +
 .../qt4/qt-4.8.1/disable-fuse-gold-flag.patch      |   26 ++++++++++++++++
 meta/recipes-qt/qt4/qt-4.8.1/gcc47-fix.patch       |   31 ++++++++++++++++++++
 meta/recipes-qt/qt4/qt4-embedded.inc               |    2 +-
 4 files changed, 60 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-qt/qt4/qt-4.8.1/disable-fuse-gold-flag.patch
 create mode 100644 meta/recipes-qt/qt4/qt-4.8.1/gcc47-fix.patch
meta/recipes-qt/qt4/qt-4.8.1.inc +2 -0
index cd78401..b42ca01 100644
@@ -20,6 +20,8 @@ SRC_URI = "http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-${PV}.
            file://pulseaudio-config.patch \
            file://g++.conf \
            file://linux.conf \
+           file://gcc47-fix.patch \
+           file://disable-fuse-gold-flag.patch \
            "
 
 SRC_URI[md5sum] = "7960ba8e18ca31f0c6e4895a312f92ff"
meta/recipes-qt/qt4/qt-4.8.1/disable-fuse-gold-flag.patch new file +26 -0
new file mode 100644
index 0000000..d49d7bc
@@ -0,0 +1,26 @@
+Disable the -fuse-ld=gold flag. This option is a Debian/Ubuntu specific
+extension to the g++ and causes upstream GCC to throw an error.
+
+Index: qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkit/Source/common.pri
+===================================================================
+--- qt-everywhere-opensource-src-4.8.0.orig/src/3rdparty/webkit/Source/common.pri
++++ qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkit/Source/common.pri
+@@ -3,12 +3,12 @@
+ contains(JAVASCRIPTCORE_JIT,yes): DEFINES+=ENABLE_JIT=1
+ 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
++#}
++#}
+ 
+ # We use this flag on production branches
+ # See https://bugs.webkit.org/show_bug.cgi?id=60824
meta/recipes-qt/qt4/qt-4.8.1/gcc47-fix.patch new file +31 -0
new file mode 100644
index 0000000..8252817
@@ -0,0 +1,31 @@
+Fix compile error when using toolchains based on GCC 4.7.
+
+Index: qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObject.h
+===================================================================
+--- qt-everywhere-opensource-src-4.8.0.orig/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObject.h
++++ qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObject.h
+@@ -57,9 +57,7 @@ namespace JSC {
+     
+     class JSGlobalObject : public JSVariableObject {
+     protected:
+-        using JSVariableObject::JSVariableObjectData;
+-
+-        struct JSGlobalObjectData : public JSVariableObjectData {
++        struct JSGlobalObjectData : public JSVariableObject::JSVariableObjectData {
+             // We use an explicit destructor function pointer instead of a
+             // virtual destructor because we want to avoid adding a vtable
+             // pointer to this struct. Adding a vtable pointer would force the
+Index: qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSStaticScopeObject.h
+===================================================================
+--- qt-everywhere-opensource-src-4.8.0.orig/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSStaticScopeObject.h
++++ qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSStaticScopeObject.h
+@@ -32,8 +32,7 @@ namespace JSC{
+     
+     class JSStaticScopeObject : public JSVariableObject {
+     protected:
+-        using JSVariableObject::JSVariableObjectData;
+-        struct JSStaticScopeObjectData : public JSVariableObjectData {
++        struct JSStaticScopeObjectData : public JSVariableObjectData::JSVariableObjectData {
+             JSStaticScopeObjectData()
+                 : JSVariableObjectData(&symbolTable, &registerStore + 1)
+             {
meta/recipes-qt/qt4/qt4-embedded.inc +1 -1
index 8c15352..291e62a 100644
@@ -2,7 +2,7 @@ DESCRIPTION = "Qt is a versatile cross-platform application framework -- this is
 SECTION = "libs"
 HOMEPAGE = "http://qt.nokia.com"
 DEPENDS += "directfb tslib"
-INC_PR = "r43"
+INC_PR = "r44"
 
 QT_BASE_LIB  ?= "libqt-embedded"
 
Signature · 1 line
1.7.5.4
#1 lore raw
Quoted 6 lines · Ken Werner

This change introduces two new patches to Qt 4.8. One prevents the build system from using the -fuse-ld=gold GCC flag as this isn't upstream and therefore not supported by many toolchains out there. The second patch fixes a compile time error when using toolchains based on GCC 4.7.

Quoted 8 lines
---
 meta/recipes-qt/qt4/qt-4.8.1.inc                   |    2 +
 .../qt4/qt-4.8.1/disable-fuse-gold-flag.patch      |   26 ++++++++++++++++
 meta/recipes-qt/qt4/qt-4.8.1/gcc47-fix.patch       |   31 ++++++++++++++++++++
 meta/recipes-qt/qt4/qt4-embedded.inc               |    2 +-
 4 files changed, 60 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-qt/qt4/qt-4.8.1/disable-fuse-gold-flag.patch
 create mode 100644 meta/recipes-qt/qt4/qt-4.8.1/gcc47-fix.patch

Thanks, this is very timely as it happens.

In the future could you put an "Upstream-Status:" header in any patches which get added along with an indication of the author? This helps a lot when you look at the patch in 12 months and wonder who wrote it (you covered why) and also gives us an idea of which patches might be worth prioritising to discuss with upstream.

In this case, I've added your changes to master-next and added in the missing patch header pieces myself. I've just been working through the remaining gcc 4.7 issues and this looks like the main one left.

Cheers,

Richard

#4 lore raw
In reply to Ken Werner

Hi Ken,

Quoted 3 lines · Ken Werner

This change introduces two new patches to Qt 4.8. One prevents the build system from using the -fuse-ld=gold GCC flag as this isn't upstream and therefore not supported by many toolchains out there. The second patch

ld-is-gold is a DISTRO_FEATURES wich enables gold (and thus reduce link time especially in qt's build) : has this patch an effect on the possibility to still use gold ?

Eric

#2 lore raw
In reply to Richard Purdie

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 5 lines · Richard Purdie

In the future could you put an "Upstream-Status:" header in any patches which get added along with an indication of the author? This helps a lot when you look at the patch in 12 months and wonder who wrote it (you covered why) and also gives us an idea of which patches might be worth prioritising to discuss with upstream.

I think its a forward port of this patch

http://git.openembedded.org/openembedded-core/tree/meta/recipes-qt/qt4/qt-4.7.4/gcc47-fix.patch

so you can add that to header
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+asIAACgkQuwUzVZGdMxTGnACdGn8JxrpsgsCIWiQ0NhGdGJag vKUAn2oECoQqL9e+/GueKqfWbcKmxAnR
=bHqW
-----END PGP SIGNATURE-----

author
#3 lore raw
In reply to Richard Purdie
Quoted 24 lines · Richard Purdie
Quoted 6 lines · Ken Werner

This change introduces two new patches to Qt 4.8. One prevents the build system from using the -fuse-ld=gold GCC flag as this isn't upstream and therefore not supported by many toolchains out there. The second patch fixes a compile time error when using toolchains based on GCC 4.7.

Quoted 8 lines
---
  meta/recipes-qt/qt4/qt-4.8.1.inc                   |    2 +
  .../qt4/qt-4.8.1/disable-fuse-gold-flag.patch      |   26 ++++++++++++++++
  meta/recipes-qt/qt4/qt-4.8.1/gcc47-fix.patch       |   31 ++++++++++++++++++++
  meta/recipes-qt/qt4/qt4-embedded.inc               |    2 +-
  4 files changed, 60 insertions(+), 1 deletions(-)

create mode 100644 meta/recipes-qt/qt4/qt-4.8.1/disable-fuse-gold-flag.patch create mode 100644 meta/recipes-qt/qt4/qt-4.8.1/gcc47-fix.patch

Thanks, this is very timely as it happens.

In the future could you put an "Upstream-Status:" header in any patches which get added along with an indication of the author? This helps a lot when you look at the patch in 12 months and wonder who wrote it (you covered why) and also gives us an idea of which patches might be worth prioritising to discuss with upstream.

Quoted 7 lines

In this case, I've added your changes to master-next and added in the missing patch header pieces myself. I've just been working through the remaining gcc 4.7 issues and this looks like the main one left.

Cheers,

Richard

Ok, thanks!

Regards,
Ken

author
#5 lore raw
In reply to Eric Bénard
Quoted 9 lines · Eric Bénard

Hi Ken,

Quoted 3 lines · Ken Werner

This change introduces two new patches to Qt 4.8. One prevents the build system from using the -fuse-ld=gold GCC flag as this isn't upstream and therefore not supported by many toolchains out there. The second patch

Quoted 5 lines

ld-is-gold is a DISTRO_FEATURES wich enables gold (and thus reduce link time especially in qt's build) : has this patch an effect on the possibility to still use gold ?

Eric

No, the patch doesn't prevent the toolchain from linking using gold. Upstream GCC+binutils supports either gold or the classic ld - a decision you make at the configure time of your toolchain. However, Debian and Ubuntu have patched their toolchains to allow the user to pick the desired linker using the -fuse-ld option. Technically what they do is a patch to the binutils which installs both the ld.bfd and ls.gold plus a symlink that selects the default linker. And a GCC patch that changes collect2 to support the -fuse-ld switch.

Regards,
Ken

Applied
#6 lore raw
In reply to Ken Werner
Quoted 102 lines · Ken Werner

This change introduces two new patches to Qt 4.8. One prevents the build system from using the -fuse-ld=gold GCC flag as this isn't upstream and therefore not supported by many toolchains out there. The second patch fixes a compile time error when using toolchains based on GCC 4.7.

---
  meta/recipes-qt/qt4/qt-4.8.1.inc                   |    2 +
  .../qt4/qt-4.8.1/disable-fuse-gold-flag.patch      |   26 ++++++++++++++++
  meta/recipes-qt/qt4/qt-4.8.1/gcc47-fix.patch       |   31 ++++++++++++++++++++
  meta/recipes-qt/qt4/qt4-embedded.inc               |    2 +-
  4 files changed, 60 insertions(+), 1 deletions(-)

create mode 100644 meta/recipes-qt/qt4/qt-4.8.1/disable-fuse-gold-flag.patch create mode 100644 meta/recipes-qt/qt4/qt-4.8.1/gcc47-fix.patch

meta/recipes-qt/qt4/qt-4.8.1.inc +2 -0
index cd78401..b42ca01 100644
@@ -20,6 +20,8 @@ SRC_URI = "http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-${PV}.
             file://pulseaudio-config.patch \
             file://g++.conf \
             file://linux.conf \
+           file://gcc47-fix.patch \
+           file://disable-fuse-gold-flag.patch \
             "
 
  SRC_URI[md5sum] = "7960ba8e18ca31f0c6e4895a312f92ff"
meta/recipes-qt/qt4/qt-4.8.1/disable-fuse-gold-flag.patch new file +26 -0
new file mode 100644
index 0000000..d49d7bc
@@ -0,0 +1,26 @@
+Disable the -fuse-ld=gold flag. This option is a Debian/Ubuntu specific
+extension to the g++ and causes upstream GCC to throw an error.
+
+Index: qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkit/Source/common.pri
+===================================================================
+--- qt-everywhere-opensource-src-4.8.0.orig/src/3rdparty/webkit/Source/common.pri
++++ qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkit/Source/common.pri
+@@ -3,12 +3,12 @@
+ contains(JAVASCRIPTCORE_JIT,yes): DEFINES+=ENABLE_JIT=1
+ 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
++#}
++#}
+
+ # We use this flag on production branches
+ # See https://bugs.webkit.org/show_bug.cgi?id=60824
meta/recipes-qt/qt4/qt-4.8.1/gcc47-fix.patch new file +31 -0
new file mode 100644
index 0000000..8252817
@@ -0,0 +1,31 @@
+Fix compile error when using toolchains based on GCC 4.7.
+
+Index: qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObject.h
+===================================================================
+--- qt-everywhere-opensource-src-4.8.0.orig/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObject.h
++++ qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObject.h
+@@ -57,9 +57,7 @@ namespace JSC {
+
+     class JSGlobalObject : public JSVariableObject {
+     protected:
+-        using JSVariableObject::JSVariableObjectData;
+-
+-        struct JSGlobalObjectData : public JSVariableObjectData {
++        struct JSGlobalObjectData : public JSVariableObject::JSVariableObjectData {
+             // We use an explicit destructor function pointer instead of a
+             // virtual destructor because we want to avoid adding a vtable
+             // pointer to this struct. Adding a vtable pointer would force the
+Index: qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSStaticScopeObject.h
+===================================================================
+--- qt-everywhere-opensource-src-4.8.0.orig/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSStaticScopeObject.h
++++ qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSStaticScopeObject.h
+@@ -32,8 +32,7 @@ namespace JSC{
+
+     class JSStaticScopeObject : public JSVariableObject {
+     protected:
+-        using JSVariableObject::JSVariableObjectData;
+-        struct JSStaticScopeObjectData : public JSVariableObjectData {
++        struct JSStaticScopeObjectData : public JSVariableObjectData::JSVariableObjectData {
+             JSStaticScopeObjectData()
+                 : JSVariableObjectData(&symbolTable,&registerStore + 1)
+             {
meta/recipes-qt/qt4/qt4-embedded.inc +0 -0
index 8c15352..291e62a 100644

meta/recipes-qt/qt4/qt4-embedded.inc DESCRIPTION = "Qt is a versatile cross-platform application framework -- this is · line 8

Quoted 8 lines
meta/recipes-qt/qt4/qt4-embedded.inc +1 -1
@@ -2,7 +2,7 @@ DESCRIPTION = "Qt is a versatile cross-platform application framework -- this is
  SECTION = "libs"
  HOMEPAGE = "http://qt.nokia.com"
  DEPENDS += "directfb tslib"
-INC_PR = "r43"
+INC_PR = "r44"
 
  QT_BASE_LIB  ?= "libqt-embedded"
 

Merged into OE-Core, but still needs updated patch headers please

Thanks
Sau!

#7 lore raw
Quoted 134 lines · Saul Wold
Quoted 133 lines · Ken Werner

This change introduces two new patches to Qt 4.8. One prevents the build system from using the -fuse-ld=gold GCC flag as this isn't upstream and therefore not supported by many toolchains out there. The second patch fixes a compile time error when using toolchains based on GCC 4.7.

---
meta/recipes-qt/qt4/qt-4.8.1.inc | 2 + .../qt4/qt-4.8.1/disable-fuse-gold-flag.patch | 26 ++++++++++++++++ meta/recipes-qt/qt4/qt-4.8.1/gcc47-fix.patch | 31 ++++++++++++++++++++ meta/recipes-qt/qt4/qt4-embedded.inc | 2 +-

4 files changed, 60 insertions(+), 1 deletions(-)

create mode 100644 meta/recipes-qt/qt4/qt-4.8.1/disable-fuse-gold-flag.patch create mode 100644 meta/recipes-qt/qt4/qt-4.8.1/gcc47-fix.patch

meta/recipes-qt/qt4/qt-4.8.1.inc +0 -0
index cd78401..b42ca01 100644
@@ -20,6 +20,8 @@ SRC_URI =

"http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-${PV}. file://pulseaudio-config.patch \
file://g++.conf \
file://linux.conf \
+ file://gcc47-fix.patch \
+ file://disable-fuse-gold-flag.patch \
"

SRC_URI[md5sum] = "7960ba8e18ca31f0c6e4895a312f92ff"

meta/recipes-qt/qt4/qt-4.8.1/disable-fuse-gold-flag.patch new file +4 -0
new file mode 100644
index 0000000..d49d7bc
@@ -0,0 +1,26 @@
+Disable the -fuse-ld=gold flag. This option is a Debian/Ubuntu specific
+extension to the g++ and causes upstream GCC to throw an error.
+
+Index:

qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkit/Source/common.pri

+===================================================================
+---

qt-everywhere-opensource-src-4.8.0.orig/src/3rdparty/webkit/Source/common.pri

++++
qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkit/Source/common.pri +@@ -3,12 +3,12 @@
+ contains(JAVASCRIPTCORE_JIT,yes): DEFINES+=ENABLE_JIT=1
+ contains(JAVASCRIPTCORE_JIT,no): DEFINES+=ENABLE_JIT=0

meta/recipes-qt/qt4/qt-4.8.1/disable-fuse-gold-flag.patch new file +16 -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
++#}
++#}
+
+ # We use this flag on production branches
+ # See https://bugs.webkit.org/show_bug.cgi?id=60824
meta/recipes-qt/qt4/qt-4.8.1/gcc47-fix.patch new file +3 -0
new file mode 100644
index 0000000..8252817
@@ -0,0 +1,31 @@
+Fix compile error when using toolchains based on GCC 4.7.
+
+Index:

qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObject.h

+===================================================================
+---

qt-everywhere-opensource-src-4.8.0.orig/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObject.h

++++
qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObject.h

+@@ -57,9 +57,7 @@ namespace JSC {
+
+ class JSGlobalObject : public JSVariableObject {
+ protected:

+- using JSVariableObject::JSVariableObjectData;
+-
+- struct JSGlobalObjectData : public JSVariableObjectData {

++ struct JSGlobalObjectData : public
JSVariableObject::JSVariableObjectData {
+ // We use an explicit destructor function pointer instead of a
+ // virtual destructor because we want to avoid adding a vtable
+ // pointer to this struct. Adding a vtable pointer would force the
+Index:
qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSStaticScopeObject.h

+===================================================================
+---

qt-everywhere-opensource-src-4.8.0.orig/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSStaticScopeObject.h

++++
qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSStaticScopeObject.h

+@@ -32,8 +32,7 @@ namespace JSC{
+
+ class JSStaticScopeObject : public JSVariableObject {
+ protected:

+- using JSVariableObject::JSVariableObjectData;
+- struct JSStaticScopeObjectData : public JSVariableObjectData {

++ struct JSStaticScopeObjectData : public JSVariableObjectData::JSVariableObjectData {
+ JSStaticScopeObjectData()
+ : JSVariableObjectData(&symbolTable,&registerStore + 1)
+ {

meta/recipes-qt/qt4/qt4-embedded.inc +0 -0
index 8c15352..291e62a 100644
@@ -2,7 +2,7 @@ DESCRIPTION = "Qt is a versatile cross-platform

application framework -- this is
SECTION = "libs"
HOMEPAGE = "http://qt.nokia.com"
DEPENDS += "directfb tslib"

meta/recipes-qt/qt4/qt4-embedded.inc +1 -1
-INC_PR = "r43"
+INC_PR = "r44"
Quoted 5 lines
Quoted 2 lines

QT_BASE_LIB ?= "libqt-embedded"

Merged into OE-Core, but still needs updated patch headers please

Never mind, I missed RP's fix for the patch headers.

Sau!

Quoted 8 lines

Thanks
Sau!

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core