summaryrefslogtreecommitdiff
path: root/rbutil
diff options
context:
space:
mode:
authorFranklin Wei <franklin@rockbox.org>2019-11-09 20:52:08 -0500
committerFranklin Wei <franklin@rockbox.org>2019-11-09 20:54:57 -0500
commita5f228eee2240c3d12f0d03b51adad5603cb10d3 (patch)
treeb1f514917f817ef973dc1aa935ff7b5979f2099b /rbutil
parent1925d043a2d98caacc669ded319a7e1fcd197ef8 (diff)
downloadrockbox-a5f228eee2240c3d12f0d03b51adad5603cb10d3.tar.gz
rockbox-a5f228eee2240c3d12f0d03b51adad5603cb10d3.zip
rbutil: fix windows cross compile (via M cross environment)
This fixes a couple of issues when cross-compiling for windows: - lib builds (i.e. mks5lboot) were overriding the cross CC/CXX with the native CC, producing incompatible binaries. - Qt made the accessibility plugin part of the core library, so we no longer need to import it. Change-Id: I9d884aee62dfa51d3624a3fa9b99c23b3b375f20
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/Makefile.libs20
-rw-r--r--rbutil/rbutilqt/main.cpp6
-rw-r--r--rbutil/rbutilqt/rbutilqt.pro7
3 files changed, 22 insertions, 11 deletions
diff --git a/rbutil/rbutilqt/Makefile.libs b/rbutil/rbutilqt/Makefile.libs
index bd0dc121af..fc304fef14 100644
--- a/rbutil/rbutilqt/Makefile.libs
+++ b/rbutil/rbutilqt/Makefile.libs
@@ -29,10 +29,14 @@ export TARGET_DIR
29export RBBASE_DIR 29export RBBASE_DIR
30export CFLAGS=$(EXTRALIB_CFLAGS) 30export CFLAGS=$(EXTRALIB_CFLAGS)
31export CC=$(EXTRALIBS_CC) 31export CC=$(EXTRALIBS_CC)
32export CXX=$(EXTRALIBS_CXX)
32export AR=$(EXTRALIBS_AR) 33export AR=$(EXTRALIBS_AR)
33 34
34libs: librbspeex libucl libipodpatcher libsansapatcher libmkamsboot libmktccboot libmkmpioboot libchinachippatcher libmkimxboot libmks5lboot 35libs: librbspeex libucl libipodpatcher libsansapatcher libmkamsboot libmktccboot libmkmpioboot libchinachippatcher libmkimxboot libmks5lboot
35 36
37# To support cross compiles, we explicitly pass the CC flag below for
38# all tools which override CC or CXX in their makefiles. CXX is only
39# used by mkimxboot.
36 40
37librbspeex: 41librbspeex:
38 $(SILENT) $(MAKE) -C $(RBBASE_DIR)/tools/rbspeex BUILD_DIR=$(BUILD_DIR)/libspeex librbspeex.a 42 $(SILENT) $(MAKE) -C $(RBBASE_DIR)/tools/rbspeex BUILD_DIR=$(BUILD_DIR)/libspeex librbspeex.a
@@ -41,25 +45,25 @@ libucl:
41 $(SILENT)$(MAKE) -C $(RBBASE_DIR)/tools/ucl/src BUILD_DIR=$(BUILD_DIR)/ucl libucl.a 45 $(SILENT)$(MAKE) -C $(RBBASE_DIR)/tools/ucl/src BUILD_DIR=$(BUILD_DIR)/ucl libucl.a
42 46
43libipodpatcher: 47libipodpatcher:
44 $(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/ipodpatcher BUILD_DIR=$(BUILD_DIR)/ipodpatcher libipodpatcher.a 48 $(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/ipodpatcher BUILD_DIR=$(BUILD_DIR)/ipodpatcher libipodpatcher.a CC=$(CC)
45 49
46libsansapatcher: 50libsansapatcher:
47 $(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/sansapatcher BUILD_DIR=$(BUILD_DIR)/sansapatcher libsansapatcher.a 51 $(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/sansapatcher BUILD_DIR=$(BUILD_DIR)/sansapatcher libsansapatcher.a CC=$(CC)
48 52
49libmkamsboot: 53libmkamsboot:
50 $(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/mkamsboot BUILD_DIR=$(BUILD_DIR)/mkamsboot libmkamsboot.a 54 $(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/mkamsboot BUILD_DIR=$(BUILD_DIR)/mkamsboot libmkamsboot.a CC=$(CC)
51 55
52libmktccboot: 56libmktccboot:
53 $(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/mktccboot BUILD_DIR=$(BUILD_DIR)/mktccboot libmktccboot.a 57 $(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/mktccboot BUILD_DIR=$(BUILD_DIR)/mktccboot libmktccboot.a CC=$(CC)
54 58
55libmkmpioboot: 59libmkmpioboot:
56 $(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/mkmpioboot BUILD_DIR=$(BUILD_DIR)/mkmpioboot libmkmpioboot.a 60 $(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/mkmpioboot BUILD_DIR=$(BUILD_DIR)/mkmpioboot libmkmpioboot.a CC=$(CC)
57 61
58libchinachippatcher: 62libchinachippatcher:
59 $(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/chinachippatcher BUILD_DIR=$(BUILD_DIR)/chinachippatcher libchinachippatcher.a 63 $(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/chinachippatcher BUILD_DIR=$(BUILD_DIR)/chinachippatcher libchinachippatcher.a CC=$(CC)
60 64
61libmkimxboot: 65libmkimxboot:
62 $(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/mkimxboot BUILD_DIR=$(BUILD_DIR)/mkimxboot libmkimxboot.a 66 $(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/mkimxboot BUILD_DIR=$(BUILD_DIR)/mkimxboot libmkimxboot.a CC=$(CC) CXX=$(CXX)
63 67
64libmks5lboot: 68libmks5lboot:
65 $(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/mks5lboot BUILD_DIR=$(BUILD_DIR)/mks5lboot libmks5lboot.a 69 $(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/mks5lboot BUILD_DIR=$(BUILD_DIR)/mks5lboot libmks5lboot.a CC=$(CC)
diff --git a/rbutil/rbutilqt/main.cpp b/rbutil/rbutilqt/main.cpp
index f950d20403..93fb0f4b31 100644
--- a/rbutil/rbutilqt/main.cpp
+++ b/rbutil/rbutilqt/main.cpp
@@ -29,7 +29,11 @@
29#include <QtPlugin> 29#include <QtPlugin>
30#if QT_VERSION < 0x050000 30#if QT_VERSION < 0x050000
31Q_IMPORT_PLUGIN(qtaccessiblewidgets) 31Q_IMPORT_PLUGIN(qtaccessiblewidgets)
32#else 32#elif QT_VERSION < 0x050400
33/*
34 * accessibility is no longer a plugin after 5.4.0:
35 * <https://bugreports.qt.io/browse/QTBUG-37957?focusedCommentId=239189&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-239189>
36 */
33Q_IMPORT_PLUGIN(AccessibleFactory) 37Q_IMPORT_PLUGIN(AccessibleFactory)
34#endif 38#endif
35#endif 39#endif
diff --git a/rbutil/rbutilqt/rbutilqt.pro b/rbutil/rbutilqt/rbutilqt.pro
index cfd6fb39ab..43d74e59d7 100644
--- a/rbutil/rbutilqt/rbutilqt.pro
+++ b/rbutil/rbutilqt/rbutilqt.pro
@@ -32,6 +32,7 @@ unix:!mac:!noccache {
32} 32}
33MACHINEFLAGS = $$find(QMAKE_CFLAGS, -m[63][42]) 33MACHINEFLAGS = $$find(QMAKE_CFLAGS, -m[63][42])
34EXTRALIBS_OPTS += EXTRALIBS_CC=\"$$QMAKE_CC\" 34EXTRALIBS_OPTS += EXTRALIBS_CC=\"$$QMAKE_CC\"
35EXTRALIBS_OPTS += EXTRALIBS_CXX=\"$$QMAKE_CXX\"
35EXTRALIBS_OPTS += EXTRALIB_CFLAGS=\"$$MACHINEFLAGS\" \ 36EXTRALIBS_OPTS += EXTRALIB_CFLAGS=\"$$MACHINEFLAGS\" \
36 37
37MYBUILDDIR = $$OUT_PWD/build/ 38MYBUILDDIR = $$OUT_PWD/build/
@@ -251,8 +252,10 @@ macx {
251} 252}
252 253
253static { 254static {
254 QTPLUGIN += qtaccessiblewidgets 255 if(equals(QT_MAJOR_VERSION, 5) : lessThan(QT_MINOR_VERSION, 4)) | lessThan(QT_MAJOR_VERSION, 5) {
255 LIBS += -L$$(QT_BUILD_TREE)/plugins/accessible -lqtaccessiblewidgets 256 QTPLUGIN += qtaccessiblewidgets
257 LIBS += -L$$(QT_BUILD_TREE)/plugins/accessible -lqtaccessiblewidgets
258 }
256 LIBS += -L. 259 LIBS += -L.
257 DEFINES += STATIC 260 DEFINES += STATIC
258 message("using static plugin") 261 message("using static plugin")