parent
904ba2aa40
commit
c870027cc2
@ -1,10 +0,0 @@
|
||||
--- old/qtbase/mkspecs/common/android-base-head.conf
|
||||
+++ new/qtbase/mkspecs/common/android-base-head.conf
|
||||
@@ -72,6 +72,6 @@ CROSS_COMPILE = $$NDK_TOOLCHAIN_PATH/bin/$$NDK_TOOLS_PREFIX-
|
||||
QMAKE_PCH_OUTPUT_EXT = .gch
|
||||
|
||||
QMAKE_CFLAGS_PRECOMPILE = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
|
||||
-QMAKE_CFLAGS_USE_PRECOMPILE = -include ${QMAKE_PCH_OUTPUT_BASE}
|
||||
+QMAKE_CFLAGS_USE_PRECOMPILE = -include-pch ${QMAKE_PCH_OUTPUT}
|
||||
QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
|
||||
QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
|
@ -1,193 +0,0 @@
|
||||
--- old/qtbase/mkspecs/common/mac.conf
|
||||
+++ new/qtbase/mkspecs/common/mac.conf
|
||||
@@ -14,7 +14,6 @@
|
||||
|
||||
QMAKE_RESOURCE = /Developer/Tools/Rez
|
||||
QMAKE_EXTENSION_SHLIB = dylib
|
||||
-QMAKE_EXTENSIONS_AUX_SHLIB = tbd
|
||||
QMAKE_LIBDIR =
|
||||
|
||||
# sdk.prf will prefix the proper SDK sysroot
|
||||
|
||||
--- old/qtbase/mkspecs/features/qmake_use.prf
|
||||
+++ new/qtbase/mkspecs/features/qmake_use.prf
|
||||
@@ -22,6 +22,8 @@
|
||||
!defined(QMAKE_LIBS_$$nu, var): \
|
||||
error("Library '$$lower($$replace(nu, _, -))' is not defined.")
|
||||
|
||||
+ QMAKE_LIBDIR += $$eval(QMAKE_LIBDIR_$$nu)
|
||||
+
|
||||
debug: \
|
||||
LIBS$${suffix} += $$eval(QMAKE_LIBS_$${nu}_DEBUG) $$eval(QMAKE_LIBS_$$nu)
|
||||
else: \
|
||||
|
||||
--- old/qtbase/mkspecs/features/qt_configure.prf
|
||||
+++ new/qtbase/mkspecs/features/qt_configure.prf
|
||||
@@ -526,98 +526,23 @@
|
||||
return($$sysrootified)
|
||||
}
|
||||
|
||||
-# libs-var, libs, in-paths, out-paths-var
|
||||
+# libs-var, libs, in-paths
|
||||
defineTest(qtConfResolveLibs) {
|
||||
- ret = true
|
||||
- paths = $$3
|
||||
- out =
|
||||
- copy = false
|
||||
- for (l, 2) {
|
||||
- $$copy {
|
||||
- copy = false
|
||||
- out += $$l
|
||||
- } else: equals(l, "-s") {
|
||||
- # em++ flag to link libraries from emscripten-ports; passed on literally.
|
||||
- copy = true
|
||||
- out += $$l
|
||||
- } else: contains(l, "^-L.*") {
|
||||
- lp = $$replace(l, "^-L", )
|
||||
- gcc: lp = $$qtGccSysrootifiedPath($$lp)
|
||||
- !exists($$lp/.) {
|
||||
- qtLog("Library path $$val_escape(lp) is invalid.")
|
||||
- ret = false
|
||||
- } else {
|
||||
- paths += $$lp
|
||||
- }
|
||||
- } else: contains(l, "^-l.*") {
|
||||
- lib = $$replace(l, "^-l", )
|
||||
- lcan =
|
||||
- integrity:contains(lib, "^.*\\.a") {
|
||||
- # INTEGRITY compiler searches for exact filename
|
||||
- # if -l argument has .a suffix
|
||||
- lcan += $${lib}
|
||||
- } else: contains(lib, "^:.*") {
|
||||
- # Use exact filename when -l:filename syntax is used.
|
||||
- lib ~= s/^://
|
||||
- lcan += $${lib}
|
||||
- } else: unix {
|
||||
- # Under UNIX, we look for actual shared libraries, in addition
|
||||
- # to static ones.
|
||||
- shexts = $$QMAKE_EXTENSION_SHLIB $$QMAKE_EXTENSIONS_AUX_SHLIB
|
||||
- for (ext, shexts) {
|
||||
- lcan += $${QMAKE_PREFIX_SHLIB}$${lib}.$${ext}
|
||||
- }
|
||||
- lcan += \
|
||||
- $${QMAKE_PREFIX_STATICLIB}$${lib}.$${QMAKE_EXTENSION_STATICLIB}
|
||||
- } else {
|
||||
- # Under Windows, we look only for static libraries, as even for DLLs
|
||||
- # one actually links against a static import library.
|
||||
- mingw {
|
||||
- lcan += \
|
||||
- # MinGW supports UNIX-style library naming in addition to
|
||||
- # the MSVC style.
|
||||
- lib$${lib}.dll.a lib$${lib}.a \
|
||||
- # Fun fact: prefix-less libraries are also supported.
|
||||
- $${lib}.dll.a $${lib}.a
|
||||
- }
|
||||
- lcan += $${lib}.lib
|
||||
- }
|
||||
- l = $$qtConfFindInPathList($$lcan, $$paths $$EXTRA_LIBDIR $$QMAKE_DEFAULT_LIBDIRS)
|
||||
- isEmpty(l) {
|
||||
- qtLog("None of [$$val_escape(lcan)] found in [$$val_escape(paths)] and global paths.")
|
||||
- ret = false
|
||||
- } else {
|
||||
- out += $$l
|
||||
- }
|
||||
- } else {
|
||||
- out += $$l
|
||||
- }
|
||||
- }
|
||||
- $$1 = $$out
|
||||
+ for (path, 3): \
|
||||
+ pre_lflags += -L$$path
|
||||
+ $$1 = $$pre_lflags $$2
|
||||
export($$1)
|
||||
- !isEmpty(4) {
|
||||
- $$4 = $$paths
|
||||
- export($$4)
|
||||
- }
|
||||
- return($$ret)
|
||||
-}
|
||||
-
|
||||
-# source-var
|
||||
-defineTest(qtConfResolveAllLibs) {
|
||||
- ret = true
|
||||
- !qtConfResolveLibs($${1}.libs, $$eval($${1}.libs), , $${1}.libdirs): \
|
||||
- ret = false
|
||||
- for (b, $${1}.builds._KEYS_): \
|
||||
- !qtConfResolveLibs($${1}.builds.$${b}, $$eval($${1}.builds.$${b}), $$eval($${1}.libdirs), ): \
|
||||
- ret = false
|
||||
- return($$ret)
|
||||
+ return(true)
|
||||
}
|
||||
|
||||
# libs-var, in-paths, libs
|
||||
defineTest(qtConfResolvePathLibs) {
|
||||
ret = true
|
||||
- gcc: 2 = $$qtGccSysrootifiedPaths($$2)
|
||||
- for (libdir, 2) {
|
||||
+ gcc: \
|
||||
+ local_paths = $$qtGccSysrootifiedPaths($$2)
|
||||
+ else: \
|
||||
+ local_paths = $$2
|
||||
+ for (libdir, local_paths) {
|
||||
!exists($$libdir/.) {
|
||||
qtLog("Library path $$val_escape(libdir) is invalid.")
|
||||
ret = false
|
||||
@@ -667,8 +592,11 @@
|
||||
# includes-var, in-paths, test-object-var
|
||||
defineTest(qtConfResolvePathIncs) {
|
||||
ret = true
|
||||
- gcc: 2 = $$qtGccSysrootifiedPaths($$2)
|
||||
- for (incdir, 2) {
|
||||
+ gcc: \
|
||||
+ local_paths = $$qtGccSysrootifiedPaths($$2)
|
||||
+ else: \
|
||||
+ local_paths = $$2
|
||||
+ for (incdir, local_paths) {
|
||||
!exists($$incdir/.) {
|
||||
qtLog("Include path $$val_escape(incdir) is invalid.")
|
||||
ret = false
|
||||
@@ -727,6 +655,7 @@
|
||||
vars += $$eval(config.commandline.rev_assignments.$${iv})
|
||||
defined(config.input.$${iv}, var) {
|
||||
eval($${1}.builds.$${b} = $$eval(config.input.$${iv}))
|
||||
+ export($${1}.builds.$${b})
|
||||
$${1}.builds._KEYS_ *= $${b}
|
||||
any = true
|
||||
} else {
|
||||
@@ -741,11 +670,14 @@
|
||||
export($${1}.builds._KEYS_)
|
||||
# we also reset the generic libs, to avoid surprises.
|
||||
$${1}.libs =
|
||||
+ export($${1}.libs)
|
||||
}
|
||||
|
||||
# direct libs. overwrites inline libs.
|
||||
- defined(config.input.$${input}.libs, var): \
|
||||
+ defined(config.input.$${input}.libs, var) {
|
||||
eval($${1}.libs = $$eval(config.input.$${input}.libs))
|
||||
+ export($${1}.libs)
|
||||
+ }
|
||||
|
||||
includes = $$eval(config.input.$${input}.incdir)
|
||||
|
||||
@@ -754,6 +686,7 @@
|
||||
!isEmpty(prefix) {
|
||||
includes += $$prefix/include
|
||||
$${1}.libs = -L$$prefix/lib $$eval($${1}.libs)
|
||||
+ export($${1}.libs)
|
||||
}
|
||||
|
||||
libdir = $$eval(config.input.$${input}.libdir)
|
||||
@@ -762,11 +695,9 @@
|
||||
for (ld, libdir): \
|
||||
libs += -L$$ld
|
||||
$${1}.libs = $$libs $$eval($${1}.libs)
|
||||
+ export($${1}.libs)
|
||||
}
|
||||
|
||||
- !qtConfResolveAllLibs($$1): \
|
||||
- return(false)
|
||||
-
|
||||
!qtConfResolvePathIncs($${1}.includedir, $$includes, $$2): \
|
||||
return(false)
|
||||
|
@ -1,122 +0,0 @@
|
||||
Follow Google's BuildSystemMaintainers doc to support future NDK releases.
|
||||
|
||||
Upstream commit:
|
||||
- Qt 5.14: 9b14950ff600a4ce5a8698b67ab38907c50417f1
|
||||
|
||||
--- old/qtbase/mkspecs/android-clang/qmake.conf
|
||||
+++ new/qtbase/mkspecs/android-clang/qmake.conf
|
||||
@@ -14,43 +14,29 @@
|
||||
QMAKE_CC = $$NDK_LLVM_PATH/bin/clang
|
||||
QMAKE_CXX = $$NDK_LLVM_PATH/bin/clang++
|
||||
|
||||
+# Follow https://android.googlesource.com/platform/ndk/+/ndk-release-r20/docs/BuildSystemMaintainers.md
|
||||
+
|
||||
equals(ANDROID_TARGET_ARCH, armeabi-v7a): \
|
||||
- QMAKE_CFLAGS += -target armv7-none-linux-androideabi
|
||||
-else: equals(ANDROID_TARGET_ARCH, armeabi): \
|
||||
- QMAKE_CFLAGS += -target armv5te-none-linux-androideabi
|
||||
+ QMAKE_CFLAGS = -target armv7a-linux-androideabi$$replace(ANDROID_PLATFORM, "android-", "")
|
||||
else: equals(ANDROID_TARGET_ARCH, arm64-v8a): \
|
||||
- QMAKE_CFLAGS += -target aarch64-none-linux-android
|
||||
+ QMAKE_CFLAGS = -target aarch64-linux-android$$replace(ANDROID_PLATFORM, "android-", "")
|
||||
else: equals(ANDROID_TARGET_ARCH, x86): \
|
||||
- QMAKE_CFLAGS += -target i686-none-linux-android -mstackrealign
|
||||
+ QMAKE_CFLAGS = -target i686-linux-android$$replace(ANDROID_PLATFORM, "android-", "") -mstackrealign
|
||||
else: equals(ANDROID_TARGET_ARCH, x86_64): \
|
||||
- QMAKE_CFLAGS += -target x86_64-none-linux-android
|
||||
-else: equals(ANDROID_TARGET_ARCH, mips): \
|
||||
- QMAKE_CFLAGS += -target mipsel-none-linux-android
|
||||
-else: equals(ANDROID_TARGET_ARCH, mips64): \
|
||||
- QMAKE_CFLAGS += -target mips64el-none-linux-android
|
||||
-
|
||||
-QMAKE_CFLAGS += -gcc-toolchain $$NDK_TOOLCHAIN_PATH -fno-limit-debug-info
|
||||
-
|
||||
-QMAKE_LINK = $$QMAKE_CXX $$QMAKE_CFLAGS -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -nostdlib++
|
||||
-equals(ANDROID_TARGET_ARCH, armeabi-v7a): QMAKE_LINK += -Wl,--exclude-libs,libunwind.a
|
||||
-
|
||||
-QMAKE_CFLAGS += -DANDROID_HAS_WSTRING --sysroot=$$NDK_ROOT/sysroot \
|
||||
- -isystem $$NDK_ROOT/sysroot/usr/include/$$NDK_TOOLS_PREFIX \
|
||||
- -isystem $$NDK_ROOT/sources/cxx-stl/llvm-libc++/include \
|
||||
- -isystem $$NDK_ROOT/sources/android/support/include \
|
||||
- -isystem $$NDK_ROOT/sources/cxx-stl/llvm-libc++abi/include
|
||||
+ QMAKE_CFLAGS = -target x86_64-linux-android$$replace(ANDROID_PLATFORM, "android-", "")
|
||||
|
||||
-ANDROID_SOURCES_CXX_STL_LIBDIR = $$NDK_ROOT/sources/cxx-stl/llvm-libc++/libs/$$ANDROID_TARGET_ARCH
|
||||
+QMAKE_CFLAGS += -fno-limit-debug-info
|
||||
|
||||
-ANDROID_STDCPP_PATH = $$ANDROID_SOURCES_CXX_STL_LIBDIR/libc++_shared.so
|
||||
+QMAKE_LINK = $$QMAKE_CXX $$QMAKE_CFLAGS
|
||||
|
||||
-ANDROID_USE_LLVM = true
|
||||
+ANDROID_STDCPP_PATH = $$NDK_LLVM_PATH/sysroot/usr/lib/$$NDK_TOOLS_PREFIX/libc++_shared.so
|
||||
|
||||
-exists($$ANDROID_SOURCES_CXX_STL_LIBDIR/libc++.so): \
|
||||
- ANDROID_CXX_STL_LIBS = -lc++
|
||||
-else: \
|
||||
- ANDROID_CXX_STL_LIBS = $$ANDROID_SOURCES_CXX_STL_LIBDIR/libc++.so.$$replace(ANDROID_PLATFORM, "android-", "")
|
||||
+ANDROID_USE_LLVM = true
|
||||
|
||||
-QMAKE_CFLAGS_OPTIMIZE_SIZE = -Oz
|
||||
+QMAKE_CFLAGS_OPTIMIZE_SIZE = -Oz
|
||||
+QMAKE_LIBDIR_POST =
|
||||
+QMAKE_LFLAGS =
|
||||
+QMAKE_LIBS_PRIVATE =
|
||||
+ANDROID_CXX_STL_LIBS =
|
||||
|
||||
include(../common/android-base-tail.conf)
|
||||
|
||||
--- old/qtbase/mkspecs/common/android-base-head.conf
|
||||
+++ new/qtbase/mkspecs/common/android-base-head.conf
|
||||
@@ -64,7 +58,6 @@
|
||||
}
|
||||
|
||||
CONFIG += $$ANDROID_PLATFORM
|
||||
-QMAKE_CFLAGS = -D__ANDROID_API__=$$replace(ANDROID_PLATFORM, "android-", "")
|
||||
|
||||
ANDROID_PLATFORM_ROOT_PATH = $$NDK_ROOT/platforms/$$ANDROID_PLATFORM/arch-$$ANDROID_ARCHITECTURE/
|
||||
|
||||
--- old/qtbase/mkspecs/common/android-base-tail.conf
|
||||
+++ new/qtbase/mkspecs/common/android-base-tail.conf
|
||||
@@ -6,22 +6,17 @@
|
||||
QMAKE_CFLAGS += -fstack-protector-strong -DANDROID
|
||||
|
||||
equals(ANDROID_TARGET_ARCH, armeabi-v7a): \
|
||||
- QMAKE_CFLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove
|
||||
+ QMAKE_CFLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=vfp
|
||||
else: equals(ANDROID_TARGET_ARCH, armeabi): \
|
||||
- QMAKE_CFLAGS += -march=armv5te -mtune=xscale -msoft-float -fno-builtin-memmove
|
||||
-# -fno-builtin-memmove is used to workaround https://code.google.com/p/android/issues/detail?id=81692
|
||||
+ QMAKE_CFLAGS += -march=armv5te -mtune=xscale -msoft-float
|
||||
|
||||
QMAKE_CFLAGS_WARN_ON = -Wall -W
|
||||
QMAKE_CFLAGS_WARN_OFF =
|
||||
equals(ANDROID_TARGET_ARCH, armeabi-v7a) | equals(ANDROID_TARGET_ARCH, armeabi) {
|
||||
CONFIG += optimize_size
|
||||
QMAKE_CFLAGS_DEBUG = -g -marm -O0
|
||||
- equals(ANDROID_TARGET_ARCH, armeabi):if(equals(NDK_TOOLCHAIN_VERSION, 4.8)|equals(NDK_TOOLCHAIN_VERSION, 4.9)) {
|
||||
- DEFINES += QT_OS_ANDROID_GCC_48_WORKAROUND
|
||||
- } else {
|
||||
- QMAKE_CFLAGS_RELEASE += -mthumb
|
||||
- QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -mthumb
|
||||
- }
|
||||
+ QMAKE_CFLAGS_RELEASE += -mthumb
|
||||
+ QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -mthumb
|
||||
}
|
||||
|
||||
QMAKE_CFLAGS_SHLIB = -fPIC
|
||||
@@ -61,15 +56,12 @@
|
||||
QMAKE_RANLIB = $${CROSS_COMPILE}ranlib
|
||||
|
||||
QMAKE_INCDIR_POST =
|
||||
-QMAKE_LIBDIR_POST = $$ANDROID_SOURCES_CXX_STL_LIBDIR
|
||||
QMAKE_INCDIR_X11 =
|
||||
QMAKE_LIBDIR_X11 =
|
||||
QMAKE_INCDIR_OPENGL =
|
||||
QMAKE_LIBDIR_OPENGL =
|
||||
|
||||
QMAKE_LINK_SHLIB = $$QMAKE_LINK
|
||||
-QMAKE_LFLAGS = --sysroot=$$ANDROID_PLATFORM_ROOT_PATH
|
||||
-equals(ANDROID_TARGET_ARCH, x86_64) QMAKE_LFLAGS += -L$$ANDROID_PLATFORM_ROOT_PATH/usr/lib64
|
||||
QMAKE_LFLAGS_APP = -Wl,--no-undefined -Wl,-z,noexecstack -shared
|
||||
QMAKE_LFLAGS_SHLIB = -Wl,--no-undefined -Wl,-z,noexecstack -shared
|
||||
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
|
Loading…
Reference in new issue