diff options
author | Samuli Piippo <samuli.piippo@qt.io> | 2016-09-07 10:06:40 +0300 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@qt.io> | 2016-09-30 09:03:09 +0000 |
commit | 9195d9dc805fd3132023ff33bc77ace1f3f7e40f (patch) | |
tree | deb85ffd58ce712d2ff0b5b5d49ec496232dfcc9 /recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch | |
parent | d7ebb6ce9b49eb52c325e73d92157d874e9cf907 (diff) | |
download | meta-qt5-9195d9dc805fd3132023ff33bc77ace1f3f7e40f.tar.gz |
qt5: update to Qt 5.8
The linux-oe-g++ mkspec is changed to use $$(...) operator to obtain
the contents of an environment value when qmake is run instead of when
Makefile is processed. All OE_QMAKE_xxx variables need to be exported
for qmake to find them. configure's setBootstrapVariable function needs
to change $$(..) to normal $(...) operator to work with qmake's Makefile.
qt.conf generation for qtbase recipes is not needed, as configure will
generate its own version based on configure arguments. Skip running
qmake, since configure is now automatically invoked when it's run in
qtbase's root folder.
Change-Id: I4c937c1acb3d204ac4560090cab3d0fc7e0e815a
Reviewed-by: Risto Avila <risto.avila@qt.io>
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
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.patch | 204 |
1 files changed, 52 insertions, 152 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 43ce9bf2..5f703dac 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,4 +1,4 @@ | |||
1 | From d6c75f788e15fb552eacb08359698a1342a97f20 Mon Sep 17 00:00:00 2001 | 1 | From 93c50c089f2f6d7aa1cd947386813e368100c3c6 Mon Sep 17 00:00:00 2001 |
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | 2 | From: Martin Jansa <Martin.Jansa@gmail.com> |
3 | Date: Mon, 15 Apr 2013 04:29:32 +0200 | 3 | Date: Mon, 15 Apr 2013 04:29:32 +0200 |
4 | Subject: [PATCH] Add linux-oe-g++ platform | 4 | Subject: [PATCH] Add linux-oe-g++ platform |
@@ -7,172 +7,55 @@ Subject: [PATCH] Add linux-oe-g++ platform | |||
7 | shell environment, because it's easier for qt recipes to export | 7 | shell environment, because it's easier for qt recipes to export |
8 | *FLAGS or CC specific for given recipe | 8 | *FLAGS or CC specific for given recipe |
9 | 9 | ||
10 | * configure: add getQEvalMakeConf and getXQEvalMakeConf | 10 | * configure: extend setBootstrapVariable to convert $$(...) operator |
11 | Allow expansion of $(...) references from qmake.conf to generate | 11 | to $(...) operator to work in qmake's Makefiles |
12 | qmake environment from shell environment as exported by qmake5_base | ||
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 | 12 | ||
18 | * configure.prf: Allow to add extra arguments to make | 13 | * 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 | 14 | 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 | 15 | Makefiles used in configure tests and also Makefiles to build the application |
21 | 16 | ||
22 | * OE_QMAKE_CXX in order to allow compiler version check to succeed | ||
23 | which allows WebKit to be enabled. | ||
24 | |||
25 | * Other variables in order to let config.tests to use our -platform | ||
26 | settings | ||
27 | |||
28 | * Add setBootstrapEvalVariable to bootstrap qmake with our environment | ||
29 | too, this allows us to use -platform linux-oe-g++ also for native | ||
30 | recipe | ||
31 | |||
32 | * disable gdb_dwarf_index | ||
33 | * qmake is trying to call native gdb and we don't depend on gdb-native | ||
34 | (or even provide gdb-native) | ||
35 | * fixes errors like this: | ||
36 | /bin/sh: gdb: command not found | ||
37 | /bin/sh: line 0: test: -gt: unary operator expected | ||
38 | which are not fatal, but still misleading in do_configure output | ||
39 | |||
40 | Upstream-Status: Inappropriate [embedded specific] | 17 | Upstream-Status: Inappropriate [embedded specific] |
41 | too OE specific, probably cannot be upstreamed | 18 | too OE specific, probably cannot be upstreamed |
42 | 19 | ||
43 | Change-Id: I0591ed5da0d61d7cf1509d420e6b293582f1863c | 20 | Change-Id: I0591ed5da0d61d7cf1509d420e6b293582f1863c |
44 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | 21 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> |
45 | --- | 22 | --- |
46 | configure | 55 ++++++++++++------- | 23 | configure | 2 +- |
47 | mkspecs/features/configure.prf | 4 +- | 24 | mkspecs/features/configure.prf | 4 +- |
48 | mkspecs/linux-oe-g++/qmake.conf | 42 +++++++++++++++ | 25 | mkspecs/features/qt_functions.prf | 2 +- |
26 | mkspecs/linux-oe-g++/qmake.conf | 43 +++++++++++++++ | ||
49 | mkspecs/linux-oe-g++/qplatformdefs.h | 100 +++++++++++++++++++++++++++++++++++ | 27 | mkspecs/linux-oe-g++/qplatformdefs.h | 100 +++++++++++++++++++++++++++++++++++ |
50 | 4 files changed, 181 insertions(+), 20 deletions(-) | 28 | mkspecs/oe-device-extra.pri | 0 |
29 | 6 files changed, 147 insertions(+), 4 deletions(-) | ||
51 | create mode 100644 mkspecs/linux-oe-g++/qmake.conf | 30 | create mode 100644 mkspecs/linux-oe-g++/qmake.conf |
52 | create mode 100644 mkspecs/linux-oe-g++/qplatformdefs.h | 31 | create mode 100644 mkspecs/linux-oe-g++/qplatformdefs.h |
32 | create mode 100644 mkspecs/oe-device-extra.pri | ||
53 | 33 | ||
54 | diff --git a/configure b/configure | 34 | diff --git a/configure b/configure |
55 | index 0ba0c31..052872e 100755 | 35 | index 789ba4c..269f69d 100755 |
56 | --- a/configure | 36 | --- a/configure |
57 | +++ b/configure | 37 | +++ b/configure |
58 | @@ -333,6 +333,16 @@ getQMakeConf() | 38 | @@ -1624,7 +1624,7 @@ fi |
59 | getSingleQMakeVariable "$1" "$specvals" | 39 | # is where the resulting variable is written to |
60 | } | 40 | setBootstrapVariable() |
61 | |||
62 | +# OE qmake.conf is reading some variables from shell env | ||
63 | +# read them from qmake.conf, replace qmake () syntax with shell and eval | ||
64 | +getQEvalMakeConf() | ||
65 | +{ | ||
66 | + VAL=`getQMakeConf "$1" | sed -n 's/$[(]\([0-9a-zA-Z_]*\)[)]/$\1/pg'` | ||
67 | + EVAL=`eval "echo ${VAL}"` | ||
68 | +# echo "Running getQEvalMakeConf: var='$1', val='`getQMakeConf \"$1\"`, val-sed='$VAL', eval='$EVAL'" >&2 | ||
69 | + eval "echo ${VAL}" | ||
70 | +} | ||
71 | + | ||
72 | getXQMakeConf() | ||
73 | { | ||
74 | if [ -z "$xspecvals" ]; then | ||
75 | @@ -357,6 +367,16 @@ testXConfig() | ||
76 | esac | ||
77 | } | ||
78 | |||
79 | +# OE qmake.conf is reading some variables from shell env | ||
80 | +# read them from qmake.conf, replace qmake () syntax with shell and eval | ||
81 | +getXQEvalMakeConf() | ||
82 | +{ | ||
83 | + VAL=`getXQMakeConf "$1" | sed -n 's/$[(]\([0-9a-zA-Z_]*\)[)]/$\1/pg'` | ||
84 | + EVAL=`eval "echo ${VAL}"` | ||
85 | +# echo "Running getXQEvalMakeConf: var='$1', val='`getXQMakeConf \"$1\"`, val-sed='$VAL', eval='$EVAL'" >&2 | ||
86 | + eval "echo ${VAL}" | ||
87 | +} | ||
88 | + | ||
89 | compilerSupportsFlag() | ||
90 | { | 41 | { |
91 | cat >conftest.cpp <<EOF | 42 | - getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile" |
92 | @@ -578,24 +598,14 @@ fi | 43 | + getQMakeConf "$1" | sed 's:\$\$(:\$(:' | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile" |
93 | # initalize variables | ||
94 | #------------------------------------------------------------------------------- | ||
95 | |||
96 | -SYSTEM_VARIABLES="AR RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS" | ||
97 | -for varname in $SYSTEM_VARIABLES; do | ||
98 | +# Export all OE variables for qmake.conf from shell env to QMakeVars | ||
99 | +OE_VARIABLES="AR CC CFLAGS COMPILER CXX CXXFLAGS LDFLAGS LINK QT_CONFIG STRIP" | ||
100 | +for varname in $OE_VARIABLES; do | ||
101 | qmakevarname="${varname}" | ||
102 | - qmakecmdargs="" | ||
103 | - # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS | ||
104 | - if [ "${varname}" = "LDFLAGS" ]; then | ||
105 | - qmakevarname="LFLAGS" | ||
106 | - elif [ "${varname}" = "LD" ]; then | ||
107 | - qmakevarname="LINK" | ||
108 | - elif [ "${varname}" = "AR" ]; then | ||
109 | - # QMAKE_AR needs to be set to "/path/to/ar cqs" but the | ||
110 | - # environment variable will be set to the command only so we | ||
111 | - # need to append " cqs" for autoconf compatibility | ||
112 | - qmakecmdargs=" cqs" | ||
113 | - fi | ||
114 | cmd=`echo \ | ||
115 | -'if [ -n "\$'${varname}'" ]; then | ||
116 | - QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}${qmakecmdargs}'" | ||
117 | +'if [ -n "\$OE_QMAKE_'${varname}'" ]; then | ||
118 | + QMakeVar set OE_QMAKE_'${qmakevarname}' "\$OE_QMAKE_'${varname}'" | ||
119 | +# echo "Exporting OE_QMAKE_'${qmakevarname}' value=\"\$OE_QMAKE_'${varname}'\"" >&2 | ||
120 | fi'` | ||
121 | eval "$cmd" | ||
122 | done | ||
123 | @@ -3443,7 +3453,7 @@ if [ "$XPLATFORM_MAC" = "yes" ]; then | ||
124 | [ "$CFG_GTK" = "auto" ] && CFG_GTK=no | ||
125 | fi | ||
126 | |||
127 | -QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX` | ||
128 | +QMAKE_CONF_COMPILER=`getXQEvalMakeConf QMAKE_CXX` | ||
129 | |||
130 | TEST_COMPILER=$QMAKE_CONF_COMPILER | ||
131 | |||
132 | @@ -3494,7 +3504,7 @@ if [ "$XPLATFORM_ANDROID" = "yes" ] ; then | ||
133 | fi | ||
134 | fi | ||
135 | |||
136 | -TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS` | ||
137 | +TEST_COMPILER_CXXFLAGS=`getXQEvalMakeConf QMAKE_CXXFLAGS` | ||
138 | |||
139 | GCC_MACHINE_DUMP= | ||
140 | case "$TEST_COMPILER" in *g++) GCC_MACHINE_DUMP=$($TEST_COMPILER -dumpmachine);; esac | ||
141 | @@ -3893,6 +3903,14 @@ setBootstrapVariable() | ||
142 | getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile" | ||
143 | } | 44 | } |
144 | 45 | ||
145 | +# OE qmake.conf is reading some variables from shell env | ||
146 | +# read them from qmake.conf, replace qmake () syntax with shell and eval | ||
147 | +setBootstrapEvalVariable() | ||
148 | +{ | ||
149 | + getQEvalMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile" | ||
150 | +} | ||
151 | + | ||
152 | + | ||
153 | # build qmake | 46 | # build qmake |
154 | if true; then ###[ '!' -f "$outpath/bin/qmake" ]; | ||
155 | echo "Creating qmake..." | ||
156 | @@ -3986,6 +4004,7 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; | ||
157 | EXEEXT= | ||
158 | ;; | ||
159 | esac | ||
160 | + | ||
161 | if [ "$BUILD_ON_MAC" = "yes" ]; then | ||
162 | echo "COCOA_LFLAGS =-framework Foundation -framework CoreServices" >>"$mkfile" | ||
163 | echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile" | ||
164 | diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf | 47 | diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf |
165 | index a890c7f..151630c 100644 | 48 | index f275e3a..5aa15f5 100644 |
166 | --- a/mkspecs/features/configure.prf | 49 | --- a/mkspecs/features/configure.prf |
167 | +++ b/mkspecs/features/configure.prf | 50 | +++ b/mkspecs/features/configure.prf |
168 | @@ -71,14 +71,14 @@ defineTest(qtCompileTest) { | 51 | @@ -37,14 +37,14 @@ defineTest(qtCompileTest) { |
169 | } | 52 | } |
170 | 53 | ||
171 | # Clean up after previous run | 54 | # Clean up after previous run |
172 | - exists($$test_out_dir/Makefile):qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE distclean") | 55 | - exists($$test_out_dir/Makefile):qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE distclean") |
173 | + exists($$test_out_dir/Makefile):qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE $$(QMAKE_MAKE_ARGS) distclean") | 56 | + exists($$test_out_dir/Makefile):qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE $$(QMAKE_MAKE_ARGS) distclean") |
174 | 57 | ||
175 | mkpath($$test_out_dir)|error("Aborting.") | 58 | mkpath($$test_out_dir)|error() |
176 | 59 | ||
177 | !isEmpty (QMAKE_QTCONF): qtconfarg = -qtconf $$QMAKE_QTCONF | 60 | !isEmpty (QMAKE_QTCONF): qtconfarg = -qtconf $$QMAKE_QTCONF |
178 | 61 | ||
@@ -182,12 +65,25 @@ index a890c7f..151630c 100644 | |||
182 | log("yes$$escape_expand(\\n)") | 65 | log("yes$$escape_expand(\\n)") |
183 | msg = "test $$1 succeeded" | 66 | msg = "test $$1 succeeded" |
184 | write_file($$QMAKE_CONFIG_LOG, msg, append) | 67 | write_file($$QMAKE_CONFIG_LOG, msg, append) |
68 | diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf | ||
69 | index efbf2fa..78b453c 100644 | ||
70 | --- a/mkspecs/features/qt_functions.prf | ||
71 | +++ b/mkspecs/features/qt_functions.prf | ||
72 | @@ -67,7 +67,7 @@ defineTest(qtHaveModule) { | ||
73 | defineTest(qtPrepareTool) { | ||
74 | cmd = $$eval(QT_TOOL.$${2}.binary) | ||
75 | isEmpty(cmd) { | ||
76 | - cmd = $$[QT_HOST_BINS]/$$2 | ||
77 | + cmd = $$[QT_HOST_BINS/get]/$$2 | ||
78 | exists($${cmd}.pl) { | ||
79 | $${1}_EXE = $${cmd}.pl | ||
80 | cmd = perl -w $$system_path($${cmd}.pl) | ||
185 | diff --git a/mkspecs/linux-oe-g++/qmake.conf b/mkspecs/linux-oe-g++/qmake.conf | 81 | diff --git a/mkspecs/linux-oe-g++/qmake.conf b/mkspecs/linux-oe-g++/qmake.conf |
186 | new file mode 100644 | 82 | new file mode 100644 |
187 | index 0000000..311ba04 | 83 | index 0000000..dd8d5c2 |
188 | --- /dev/null | 84 | --- /dev/null |
189 | +++ b/mkspecs/linux-oe-g++/qmake.conf | 85 | +++ b/mkspecs/linux-oe-g++/qmake.conf |
190 | @@ -0,0 +1,42 @@ | 86 | @@ -0,0 +1,43 @@ |
191 | +# | 87 | +# |
192 | +# qmake configuration for linux-g++ with modifications for building with OpenEmbedded | 88 | +# qmake configuration for linux-g++ with modifications for building with OpenEmbedded |
193 | +# | 89 | +# |
@@ -199,36 +95,37 @@ index 0000000..311ba04 | |||
199 | +include(../common/linux.conf) | 95 | +include(../common/linux.conf) |
200 | + | 96 | + |
201 | +# QMAKE_<TOOL> (moc, uic, rcc) are gone, overwrite only ar and strip | 97 | +# QMAKE_<TOOL> (moc, uic, rcc) are gone, overwrite only ar and strip |
202 | +QMAKE_AR = $(OE_QMAKE_AR) cqs | 98 | +QMAKE_AR = $$(OE_QMAKE_AR) cqs |
203 | +QMAKE_STRIP = $(OE_QMAKE_STRIP) | 99 | +QMAKE_STRIP = $$(OE_QMAKE_STRIP) |
204 | +QMAKE_WAYLAND_SCANNER = $(OE_QMAKE_WAYLAND_SCANNER) | 100 | +QMAKE_WAYLAND_SCANNER = $$(OE_QMAKE_WAYLAND_SCANNER) |
205 | + | 101 | + |
206 | +include(../common/gcc-base-unix.conf) | 102 | +include(../common/gcc-base-unix.conf) |
207 | + | 103 | + |
208 | +# *FLAGS from gcc-base.conf | 104 | +# *FLAGS from gcc-base.conf |
209 | +QMAKE_CFLAGS += $(OE_QMAKE_CFLAGS) | 105 | +QMAKE_CFLAGS += $$(OE_QMAKE_CFLAGS) |
210 | +QMAKE_CXXFLAGS += $(OE_QMAKE_CXXFLAGS) | 106 | +QMAKE_CXXFLAGS += $$(OE_QMAKE_CXXFLAGS) |
211 | +QMAKE_LFLAGS += $(OE_QMAKE_LDFLAGS) | 107 | +QMAKE_LFLAGS += $$(OE_QMAKE_LDFLAGS) |
212 | + | 108 | + |
213 | +include(../common/g++-unix.conf) | 109 | +include(../common/g++-unix.conf) |
214 | + | 110 | + |
215 | +# tc settings from g++-base.conf | 111 | +# tc settings from g++-base.conf |
216 | +QMAKE_COMPILER = $(OE_QMAKE_COMPILER) gcc | 112 | +QMAKE_COMPILER = $$(OE_QMAKE_COMPILER) gcc |
217 | +QMAKE_CC = $(OE_QMAKE_CC) | 113 | +QMAKE_CC = $$(OE_QMAKE_CC) |
218 | +QMAKE_CXX = $(OE_QMAKE_CXX) | 114 | +QMAKE_CXX = $$(OE_QMAKE_CXX) |
219 | + | 115 | + |
220 | +QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $(OE_QMAKE_CFLAGS) | 116 | +QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$(OE_QMAKE_CFLAGS) |
221 | + | 117 | + |
222 | +QMAKE_LINK = $(OE_QMAKE_LINK) | 118 | +QMAKE_LINK = $$(OE_QMAKE_LINK) |
223 | +QMAKE_LINK_SHLIB = $(OE_QMAKE_LINK) | 119 | +QMAKE_LINK_SHLIB = $$(OE_QMAKE_LINK) |
224 | +QMAKE_LINK_C = $(OE_QMAKE_LINK) | 120 | +QMAKE_LINK_C = $$(OE_QMAKE_LINK) |
225 | +QMAKE_LINK_C_SHLIB = $(OE_QMAKE_LINK) | 121 | +QMAKE_LINK_C_SHLIB = $$(OE_QMAKE_LINK) |
226 | + | 122 | + |
227 | +# for the SDK | 123 | +# for the SDK |
228 | +isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG = $(OE_QMAKE_QT_CONFIG) | 124 | +isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG = $$(OE_QMAKE_QT_CONFIG) |
229 | + | 125 | + |
230 | +include(../oe-device-extra.pri) | 126 | +include(../oe-device-extra.pri) |
231 | + | 127 | + |
128 | +load(device_config) | ||
232 | +load(qt_config) | 129 | +load(qt_config) |
233 | diff --git a/mkspecs/linux-oe-g++/qplatformdefs.h b/mkspecs/linux-oe-g++/qplatformdefs.h | 130 | diff --git a/mkspecs/linux-oe-g++/qplatformdefs.h b/mkspecs/linux-oe-g++/qplatformdefs.h |
234 | new file mode 100644 | 131 | new file mode 100644 |
@@ -336,3 +233,6 @@ index 0000000..dd12003 | |||
336 | +#endif | 233 | +#endif |
337 | + | 234 | + |
338 | +#endif // QPLATFORMDEFS_H | 235 | +#endif // QPLATFORMDEFS_H |
236 | diff --git a/mkspecs/oe-device-extra.pri b/mkspecs/oe-device-extra.pri | ||
237 | new file mode 100644 | ||
238 | index 0000000..e69de29 | ||