All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/4] qmake/qt4-tools-nativesdk fixes
@ 2012-02-09 17:57 Paul Eggleton
  2012-02-09 17:57 ` [RFC PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6 Paul Eggleton
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Paul Eggleton @ 2012-02-09 17:57 UTC (permalink / raw)
  To: openembedded-core, philip, eric

This patchset enables building qmake for the target with other target
utilities. I also fixed a couple of build failures in the process.

In addition I've used the same method to build qmake in the
qt4-tools-nativesdk recipe. This wasn't strictly necessary, however I
think it would be good to be consistent and incidentally the resulting
qmake executable is slightly smaller.

NOTE: This patchset is an RFC - please do not merge until people have
had a chance to test. I haven't thoroughly tested these myself yet.


Please review the following changes for suitability for inclusion. If you have
any objections or suggestions for improvement, please respond to the patches. If
you agree with the changes, please provide your Acked-by.

The following changes since commit 4ef5e70f531f48cef90805402c16ec02ad3f2b92:

  tcmode-default: add preference for gdb/gdbserver (2012-02-08 10:16:48 -0600)

are available in the git repository at:
  git://git.openembedded.org/openembedded-core-contrib paule/qmake-target
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/qmake-target

Paul Eggleton (4):
  qt4: fix compile error in Qt 4.8.0 with gcc 4.6
  qt4: build qmake for the target
  qt4-tools-nativesdk: fix build of 4.7.4
  qt4-tools-nativesdk: improve and tidy up qmake build

 meta/recipes-qt/qt4/files/qmake-exists-check.patch |   19 ---------
 meta/recipes-qt/qt4/files/target_qmake.patch       |   16 ++++++++
 meta/recipes-qt/qt4/qt-4.7.4.inc                   |   11 +-----
 meta/recipes-qt/qt4/qt-4.8.0.inc                   |   13 +-----
 meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch |   40 ++++++++++++++++++++
 .../recipes-qt/qt4/qt-4.8.0/webkit_no_werror.patch |   19 +++++++++
 meta/recipes-qt/qt4/qt4-embedded_4.7.4.bb          |    2 +-
 meta/recipes-qt/qt4/qt4-embedded_4.8.0.bb          |    2 +-
 meta/recipes-qt/qt4/qt4-tools-nativesdk.inc        |   29 +++++++++-----
 meta/recipes-qt/qt4/qt4-tools-nativesdk_4.8.0.bb   |    2 +
 meta/recipes-qt/qt4/qt4-x11-free_4.7.4.bb          |    2 +-
 meta/recipes-qt/qt4/qt4-x11-free_4.8.0.bb          |    2 +-
 meta/recipes-qt/qt4/qt4.inc                        |   25 +++++++++++-
 13 files changed, 125 insertions(+), 57 deletions(-)
 delete mode 100644 meta/recipes-qt/qt4/files/qmake-exists-check.patch
 create mode 100644 meta/recipes-qt/qt4/files/target_qmake.patch
 create mode 100644 meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch
 create mode 100644 meta/recipes-qt/qt4/qt-4.8.0/webkit_no_werror.patch

-- 
1.7.5.4




^ permalink raw reply	[flat|nested] 14+ messages in thread

* [RFC PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6
  2012-02-09 17:57 [RFC PATCH 0/4] qmake/qt4-tools-nativesdk fixes Paul Eggleton
@ 2012-02-09 17:57 ` Paul Eggleton
  2012-02-09 21:19   ` Khem Raj
  2012-02-09 17:57 ` [RFC PATCH 2/4] qt4: build qmake for the target Paul Eggleton
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Paul Eggleton @ 2012-02-09 17:57 UTC (permalink / raw)
  To: openembedded-core, philip, eric

Fix the following compile error (by disabling -Werror for QtWebKit):

./wtf/NullPtr.h:48:1: error: identifier 'nullptr' will become a keyword in C++0x [-Werror=c++0x-compat]

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/recipes-qt/qt4/qt-4.8.0.inc                   |    1 +
 .../recipes-qt/qt4/qt-4.8.0/webkit_no_werror.patch |   19 +++++++++++++++++++
 meta/recipes-qt/qt4/qt4-embedded_4.8.0.bb          |    2 +-
 meta/recipes-qt/qt4/qt4-x11-free_4.8.0.bb          |    2 +-
 4 files changed, 22 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-qt/qt4/qt-4.8.0/webkit_no_werror.patch

diff --git a/meta/recipes-qt/qt4/qt-4.8.0.inc b/meta/recipes-qt/qt4/qt-4.8.0.inc
index 2addbb2..e251f0a 100644
--- a/meta/recipes-qt/qt4/qt-4.8.0.inc
+++ b/meta/recipes-qt/qt4/qt-4.8.0.inc
@@ -14,6 +14,7 @@ SRC_URI = "http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-${PV}.
            file://fix-translations.patch \
            file://add_nostrip_for_debug_packages.diff \
            file://qmake_cxx_eval.patch \
+           file://webkit_no_werror.patch \
            file://g++.conf \
            file://linux.conf \
            "
diff --git a/meta/recipes-qt/qt4/qt-4.8.0/webkit_no_werror.patch b/meta/recipes-qt/qt4/qt-4.8.0/webkit_no_werror.patch
new file mode 100644
index 0000000..90eb60e
--- /dev/null
+++ b/meta/recipes-qt/qt4/qt-4.8.0/webkit_no_werror.patch
@@ -0,0 +1,19 @@
+Fix the following error during compiling with gcc 4.6:
+
+./wtf/NullPtr.h:48:1: error: identifier 'nullptr' will become a keyword in C++0x [-Werror=c++0x-compat]
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+Upstream-Status: Pending
+
+--- qt-everywhere-opensource-src-4.8.0.orig/src/3rdparty/webkit/Source/WebKit.pri
++++ qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkit/Source/WebKit.pri
+@@ -102,8 +102,6 @@ CONFIG -= warn_on
+ 
+ # Treat warnings as errors on x86/Linux/GCC
+ linux-g++* {
+-    isEqual(QT_ARCH,x86_64)|isEqual(QT_ARCH,i386): QMAKE_CXXFLAGS += -Werror
+-
+     greaterThan(QT_GCC_MAJOR_VERSION, 3):greaterThan(QT_GCC_MINOR_VERSION, 5) {
+         if (!contains(QMAKE_CXXFLAGS, -std=c++0x) && !contains(QMAKE_CXXFLAGS, -std=gnu++0x)) {
+             # We need to deactivate those warnings because some names conflicts with upcoming c++0x types (e.g.nullptr).
diff --git a/meta/recipes-qt/qt4/qt4-embedded_4.8.0.bb b/meta/recipes-qt/qt4/qt4-embedded_4.8.0.bb
index 5c1c97e..efbc02a 100644
--- a/meta/recipes-qt/qt4/qt4-embedded_4.8.0.bb
+++ b/meta/recipes-qt/qt4/qt4-embedded_4.8.0.bb
@@ -1,7 +1,7 @@
 require qt-${PV}.inc
 require qt4-embedded.inc
 
-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"
 
 DEFAULT_PREFERENCE = "-1"
 
diff --git a/meta/recipes-qt/qt4/qt4-x11-free_4.8.0.bb b/meta/recipes-qt/qt4/qt4-x11-free_4.8.0.bb
index edd3e0e..6a0b0b8 100644
--- a/meta/recipes-qt/qt4/qt4-x11-free_4.8.0.bb
+++ b/meta/recipes-qt/qt4/qt4-x11-free_4.8.0.bb
@@ -1,7 +1,7 @@
 require qt4-x11-free.inc
 require qt-${PV}.inc
 
-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"
 
 DEFAULT_PREFERENCE = "-1"
 
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [RFC PATCH 2/4] qt4: build qmake for the target
  2012-02-09 17:57 [RFC PATCH 0/4] qmake/qt4-tools-nativesdk fixes Paul Eggleton
  2012-02-09 17:57 ` [RFC PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6 Paul Eggleton
@ 2012-02-09 17:57 ` Paul Eggleton
  2012-02-09 18:18   ` Koen Kooi
  2012-02-09 17:57 ` [RFC PATCH 3/4] qt4-tools-nativesdk: fix build of 4.7.4 Paul Eggleton
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Paul Eggleton @ 2012-02-09 17:57 UTC (permalink / raw)
  To: openembedded-core, philip, eric

qmake was not being built at all (since we had the host version from
qt4-native) and the default is to build for the host machine within
configure. With a minor hack we can build qmake for the target as well,
which is useful if you want to build Qt 4 software on an actual device.

Also move do_compile() from qt-${PV}.inc up to qt4.inc as both versions
have the exact same content.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/recipes-qt/qt4/files/target_qmake.patch       |   16 ++++++++
 meta/recipes-qt/qt4/qt-4.7.4.inc                   |   11 +-----
 meta/recipes-qt/qt4/qt-4.8.0.inc                   |   12 +-----
 meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch |   40 ++++++++++++++++++++
 meta/recipes-qt/qt4/qt4-embedded_4.7.4.bb          |    2 +-
 meta/recipes-qt/qt4/qt4-x11-free_4.7.4.bb          |    2 +-
 meta/recipes-qt/qt4/qt4.inc                        |   25 +++++++++++-
 7 files changed, 83 insertions(+), 25 deletions(-)
 create mode 100644 meta/recipes-qt/qt4/files/target_qmake.patch
 create mode 100644 meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch

diff --git a/meta/recipes-qt/qt4/files/target_qmake.patch b/meta/recipes-qt/qt4/files/target_qmake.patch
new file mode 100644
index 0000000..a4650c8
--- /dev/null
+++ b/meta/recipes-qt/qt4/files/target_qmake.patch
@@ -0,0 +1,16 @@
+Allow building a separate qmake for the target
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+Upstream-Status: Inappropriate [config]
+
+--- qt-everywhere-opensource-src-4.8.0.orig/qmake/qmake.pro
++++ qt-everywhere-opensource-src-4.8.0/qmake/qmake.pro
+@@ -7,6 +7,7 @@ CONFIG += console bootstrap
+ CONFIG -= qt shared app_bundle uic
+ DEFINES += QT_BUILD_QMAKE QT_BOOTSTRAPPED
+ DESTDIR = ../bin/
++TARGET = qmake2
+ 
+ OBJECTS_DIR = .
+ MOC_DIR = .
diff --git a/meta/recipes-qt/qt4/qt-4.7.4.inc b/meta/recipes-qt/qt4/qt-4.7.4.inc
index 9ddb055..216472c 100644
--- a/meta/recipes-qt/qt4/qt-4.7.4.inc
+++ b/meta/recipes-qt/qt4/qt-4.7.4.inc
@@ -15,6 +15,7 @@ SRC_URI = "http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-${PV}.
            file://blacklist-diginotar-certs.diff \
            file://fix-translations.patch \
            file://add_nostrip_for_debug_packages.diff \
+           file://target_qmake.patch \
            file://g++.conf \
            file://linux.conf \
            file://fix-qtbug-20925.patch \
@@ -43,13 +44,3 @@ do_configure_prepend() {
     ${S}/configure
 }
 
-do_compile() {
-    # Fixup missing wsegl header in some SGX SDKs
-    if ! [ -e ${STAGING_INCDIR}/wsegl.h ] ; then
-        cp src/3rdparty/powervr/wsegl.h src/plugins/gfxdrivers/powervr/QWSWSEGL/
-    fi
-
-    unset CFLAGS CXXFLAGS
-
-    oe_runmake ${EXTRA_ENV}
-}
diff --git a/meta/recipes-qt/qt4/qt-4.8.0.inc b/meta/recipes-qt/qt4/qt-4.8.0.inc
index e251f0a..f7984bd 100644
--- a/meta/recipes-qt/qt4/qt-4.8.0.inc
+++ b/meta/recipes-qt/qt4/qt-4.8.0.inc
@@ -15,6 +15,8 @@ SRC_URI = "http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-${PV}.
            file://add_nostrip_for_debug_packages.diff \
            file://qmake_cxx_eval.patch \
            file://webkit_no_werror.patch \
+           file://target_qmake.patch \
+           file://qmake_pri_fixes.patch \
            file://g++.conf \
            file://linux.conf \
            "
@@ -50,13 +52,3 @@ do_configure_prepend() {
     unset LD
 }
 
-do_compile() {
-    # Fixup missing wsegl header in some SGX SDKs
-    if ! [ -e ${STAGING_INCDIR}/wsegl.h ] ; then
-        cp src/3rdparty/powervr/wsegl.h src/plugins/gfxdrivers/powervr/QWSWSEGL/
-    fi
-
-    unset CFLAGS CXXFLAGS
-
-    oe_runmake ${EXTRA_ENV}
-}
diff --git a/meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch b/meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch
new file mode 100644
index 0000000..6fe853a
--- /dev/null
+++ b/meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch
@@ -0,0 +1,40 @@
+qmake: fix source file references in qmake.pri
+
+Fix duplicate entries in SOURCES and HEADERS, and fix the source file
+list for the split of qlocale.cpp.
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+Upstream-Status: Pending
+
+--- qt-everywhere-opensource-src-4.8.0.orig/qmake/qmake.pri
++++ qt-everywhere-opensource-src-4.8.0/qmake/qmake.pri
+@@ -22,8 +22,7 @@ SOURCES += project.cpp property.cpp main
+            generators/symbian/initprojectdeploy_symbian.cpp \
+            generators/integrity/gbuild.cpp \
+            windows/registry.cpp \
+-           symbian/epocroot.cpp \
+-           generators/integrity/gbuild.cpp
++           symbian/epocroot.cpp
+ 
+ HEADERS += project.h property.h generators/makefile.h \
+            generators/unix/unixmake.h meta.h option.h cachekeys.h \
+@@ -40,8 +39,7 @@ HEADERS += project.h property.h generato
+            generators/symbian/initprojectdeploy_symbian.h \
+            generators/integrity/gbuild.h \
+            windows/registry_p.h \
+-           symbian/epocroot_p.h \
+-           generators/integrity/gbuild.h
++           symbian/epocroot_p.h
+ 
+ contains(QT_EDITION, OpenSource) {
+    DEFINES += QMAKE_OPENSOURCE_EDITION
+@@ -72,6 +70,8 @@ bootstrap { #Qt code
+         qlist.cpp \
+         qlinkedlist.cpp \
+         qlocale.cpp \
++        qlocale_tools.cpp \
++        qlocale_unix.cpp \
+         qmalloc.cpp \
+         qmap.cpp \
+         qmetatype.cpp \
diff --git a/meta/recipes-qt/qt4/qt4-embedded_4.7.4.bb b/meta/recipes-qt/qt4/qt4-embedded_4.7.4.bb
index 9b66d03..a1fcafb 100644
--- a/meta/recipes-qt/qt4/qt4-embedded_4.7.4.bb
+++ b/meta/recipes-qt/qt4/qt4-embedded_4.7.4.bb
@@ -1,7 +1,7 @@
 require qt-${PV}.inc
 require qt4-embedded.inc
 
-PR = "${INC_PR}.6"
+PR = "${INC_PR}.7"
 
 QT_CONFIG_FLAGS_append_armv6 = " -no-neon "
 
diff --git a/meta/recipes-qt/qt4/qt4-x11-free_4.7.4.bb b/meta/recipes-qt/qt4/qt4-x11-free_4.7.4.bb
index 6dedf00..e7f848e 100644
--- a/meta/recipes-qt/qt4/qt4-x11-free_4.7.4.bb
+++ b/meta/recipes-qt/qt4/qt4-x11-free_4.7.4.bb
@@ -1,7 +1,7 @@
 require qt4-x11-free.inc
 require qt-${PV}.inc
 
-PR = "${INC_PR}.6"
+PR = "${INC_PR}.7"
 
 QT_CONFIG_FLAGS_append_armv6 = " -no-neon "
 
diff --git a/meta/recipes-qt/qt4/qt4.inc b/meta/recipes-qt/qt4/qt4.inc
index ea868ff..53854b1 100644
--- a/meta/recipes-qt/qt4/qt4.inc
+++ b/meta/recipes-qt/qt4/qt4.inc
@@ -142,8 +142,8 @@ RRECOMMENDS_${QT_BASE_NAME}-qmlviewer += " \
 RRECOMMENDS_${QT_BASE_NAME}-doc += " \
             ${QT_BASE_NAME}-demos-doc"
 
-FILES_${QT_BASE_NAME}-tools                = "${bindir}/qttracereplay ${bindir}/qdoc* ${bindir}/moc ${bindir}/uic* ${bindir}/rcc"
-FILES_${QT_BASE_NAME}-tools-dbg            = "${bindir}/.debug/qttracereplay ${bindir}/.debug/qdoc* ${bindir}/.debug/uic* ${bindir}/.debug/moc ${bindir}/.debug/rcc"
+FILES_${QT_BASE_NAME}-tools                = "${bindir}/qttracereplay ${bindir}/qdoc* ${bindir}/qmake ${bindir}/moc ${bindir}/uic* ${bindir}/rcc"
+FILES_${QT_BASE_NAME}-tools-dbg            = "${bindir}/.debug/qttracereplay ${bindir}/.debug/qdoc* ${bindir}/.debug/qmake ${bindir}/.debug/uic* ${bindir}/.debug/moc ${bindir}/.debug/rcc"
 FILES_${QT_BASE_NAME}-assistant            = "${bindir}/*assistant* ${bindir}/qcollectiongenerator ${bindir}/qhelpconverter ${bindir}/qhelpgenerator"
 FILES_${QT_BASE_NAME}-assistant-dbg        = "${bindir}/.debug/*assistant* ${bindir}/.debug/qcollectiongenerator ${bindir}/.debug/qhelpconverter ${bindir}/.debug/qhelpgenerator"
 FILES_${QT_BASE_NAME}-common               = "${bindir}/qtconfig"
@@ -236,6 +236,24 @@ do_configure() {
 			-I${STAGING_INCDIR}/freetype2
 }
 
+do_compile() {
+    # Fixup missing wsegl header in some SGX SDKs
+    if ! [ -e ${STAGING_INCDIR}/wsegl.h ] ; then
+        cp src/3rdparty/powervr/wsegl.h src/plugins/gfxdrivers/powervr/QWSWSEGL/
+    fi
+
+    unset CFLAGS CXXFLAGS
+
+    oe_runmake ${EXTRA_ENV}
+
+    # Build target qmake
+    export QMAKESPEC="${S}/mkspecs/linux-oe-g++"
+    cd ${S}/qmake
+    ${OE_QMAKE_QMAKE}
+    oe_runmake CC="${CC}" CXX="${CXX}"
+    cd ${S}
+}
+
 python populate_packages_prepend() {
         translation_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/translations/', d)
         translation_name = bb.data.expand('${QT_BASE_NAME}-translation-%s', d)
@@ -295,8 +313,9 @@ python populate_packages_prepend() {
 do_install() {
 	oe_runmake install INSTALL_ROOT=${D}
 
-	# These are host binaries, we should only use them in staging
+	# Install a proper target version of qmake
 	rm ${D}/${bindir}/qmake
+	install -m 0755 bin/qmake2 ${D}${bindir}/qmake
 
 	# fix pkgconfig, libtool and prl files
 	sed -i -e 's#-L${S}/lib/\?##g' \
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [RFC PATCH 3/4] qt4-tools-nativesdk: fix build of 4.7.4
  2012-02-09 17:57 [RFC PATCH 0/4] qmake/qt4-tools-nativesdk fixes Paul Eggleton
  2012-02-09 17:57 ` [RFC PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6 Paul Eggleton
  2012-02-09 17:57 ` [RFC PATCH 2/4] qt4: build qmake for the target Paul Eggleton
@ 2012-02-09 17:57 ` Paul Eggleton
  2012-02-09 17:57 ` [RFC PATCH 4/4] qt4-tools-nativesdk: improve and tidy up qmake build Paul Eggleton
  2012-02-09 18:07 ` [RFC PATCH 0/4] qmake/qt4-tools-nativesdk fixes Otavio Salvador
  4 siblings, 0 replies; 14+ messages in thread
From: Paul Eggleton @ 2012-02-09 17:57 UTC (permalink / raw)
  To: openembedded-core, philip, eric

The previous commit uses sed to modify a file that only exists in 4.8.0,
thus do_configure of 4.7.4 was failing; so make this conditional upon
the file existing.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/recipes-qt/qt4/qt4-tools-nativesdk.inc |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-qt/qt4/qt4-tools-nativesdk.inc b/meta/recipes-qt/qt4/qt4-tools-nativesdk.inc
index 4b097cf..64cc1ae 100644
--- a/meta/recipes-qt/qt4/qt4-tools-nativesdk.inc
+++ b/meta/recipes-qt/qt4/qt4-tools-nativesdk.inc
@@ -4,7 +4,7 @@ SECTION = "libs"
 HOMEPAGE = "http://qt.nokia.com"
 LICENSE = "LGPLv2.1 | GPLv3"
 
-INC_PR = "r8"
+INC_PR = "r9"
 
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/qt-${PV}:"
 
@@ -59,9 +59,12 @@ do_configure() {
 
     cp ../g++.conf mkspecs/common
     cp ../linux.conf mkspecs/common
-    # don't use host g++ even during configure
-    sed -i -e "s#g++#${CXX}#" mkspecs/common/g++-base.conf
-    sed -i -e "s#gcc#${CC}#" mkspecs/common/g++-base.conf
+
+    if [ -f mkspecs/common/g++-base.conf ] ; then
+        # don't use host g++ even during configure (4.8.0+)
+        sed -i -e "s#g++#${CXX}#" mkspecs/common/g++-base.conf
+        sed -i -e "s#gcc#${CC}#" mkspecs/common/g++-base.conf
+    fi
 
     # first launch configure to get qmake compiled for the nativesdk
     (echo o; echo yes) | CC="${CC}" CXX="${CXX}" ./configure ${EXTRA_OECONF} || true
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [RFC PATCH 4/4] qt4-tools-nativesdk: improve and tidy up qmake build
  2012-02-09 17:57 [RFC PATCH 0/4] qmake/qt4-tools-nativesdk fixes Paul Eggleton
                   ` (2 preceding siblings ...)
  2012-02-09 17:57 ` [RFC PATCH 3/4] qt4-tools-nativesdk: fix build of 4.7.4 Paul Eggleton
@ 2012-02-09 17:57 ` Paul Eggleton
  2012-02-09 18:07 ` [RFC PATCH 0/4] qmake/qt4-tools-nativesdk fixes Otavio Salvador
  4 siblings, 0 replies; 14+ messages in thread
From: Paul Eggleton @ 2012-02-09 17:57 UTC (permalink / raw)
  To: openembedded-core, philip, eric

* Use the same method to build qmake as in the qt4 target recipes
* We always have qmake from qt4-native so don't check if it exists -
  just skip the check like we do in the qt4 target recipes. This
  saves us a patch.
* Replace qt4-tools-native in DEPENDS with qt4-native

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/recipes-qt/qt4/files/qmake-exists-check.patch |   19 -----------------
 meta/recipes-qt/qt4/qt4-tools-nativesdk.inc        |   22 +++++++++++--------
 meta/recipes-qt/qt4/qt4-tools-nativesdk_4.8.0.bb   |    2 +
 3 files changed, 15 insertions(+), 28 deletions(-)
 delete mode 100644 meta/recipes-qt/qt4/files/qmake-exists-check.patch

diff --git a/meta/recipes-qt/qt4/files/qmake-exists-check.patch b/meta/recipes-qt/qt4/files/qmake-exists-check.patch
deleted file mode 100644
index 27d21e0..0000000
--- a/meta/recipes-qt/qt4/files/qmake-exists-check.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-qt4-tools-nativesdk: avoid rebuilding qmake
-
-qt4-tools-nativesdk patch to avoids building qmake in configure if it already exists 
-(as it will, since we symlink it in from the native sysroot in do_configure)
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-Upstream-Status: Inappropriate [configuration]
-
---- qt-everywhere-opensource-src-4.6.3.orig/configure	2011-01-10 12:01:56.260607001 +0000
-+++ qt-everywhere-opensource-src-4.6.3/configure	2011-01-10 12:02:20.584607015 +0000
-@@ -4286,7 +4286,7 @@
- }
- 
- # build qmake
--if true; then ###[ '!' -f "$outpath/bin/qmake" ];
-+if [ '!' -f "$outpath/bin/qmake" ]; then
-     echo "Creating qmake. Please wait..."
- 
-     OLD_QCONFIG_H=
diff --git a/meta/recipes-qt/qt4/qt4-tools-nativesdk.inc b/meta/recipes-qt/qt4/qt4-tools-nativesdk.inc
index 64cc1ae..4ede78a 100644
--- a/meta/recipes-qt/qt4/qt4-tools-nativesdk.inc
+++ b/meta/recipes-qt/qt4/qt4-tools-nativesdk.inc
@@ -1,21 +1,22 @@
 DESCRIPTION = "SDK tools for Qt/[X11|Mac|Embedded] version 4.x"
-DEPENDS = "zlib-nativesdk dbus-nativesdk libx11-nativesdk qt4-tools-native"
+DEPENDS = "zlib-nativesdk dbus-nativesdk libx11-nativesdk qt4-native"
 SECTION = "libs"
 HOMEPAGE = "http://qt.nokia.com"
 LICENSE = "LGPLv2.1 | GPLv3"
 
-INC_PR = "r9"
+INC_PR = "r10"
 
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/qt-${PV}:"
 
 inherit nativesdk qmake2
 
 SRC_URI = "http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-${PV}.tar.gz \
+           file://0004-no-qmake.patch \
            file://configure-lflags.patch \
            file://qt-config.patch \
-           file://qmake-exists-check.patch \
            file://configure-paths.patch \
            file://qt-dbus-const.patch \
+           file://target_qmake.patch \
            file://g++.conf \
            file://linux.conf"
 
@@ -66,11 +67,7 @@ do_configure() {
         sed -i -e "s#gcc#${CC}#" mkspecs/common/g++-base.conf
     fi
 
-    # first launch configure to get qmake compiled for the nativesdk
-    (echo o; echo yes) | CC="${CC}" CXX="${CXX}" ./configure ${EXTRA_OECONF} || true
-
-    # then backup the binary and start again with a qmake which can run on the build host
-    mv bin/qmake bin/qmake_nativesdk
+    # Use qmake from qt4-native for building
     if [ ! -e bin/qmake ]; then
         ln -sf ${STAGING_BINDIR_NATIVE}/qmake2 bin/qmake
     fi
@@ -99,11 +96,18 @@ do_compile() {
     for i in ${TOBUILD}; do
         cd ${S}/$i && oe_runmake CC="${CC}" CXX="${CXX}"
     done
+
+    # Build nativesdk qmake
+    export QMAKESPEC="${S}/mkspecs/linux-oe-g++"
+    cd ${S}/qmake
+    ${OE_QMAKE_QMAKE}
+    oe_runmake CC="${CC}" CXX="${CXX}"
+    cd ${S}
 }
 
 do_install() {
     install -d ${D}${bindir}
-    install -m 0755 bin/qmake_nativesdk ${D}${bindir}/qmake2
+    install -m 0755 bin/qmake2 ${D}${bindir}/qmake2
     for i in moc uic uic3 rcc lrelease lupdate qdbuscpp2xml qdbusxml2cpp; do
         install -m 0755 bin/${i} ${D}${bindir}/${i}4
     done
diff --git a/meta/recipes-qt/qt4/qt4-tools-nativesdk_4.8.0.bb b/meta/recipes-qt/qt4/qt4-tools-nativesdk_4.8.0.bb
index e615d36..02917fe 100644
--- a/meta/recipes-qt/qt4/qt4-tools-nativesdk_4.8.0.bb
+++ b/meta/recipes-qt/qt4/qt4-tools-nativesdk_4.8.0.bb
@@ -2,6 +2,8 @@ require qt4-tools-nativesdk.inc
 
 PR = "${INC_PR}.0"
 
+SRC_URI += "file://qmake_pri_fixes.patch"
+
 DEFAULT_PREFERENCE = "-1"
 
 SRC_URI[md5sum] = "e8a5fdbeba2927c948d9f477a6abe904"
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [RFC PATCH 0/4] qmake/qt4-tools-nativesdk fixes
  2012-02-09 17:57 [RFC PATCH 0/4] qmake/qt4-tools-nativesdk fixes Paul Eggleton
                   ` (3 preceding siblings ...)
  2012-02-09 17:57 ` [RFC PATCH 4/4] qt4-tools-nativesdk: improve and tidy up qmake build Paul Eggleton
@ 2012-02-09 18:07 ` Otavio Salvador
  4 siblings, 0 replies; 14+ messages in thread
From: Otavio Salvador @ 2012-02-09 18:07 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 576 bytes --]

On Thu, Feb 9, 2012 at 15:57, Paul Eggleton
<paul.eggleton@linux.intel.com>wrote:

> Please review the following changes for suitability for inclusion. If you
> have
> any objections or suggestions for improvement, please respond to the
> patches. If
> you agree with the changes, please provide your Acked-by.
>

Acked-by: Otavio Salvador <otavio@ossystems.com.br>

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

[-- Attachment #2: Type: text/html, Size: 1100 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC PATCH 2/4] qt4: build qmake for the target
  2012-02-09 17:57 ` [RFC PATCH 2/4] qt4: build qmake for the target Paul Eggleton
@ 2012-02-09 18:18   ` Koen Kooi
  2012-02-09 18:22     ` Paul Eggleton
  0 siblings, 1 reply; 14+ messages in thread
From: Koen Kooi @ 2012-02-09 18:18 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer


Op 9 feb. 2012, om 18:57 heeft Paul Eggleton het volgende geschreven:

> 
> +++ b/meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch
> @@ -0,0 +1,40 @@
> +qmake: fix source file references in qmake.pri
> +
> +Fix duplicate entries in SOURCES and HEADERS, and fix the source file
> +list for the split of qlocale.cpp.
> +
> +Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> +
> +Upstream-Status: Pending

Since qt upstream is git and you're including a SOB can you please add the git-am'able version of the patches? That will also give us some more info on how old the patch is since git is really bad at tracking renames.

regards,

Koen


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC PATCH 2/4] qt4: build qmake for the target
  2012-02-09 18:18   ` Koen Kooi
@ 2012-02-09 18:22     ` Paul Eggleton
  0 siblings, 0 replies; 14+ messages in thread
From: Paul Eggleton @ 2012-02-09 18:22 UTC (permalink / raw)
  To: openembedded-core; +Cc: Koen Kooi

On Thursday 09 February 2012 19:18:19 Koen Kooi wrote:
> Op 9 feb. 2012, om 18:57 heeft Paul Eggleton het volgende geschreven:
> > +++ b/meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch
> > @@ -0,0 +1,40 @@
> > +qmake: fix source file references in qmake.pri
> > +
> > +Fix duplicate entries in SOURCES and HEADERS, and fix the source file
> > +list for the split of qlocale.cpp.
> > +
> > +Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> > +
> > +Upstream-Status: Pending
> 
> Since qt upstream is git and you're including a SOB can you please add the
> git-am'able version of the patches? That will also give us some more info
> on how old the patch is since git is really bad at tracking renames.

Ah yes, I recall you asking for this last time as well. Once I've heard from 
more people testing this I'll redo the patch against Qt git.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6
  2012-02-09 17:57 ` [RFC PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6 Paul Eggleton
@ 2012-02-09 21:19   ` Khem Raj
  2012-02-10 13:56     ` Paul Eggleton
  0 siblings, 1 reply; 14+ messages in thread
From: Khem Raj @ 2012-02-09 21:19 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Thu, Feb 9, 2012 at 9:57 AM, Paul Eggleton
<paul.eggleton@linux.intel.com> wrote:
> +Fix the following error during compiling with gcc 4.6:
> +
> +./wtf/NullPtr.h:48:1: error: identifier 'nullptr' will become a keyword in C++0x [-Werror=c++0x-compat]
> +
> +Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> +
> +Upstream-Status: Pending
> +
> +--- qt-everywhere-opensource-src-4.8.0.orig/src/3rdparty/webkit/Source/WebKit.pri
> ++++ qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkit/Source/WebKit.pri
> +@@ -102,8 +102,6 @@ CONFIG -= warn_on
> +
> + # Treat warnings as errors on x86/Linux/GCC
> + linux-g++* {
> +-    isEqual(QT_ARCH,x86_64)|isEqual(QT_ARCH,i386): QMAKE_CXXFLAGS += -Werror
> +-

since there is a namespace conflict that should be fixed IMO removing
Wrror is not quite the right
thing to do here IMO. Its a workaround but probably upstream wont
accept it. So change
nullptr here to something like qt_nullptr in source tree



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6
  2012-02-09 21:19   ` Khem Raj
@ 2012-02-10 13:56     ` Paul Eggleton
  2012-02-10 14:03       ` Phil Blundell
  2012-02-10 19:31       ` Paul Eggleton
  0 siblings, 2 replies; 14+ messages in thread
From: Paul Eggleton @ 2012-02-10 13:56 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Thursday 09 February 2012 13:19:22 Khem Raj wrote:
> since there is a namespace conflict that should be fixed IMO removing
> Wrror is not quite the right thing to do here IMO.

So removing -Werror is somewhat heavy-handed, yes; perhaps we can simply
add -Wno-error=c++0x-compat and mark this patch as inappropriate for
upstreaming instead?

> Its a workaround but probably upstream wont
> accept it. So change nullptr here to something like qt_nullptr in source
> tree

What the code is attempting to do is provide its own "nullptr" if it isn't
being provided as part of the language:

------------------------------
#if __has_feature(cxx_nullptr) || (GCC_VERSION_AT_LEAST(4, 6, 0) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && _MSC_VER >= 1600 && !COMPILER(INTEL))

#define HAVE_NULLPTR 1

#else

namespace std {
    class nullptr_t { };
}

extern std::nullptr_t nullptr;

#endif
------------------------------

gcc 4.6 is preempting this and complaining about the use of the identifier. I
don't think renaming it is going to be acceptable upstream either.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6
  2012-02-10 13:56     ` Paul Eggleton
@ 2012-02-10 14:03       ` Phil Blundell
  2012-02-10 14:09         ` Paul Eggleton
  2012-02-10 19:31       ` Paul Eggleton
  1 sibling, 1 reply; 14+ messages in thread
From: Phil Blundell @ 2012-02-10 14:03 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, 2012-02-10 at 13:56 +0000, Paul Eggleton wrote:
> What the code is attempting to do is provide its own "nullptr" if it isn't
> being provided as part of the language:
> 
> ------------------------------
> #if __has_feature(cxx_nullptr) || (GCC_VERSION_AT_LEAST(4, 6, 0) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && _MSC_VER >= 1600 && !COMPILER(INTEL))
> 
> #define HAVE_NULLPTR 1
> 
> #else
> 
> namespace std {
>     class nullptr_t { };
> }
> 
> extern std::nullptr_t nullptr;
> 
> #endif
> ------------------------------
> 
> gcc 4.6 is preempting this and complaining about the use of the identifier. I
> don't think renaming it is going to be acceptable upstream either.

Does it work if you build with -std=c++0x?  If Qt is doing the above
then presumably it is at least attempting to be compatible with C++0X.

p. 




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6
  2012-02-10 14:03       ` Phil Blundell
@ 2012-02-10 14:09         ` Paul Eggleton
  0 siblings, 0 replies; 14+ messages in thread
From: Paul Eggleton @ 2012-02-10 14:09 UTC (permalink / raw)
  To: openembedded-core; +Cc: Phil Blundell

On Friday 10 February 2012 14:03:06 Phil Blundell wrote:
> On Fri, 2012-02-10 at 13:56 +0000, Paul Eggleton wrote:
> > What the code is attempting to do is provide its own "nullptr" if it isn't
> > being provided as part of the language:
> > 
> > ------------------------------
> > #if __has_feature(cxx_nullptr) || (GCC_VERSION_AT_LEAST(4, 6, 0) &&
> > defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && _MSC_VER >=
> > 1600 && !COMPILER(INTEL))
> > 
> > #define HAVE_NULLPTR 1
> > 
> > #else
> > 
> > namespace std {
> > 
> >     class nullptr_t { };
> > 
> > }
> > 
> > extern std::nullptr_t nullptr;
> > 
> > #endif
> > ------------------------------
> > 
> > gcc 4.6 is preempting this and complaining about the use of the
> > identifier. I don't think renaming it is going to be acceptable upstream
> > either.

> Does it work if you build with -std=c++0x?

It does, yes (well, compiling the above code on its own anyway).

-- 

Paul Eggleton
Intel Open Source Technology Centre



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6
  2012-02-10 13:56     ` Paul Eggleton
  2012-02-10 14:03       ` Phil Blundell
@ 2012-02-10 19:31       ` Paul Eggleton
  2012-02-10 20:36         ` Khem Raj
  1 sibling, 1 reply; 14+ messages in thread
From: Paul Eggleton @ 2012-02-10 19:31 UTC (permalink / raw)
  To: openembedded-core

On Friday 10 February 2012 13:56:44 Paul Eggleton wrote:
> On Thursday 09 February 2012 13:19:22 Khem Raj wrote:
> > since there is a namespace conflict that should be fixed IMO removing
> > Wrror is not quite the right thing to do here IMO.
> 
> So removing -Werror is somewhat heavy-handed, yes; perhaps we can simply
> add -Wno-error=c++0x-compat and mark this patch as inappropriate for
> upstreaming instead?

So, I dug further into this, and I discovered that the reason for this 
breaking was that the Qt configure script thought we were not using g++ as the 
C++ compiler (!) thus it did not detect the gcc version, and therefore when it 
came to the check to see if gcc 4.6+ was being used in order to add the -Wno-
c++0x-compat option to CXXFLAGS (which it already has code to do), the version 
was not set and the option was not added.

I've updated the contrib branch to fix this as well as reformat the other patch 
as Koen requested.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6
  2012-02-10 19:31       ` Paul Eggleton
@ 2012-02-10 20:36         ` Khem Raj
  0 siblings, 0 replies; 14+ messages in thread
From: Khem Raj @ 2012-02-10 20:36 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, Feb 10, 2012 at 11:31 AM, Paul Eggleton
<paul.eggleton@linux.intel.com> wrote:
>
> So, I dug further into this, and I discovered that the reason for this
> breaking was that the Qt configure script thought we were not using g++ as the
> C++ compiler (!) thus it did not detect the gcc version, and therefore when it
> came to the check to see if gcc 4.6+ was being used in order to add the -Wno-
> c++0x-compat option to CXXFLAGS (which it already has code to do), the version
> was not set and the option was not added.
>
> I've updated the contrib branch to fix this as well as reformat the other patch
> as Koen requested.

Thanks for redoing it.



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-02-10 20:44 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-09 17:57 [RFC PATCH 0/4] qmake/qt4-tools-nativesdk fixes Paul Eggleton
2012-02-09 17:57 ` [RFC PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6 Paul Eggleton
2012-02-09 21:19   ` Khem Raj
2012-02-10 13:56     ` Paul Eggleton
2012-02-10 14:03       ` Phil Blundell
2012-02-10 14:09         ` Paul Eggleton
2012-02-10 19:31       ` Paul Eggleton
2012-02-10 20:36         ` Khem Raj
2012-02-09 17:57 ` [RFC PATCH 2/4] qt4: build qmake for the target Paul Eggleton
2012-02-09 18:18   ` Koen Kooi
2012-02-09 18:22     ` Paul Eggleton
2012-02-09 17:57 ` [RFC PATCH 3/4] qt4-tools-nativesdk: fix build of 4.7.4 Paul Eggleton
2012-02-09 17:57 ` [RFC PATCH 4/4] qt4-tools-nativesdk: improve and tidy up qmake build Paul Eggleton
2012-02-09 18:07 ` [RFC PATCH 0/4] qmake/qt4-tools-nativesdk fixes Otavio Salvador

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.