aboutsummaryrefslogtreecommitdiff
path: root/depends/patches
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2017-01-27 12:10:13 -0500
committerCory Fields <cory-nospam-@coryfields.com>2017-01-28 01:54:30 -0500
commitb5f374fef71ba2ba99e3d9629b66fd1491fd7c90 (patch)
treeb0b6316ee3b1f7f34fa41aeab8ac90c8e65e9cfe /depends/patches
parent8efa34fb772bb320e657d18751f1751a4ee48731 (diff)
qt: fix build with zlib for target
This contains a few hacks very specific to Qt's buildsystem. These can be reverted once we split the build between native and target builds. Qt's build contains a circular dependency when not using a system zlib. By far the easiest fix is to switch to a system zlib, rather than Qt's own. However, that confuses Qt's cross build which assumes that when using a system zlib, it should also find a system (native) zlib for native tools. The build breaks if that zlib is not present. To solve this: 1. Always use a system zlib rather than the one provided by qt 2. Set force_bootstrap, which instructs the build tools to be built as though we're cross-compiling (build != target) 3. For build tools, use qt's internal zlib so that a native zlib is not required. Step 3 means that if any zlib headers are found by the native build, it will confuse Qt's internal zlib build. So we also need to make sure that the target headers/libs aren't found. To do so, specify that our cflags/cxxflags/cppflags/ldflags only apply for non-host builds.
Diffstat (limited to 'depends/patches')
-rw-r--r--depends/patches/qt/mac-qmake.conf8
1 files changed, 4 insertions, 4 deletions
diff --git a/depends/patches/qt/mac-qmake.conf b/depends/patches/qt/mac-qmake.conf
index f565fe3e75..ca70d30b15 100644
--- a/depends/patches/qt/mac-qmake.conf
+++ b/depends/patches/qt/mac-qmake.conf
@@ -14,10 +14,10 @@ QMAKE_MAC_SDK.macosx.Path = $${MAC_SDK_PATH}
QMAKE_MAC_SDK.macosx.platform_name = macosx
QMAKE_MAC_SDK.macosx.SDKVersion = $${MAC_SDK_VERSION}
QMAKE_MAC_SDK.macosx.PlatformPath = /phony
-QMAKE_CFLAGS += -target $${MAC_TARGET}
-QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS
-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
-QMAKE_LFLAGS += -target $${MAC_TARGET} -mlinker-version=$${MAC_LD64_VERSION}
+!host_build: QMAKE_CFLAGS += -target $${MAC_TARGET}
+!host_build: QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS
+!host_build: QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
+!host_build: QMAKE_LFLAGS += -target $${MAC_TARGET} -mlinker-version=$${MAC_LD64_VERSION}
QMAKE_AR = $${CROSS_COMPILE}ar cq
QMAKE_RANLIB=$${CROSS_COMPILE}ranlib
QMAKE_LIBTOOL=$${CROSS_COMPILE}libtool