summaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch')
-rw-r--r--recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch84
1 files changed, 65 insertions, 19 deletions
diff --git a/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch b/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch
index cddd6210..f2a7c0ec 100644
--- a/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch
+++ b/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch
@@ -1,7 +1,7 @@
1From 2c2e479049c49539049db7e53d500e673285025f Mon Sep 17 00:00:00 2001 1From c5b50848ead7de12ec18cd30940d74d92b974280 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com> 2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Mon, 15 Apr 2013 04:29:32 +0200 3Date: Mon, 15 Apr 2013 04:29:32 +0200
4Subject: [PATCH 01/17] Add linux-oe-g++ platform 4Subject: [PATCH 01/12] Add linux-oe-g++ platform
5 5
6* This qmake.conf unlike other platforms reads most variables from 6* This qmake.conf unlike other platforms reads most variables from
7 shell environment, because it's easier for qt recipes to export 7 shell environment, because it's easier for qt recipes to export
@@ -11,6 +11,14 @@ Subject: [PATCH 01/17] Add linux-oe-g++ platform
11 Allow expansion of $(...) references from qmake.conf to generate 11 Allow expansion of $(...) references from qmake.conf to generate
12 qmake environment from shell environment as exported by qmake5_base 12 qmake environment from shell environment as exported by qmake5_base
13 13
14* configure: don't export SYSTEM_VARIABLES to .qmake.vars
15 linux-oe-g++ should handle this correctly and exporting LD as QMAKE_LINK is
16 causing issues as we need g++ to be used as linker
17
18* configure.prf: Allow to add extra arguments to make
19 sometimes we would like to add -e or define some variable and respect it from both
20 Makefiles used in configure tests and also Makefiles to build the application
21
14* OE_QMAKE_CXX in order to allow compiler version check to succeed 22* OE_QMAKE_CXX in order to allow compiler version check to succeed
15 which allows WebKit to be enabled. 23 which allows WebKit to be enabled.
16 24
@@ -29,19 +37,21 @@ Subject: [PATCH 01/17] Add linux-oe-g++ platform
29 /bin/sh: line 0: test: -gt: unary operator expected 37 /bin/sh: line 0: test: -gt: unary operator expected
30 which are not fatal, but still misleading in do_configure output 38 which are not fatal, but still misleading in do_configure output
31 39
32Upstream-Status: Pending 40Upstream-Status: Inappropriate [embedded specific]
41 too OE specific, probably cannot be upstreamed
33 42
34Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> 43Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
35--- 44---
36 configure | 54 ++++++++++++++++--- 45 configure | 66 ++++++++++++++++-------
46 mkspecs/features/configure.prf | 4 +-
37 mkspecs/linux-oe-g++/qmake.conf | 40 ++++++++++++++ 47 mkspecs/linux-oe-g++/qmake.conf | 40 ++++++++++++++
38 mkspecs/linux-oe-g++/qplatformdefs.h | 100 +++++++++++++++++++++++++++++++++++ 48 mkspecs/linux-oe-g++/qplatformdefs.h | 100 +++++++++++++++++++++++++++++++++++
39 3 files changed, 187 insertions(+), 7 deletions(-) 49 4 files changed, 188 insertions(+), 22 deletions(-)
40 create mode 100644 mkspecs/linux-oe-g++/qmake.conf 50 create mode 100644 mkspecs/linux-oe-g++/qmake.conf
41 create mode 100644 mkspecs/linux-oe-g++/qplatformdefs.h 51 create mode 100644 mkspecs/linux-oe-g++/qplatformdefs.h
42 52
43diff --git a/configure b/configure 53diff --git a/configure b/configure
44index 601d84a..eaa4092 100755 54index d5c2b08..4eae0d3 100755
45--- a/configure 55--- a/configure
46+++ b/configure 56+++ b/configure
47@@ -324,6 +324,16 @@ getQMakeConf() 57@@ -324,6 +324,16 @@ getQMakeConf()
@@ -78,26 +88,37 @@ index 601d84a..eaa4092 100755
78 compilerSupportsFlag() 88 compilerSupportsFlag()
79 { 89 {
80 cat >conftest.cpp <<EOF 90 cat >conftest.cpp <<EOF
81@@ -548,6 +568,18 @@ fi 91@@ -548,21 +568,19 @@ fi
82 # initalize variables 92 # initalize variables
83 #------------------------------------------------------------------------------- 93 #-------------------------------------------------------------------------------
84 94
95-SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
96-for varname in $SYSTEM_VARIABLES; do
85+# Export all OE variables for qmake.conf from shell env to QMakeVars 97+# Export all OE variables for qmake.conf from shell env to QMakeVars
86+OE_VARIABLES="AR CC CFLAGS COMPILER CXX CXXFLAGS LDFLAGS LINK QT_CONFIG STRIP" 98+OE_VARIABLES="AR CC CFLAGS COMPILER CXX CXXFLAGS LDFLAGS LINK QT_CONFIG STRIP"
87+for varname in $OE_VARIABLES; do 99+for varname in $OE_VARIABLES; do
88+ qmakevarname="${varname}" 100 qmakevarname="${varname}"
89+ cmd=`echo \ 101- # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
102- if [ "${varname}" = "LDFLAGS" ]; then
103- qmakevarname="LFLAGS"
104- elif [ "${varname}" = "LD" ]; then
105- qmakevarname="LINK"
106- fi
107 cmd=`echo \
108-'if [ -n "\$'${varname}'" ]; then
109- QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
90+'if [ -n "\$OE_QMAKE_'${varname}'" ]; then 110+'if [ -n "\$OE_QMAKE_'${varname}'" ]; then
91+ QMakeVar set OE_QMAKE_'${qmakevarname}' "\$OE_QMAKE_'${varname}'" 111+ QMakeVar set OE_QMAKE_'${qmakevarname}' "\$OE_QMAKE_'${varname}'"
92+# echo "Exporting OE_QMAKE_'${qmakevarname}' value=\"\$OE_QMAKE_'${varname}'\"" >&2 112+# echo "Exporting OE_QMAKE_'${qmakevarname}' value=\"\$OE_QMAKE_'${varname}'\"" >&2
93+fi'` 113 fi'`
94+ eval "$cmd" 114 eval "$cmd"
95+done 115 done
96+ 116+
97 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS" 117+SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
98 for varname in $SYSTEM_VARIABLES; do 118 # Use CC/CXX to run config.tests
99 qmakevarname="${varname}" 119 mkdir -p "$outpath/config.tests"
100@@ -3117,7 +3149,7 @@ if [ "$XPLATFORM_MAC" = "yes" ]; then 120 rm -f "$outpath/config.tests/.qmake.cache"
121@@ -3140,7 +3158,7 @@ if [ "$XPLATFORM_MAC" = "yes" ]; then
101 [ "$CFG_QGTKSTYLE" = "auto" ] && CFG_QGTKSTYLE=no 122 [ "$CFG_QGTKSTYLE" = "auto" ] && CFG_QGTKSTYLE=no
102 fi 123 fi
103 124
@@ -106,7 +127,7 @@ index 601d84a..eaa4092 100755
106 127
107 TEST_COMPILER=$QMAKE_CONF_COMPILER 128 TEST_COMPILER=$QMAKE_CONF_COMPILER
108 129
109@@ -3152,7 +3184,7 @@ if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then 130@@ -3175,7 +3193,7 @@ if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
110 exit 1 131 exit 1
111 fi 132 fi
112 fi 133 fi
@@ -115,7 +136,7 @@ index 601d84a..eaa4092 100755
115 136
116 GCC_MACHINE_DUMP= 137 GCC_MACHINE_DUMP=
117 case "$TEST_COMPILER" in *g++) GCC_MACHINE_DUMP=$($TEST_COMPILER -dumpmachine);; esac 138 case "$TEST_COMPILER" in *g++) GCC_MACHINE_DUMP=$($TEST_COMPILER -dumpmachine);; esac
118@@ -3617,6 +3649,14 @@ setBootstrapVariable() 139@@ -3633,6 +3651,14 @@ setBootstrapVariable()
119 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile" 140 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
120 } 141 }
121 142
@@ -130,23 +151,48 @@ index 601d84a..eaa4092 100755
130 # build qmake 151 # build qmake
131 if true; then ###[ '!' -f "$outpath/bin/qmake" ]; 152 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
132 echo "Creating qmake..." 153 echo "Creating qmake..."
133@@ -3655,11 +3695,11 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; 154@@ -3671,14 +3697,14 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
134 fi 155 fi
135 156
136 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM= 157 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
137- setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM" 158- setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
138- setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM" 159- setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
139- setBootstrapVariable QMAKE_CFLAGS 160- setBootstrapVariable QMAKE_CFLAGS
161- setBootstrapVariable QMAKE_CFLAGS_SPLIT_SECTIONS
140- setBootstrapVariable QMAKE_CXXFLAGS 162- setBootstrapVariable QMAKE_CXXFLAGS
163- setBootstrapVariable QMAKE_CXXFLAGS_SPLIT_SECTIONS
141- setBootstrapVariable QMAKE_LFLAGS 164- setBootstrapVariable QMAKE_LFLAGS
165- setBootstrapVariable QMAKE_LFLAGS_GCSECTIONS
142+ setBootstrapEvalVariable QMAKE_CC CC "$CC_TRANSFORM" 166+ setBootstrapEvalVariable QMAKE_CC CC "$CC_TRANSFORM"
143+ setBootstrapEvalVariable QMAKE_CXX CXX "$CC_TRANSFORM" 167+ setBootstrapEvalVariable QMAKE_CXX CXX "$CC_TRANSFORM"
144+ setBootstrapEvalVariable QMAKE_CFLAGS 168+ setBootstrapEvalVariable QMAKE_CFLAGS
169+ setBootstrapEvalVariable QMAKE_CFLAGS_SPLIT_SECTIONS
145+ setBootstrapEvalVariable QMAKE_CXXFLAGS 170+ setBootstrapEvalVariable QMAKE_CXXFLAGS
171+ setBootstrapEvalVariable QMAKE_CXXFLAGS_SPLIT_SECTIONS
146+ setBootstrapEvalVariable QMAKE_LFLAGS 172+ setBootstrapEvalVariable QMAKE_LFLAGS
173+ setBootstrapEvalVariable QMAKE_LFLAGS_GCSECTIONS
147 174
148 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then 175 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
149 setBootstrapVariable QMAKE_CFLAGS_RELEASE 176 setBootstrapVariable QMAKE_CFLAGS_RELEASE
177diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf
178index fe41c54..e2db923 100644
179--- a/mkspecs/features/configure.prf
180+++ b/mkspecs/features/configure.prf
181@@ -60,12 +60,12 @@ defineTest(qtCompileTest) {
182 }
183
184 # Clean up after previous run
185- exists($$test_out_dir/Makefile):qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE distclean")
186+ exists($$test_out_dir/Makefile):qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE $$(QMAKE_MAKE_ARGS) distclean")
187
188 mkpath($$test_out_dir)|error("Aborting.")
189
190 qtRunLoggedCommand("$$test_cmd_base $$system_quote($$system_path($$QMAKE_QMAKE)) $$qmake_configs $$shell_quote($$test_dir)") {
191- qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE") {
192+ qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE $$(QMAKE_MAKE_ARGS)") {
193 log("yes$$escape_expand(\\n)")
194 msg = "test $$1 succeeded"
195 write_file($$QMAKE_CONFIG_LOG, msg, append)
150diff --git a/mkspecs/linux-oe-g++/qmake.conf b/mkspecs/linux-oe-g++/qmake.conf 196diff --git a/mkspecs/linux-oe-g++/qmake.conf b/mkspecs/linux-oe-g++/qmake.conf
151new file mode 100644 197new file mode 100644
152index 0000000..ca26b10 198index 0000000..ca26b10