# HG changeset patch # User Mark Brand # Date 1301952427 -7200 # Node ID 1a22655f516b9bca1c0d5dc3684ac53a8d151317 # Parent 40b57471f44a4c50cd03b34786dca73b9a660724 package qt: fix linking order issue diff -r 40b57471f44a -r 1a22655f516b src/qt-1-cherrypicks.patch --- a/src/qt-1-cherrypicks.patch Mon Apr 04 16:05:56 2011 +0200 +++ b/src/qt-1-cherrypicks.patch Mon Apr 04 23:27:07 2011 +0200 @@ -7,7 +7,7 @@ From 8f36bff28b648f65845cd56255a6c5b2cb7f8e42 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Fri, 15 Oct 2010 14:56:03 +0200 -Subject: [PATCH 01/14] removed obsolete -qt-gif configure option +Subject: [PATCH 01/16] removed obsolete -qt-gif configure option Since "-system-gif" is not offered, offering "-qt-gif" is unnecessary and perhaps misleading. By default the GIF handler is built from code @@ -90,7 +90,7 @@ From 6f97b6dab051bc2899907ac794495bc7542d4337 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Mon, 10 Jan 2011 16:41:54 +0100 -Subject: [PATCH 02/14] qmake: fix double directory separator +Subject: [PATCH 02/16] qmake: fix double directory separator Merge-request: 2543 Reviewed-by: Oswald Buddenhagen @@ -126,7 +126,7 @@ From da69fe08f058ac49788559d333bcec747b94d208 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Mon, 10 Jan 2011 16:41:55 +0100 -Subject: [PATCH 03/14] qmake: don't limit pkg-config writing to unix generator +Subject: [PATCH 03/16] qmake: don't limit pkg-config writing to unix generator Move pkg-config related methods from unix generator to base class so they can be used by other generators too. @@ -553,7 +553,7 @@ From c870095011276897127ed801570d0b4cce79d552 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Mon, 10 Jan 2011 16:41:56 +0100 -Subject: [PATCH 04/14] qmake: write and install pkg-config files for mingw +Subject: [PATCH 04/16] qmake: write and install pkg-config files for mingw Merge-request: 2543 Reviewed-by: Oswald Buddenhagen @@ -607,7 +607,7 @@ From 8414d5630e66546be5d5eb0e832c80dcddea5d77 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Mon, 10 Jan 2011 16:41:57 +0100 -Subject: [PATCH 05/14] qt project files: create pkg-config files for mingw +Subject: [PATCH 05/16] qt project files: create pkg-config files for mingw This is mostly the same as for unix. @@ -940,7 +940,7 @@ From 1cf4420ae5221d649880cc0d2e1b1895a19ad106 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Mon, 10 Jan 2011 20:21:05 +0100 -Subject: [PATCH 06/14] Fix static build on Windows with MinGW. +Subject: [PATCH 06/16] Fix static build on Windows with MinGW. Q_DECL_IMPORT is still __declspec(dllimport), which is unsuitable for static code. @@ -1127,7 +1127,7 @@ From e285e9993d4f2c6823782840d89f44c1bab74afa Mon Sep 17 00:00:00 2001 From: Bernhard Rosenkraenzer Date: Thu, 27 Jan 2011 13:48:13 +0100 -Subject: [PATCH 07/14] Allow the user to select imageformats to be built as plugin vs internal +Subject: [PATCH 07/16] Allow the user to select imageformats to be built as plugin vs internal This adds what is already there for different plugin types to imageformats plugins -- allowing the user to configure which @@ -1235,7 +1235,7 @@ From 095583fb68a8ae02fd16790eaaa922693d268443 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Tue, 16 Nov 2010 20:06:28 +0100 -Subject: [PATCH 08/14] explicitly include -llcms for -lmng (mingw-cross-env specific) +Subject: [PATCH 08/16] explicitly include -llcms for -lmng (mingw-cross-env specific) --- src/gui/image/qmnghandler.pri | 2 +- @@ -1261,7 +1261,7 @@ From 3baf871e135d70edbc2431038708886d2795b8b3 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Sat, 5 Jun 2010 23:41:04 +0200 -Subject: [PATCH 09/14] added missing INSTALLS to JavaScriptCore.pro for static libjscore (mingw-cross-env specific) +Subject: [PATCH 09/16] added missing INSTALLS to JavaScriptCore.pro for static libjscore (mingw-cross-env specific) For static build of Qt on win32-g++*, applications using webkit link to libjscore.a. @@ -1293,7 +1293,7 @@ From 9e5d4702daa1168ab14ba936014dd6a7bb5671c9 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Tue, 9 Nov 2010 20:09:45 +0100 -Subject: [PATCH 10/14] Partially restored support for static linking of QtWebKit (mingw-cross-env specific) +Subject: [PATCH 10/16] Partially restored support for static linking of QtWebKit (mingw-cross-env specific) Support was removed by 4221d629e2cf37ee8c5ba7cb595b05ab8c82f113. Static QtWebkit might be supported by mingw-cross-env. @@ -1325,7 +1325,7 @@ From 61064254a0c5c2c3785909acf60cabdbdcb18d5b Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Thu, 6 Jan 2011 14:21:32 +0100 -Subject: [PATCH 11/14] pkg-config file for jscore (mingw-cross-env specific) +Subject: [PATCH 11/16] pkg-config file for jscore (mingw-cross-env specific) --- .../webkit/JavaScriptCore/JavaScriptCore.pro | 8 ++++++++ @@ -1354,7 +1354,7 @@ From 0ad5aac2fdc0f2e81f94c92867bb4e15b3da3ddf Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Mon, 21 Feb 2011 22:22:04 +0100 -Subject: [PATCH 12/14] workaround for native build on OSX (mingw-cross-env specific) +Subject: [PATCH 12/16] workaround for native build on OSX (mingw-cross-env specific) The native build complains about: "You are building a 64-bit application, but using a 32-bit version of @@ -1385,7 +1385,7 @@ From db85d5c4df98ee12261f62fa637e629b120680a6 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 10 Jan 2011 20:09:24 +0100 -Subject: [PATCH 13/14] fix -enable-stdcall-fixup usage +Subject: [PATCH 13/16] fix -enable-stdcall-fixup usage the leading "-Wl," was apparently accidentally split off to the wrong line. @@ -1416,15 +1416,19 @@ 1.7.4.1 -From ed4c5f0a04a90da94c1b9ea9cd504b7ad1e14ae1 Mon Sep 17 00:00:00 2001 +From 201fa69318fa3367463bbda1c14857eaa0622dab Mon Sep 17 00:00:00 2001 From: Mark Brand -Date: Sun, 27 Mar 2011 20:55:48 +0200 -Subject: [PATCH 14/14] fix -enable-stdcall-fixup usage +Date: Mon, 28 Mar 2011 13:33:58 +0200 +Subject: [PATCH 14/16] fix -enable-stdcall-fixup usage the leading "-Wl," was apparently accidentally split off to the wrong line. Originally done in 0953ee3 for mkspecs/win32-g++. + +Merge-request: 1154 +Reviewed-by: Oswald Buddenhagen +(cherry picked from commit 1dac22d30849f0dfb38f281c59afc886b1046bb3) --- mkspecs/unsupported/win32-g++-cross/qmake.conf | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) @@ -1447,3 +1451,112 @@ -- 1.7.4.1 + +From fb824ac4fa8cc94269c0f02128f68b473693f3e3 Mon Sep 17 00:00:00 2001 +From: Jonathan Liu +Date: Mon, 4 Apr 2011 13:01:48 +0200 +Subject: [PATCH 15/16] win32-g++: Correct the order of linked Windows libraries + +On Windows 7, kernel32.dll exports many of the same functions as +advapi32.dll. If executables link to these functions in kernel32.dll +instead of advapi32.dll, running these executables on older versions +of Windows will cause an entry point error. This would occur due to +kernel32 being specified before advapi32. + +To resolve this issue, advapi32 is specified before kernel32 when +linking. + +Task-number: QTBUG-18537 +Merge-request: 1169 +Reviewed-by: Oswald Buddenhagen +(cherry picked from commit a6d48ca57403539ab8e00d16f80bd4cd334e1b5c) +--- + mkspecs/win32-g++/qmake.conf | 2 +- + qmake/Makefile.win32-g++ | 2 +- + qmake/Makefile.win32-g++-sh | 2 +- + qmake/qmake.pri | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf +index 2d9833b..bf69999 100644 +--- a/mkspecs/win32-g++/qmake.conf ++++ b/mkspecs/win32-g++/qmake.conf +@@ -65,7 +65,7 @@ QMAKE_LINK_OBJECT_SCRIPT= object_script + + + QMAKE_LIBS = +-QMAKE_LIBS_CORE = -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32 ++QMAKE_LIBS_CORE = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 + QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lws2_32 -lole32 -luuid -luser32 -ladvapi32 + QMAKE_LIBS_NETWORK = -lws2_32 + QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32 +diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++ +index 29fbd0a..5a46e41 100644 +--- a/qmake/Makefile.win32-g++ ++++ b/qmake/Makefile.win32-g++ +@@ -28,7 +28,7 @@ CFLAGS = -c -o$@ -O \ + -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT + CXXFLAGS = $(CFLAGS) + LFLAGS = -static-libgcc -static-libstdc++ -s +-LIBS = -lole32 -luuid ++LIBS = -lole32 -luuid -ladvapi32 -lkernel32 + LINKQMAKE = g++ $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS) + ADDCLEAN = + +diff --git a/qmake/Makefile.win32-g++-sh b/qmake/Makefile.win32-g++-sh +index 9c7942c..6ca7514 100644 +--- a/qmake/Makefile.win32-g++-sh ++++ b/qmake/Makefile.win32-g++-sh +@@ -28,7 +28,7 @@ CFLAGS = -c -o$@ -O \ + -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT + CXXFLAGS = $(CFLAGS) + LFLAGS = -static-libgcc -static-libstdc++ -s +-LIBS = -lole32 -luuid ++LIBS = -lole32 -luuid -ladvapi32 -lkernel32 + LINKQMAKE = g++ $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS) + ADDCLEAN = + +diff --git a/qmake/qmake.pri b/qmake/qmake.pri +index 8f46a2e..3a0ab12 100644 +--- a/qmake/qmake.pri ++++ b/qmake/qmake.pri +@@ -135,7 +135,7 @@ bootstrap { #Qt code + SOURCES += qfsfileengine_win.cpp qfsfileengine_iterator_win.cpp qsettings_win.cpp \ + qsystemlibrary.cpp + win32-msvc*:LIBS += ole32.lib advapi32.lib +- win32-g++*:LIBS += -lole32 -luuid ++ win32-g++*:LIBS += -lole32 -luuid -ladvapi32 -lkernel32 + } + + qnx { +-- +1.7.4.1 + + +From aeea4172988bd2963d040128fa3fa3fb568f5482 Mon Sep 17 00:00:00 2001 +From: Mark Brand +Date: Mon, 4 Apr 2011 23:09:58 +0200 +Subject: [PATCH 16/16] win32-g++: Correct the order of linked Windows libraries + +Commit a6d48ca corrected the problem for win32-g++. Here we do the same +for win32-g++-cross. +--- + mkspecs/unsupported/win32-g++-cross/qmake.conf | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/mkspecs/unsupported/win32-g++-cross/qmake.conf b/mkspecs/unsupported/win32-g++-cross/qmake.conf +index efc3de2..6eed244 100644 +--- a/mkspecs/unsupported/win32-g++-cross/qmake.conf ++++ b/mkspecs/unsupported/win32-g++-cross/qmake.conf +@@ -65,7 +65,7 @@ QMAKE_LINK_OBJECT_SCRIPT= object_script + + + QMAKE_LIBS = +-QMAKE_LIBS_CORE = -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32 ++QMAKE_LIBS_CORE = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 + QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lws2_32 -lole32 -luuid -luser32 -ladvapi32 + QMAKE_LIBS_NETWORK = -lws2_32 + QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32 +-- +1.7.4.1 +