PKGBUILDs/qt5/android-x86-64/0001-Fix-clang-libc-build-under-Android.patch
Martchus 8bcbcdde52 Revert android-*-qt5 packages to 5.13.1
Further versions broke the build system,
see 18443d861e.

With 5.15.1 it basically works again but deployment with androiddeployqt
does not produce runnable APKs. Qt now has gained support for invoking
androiddeployqt within CMake. Using their official support instead of my
own helper might have worked but it could not cope with the fact that I
had multiple targets in my CMake project and was therefore useless in my
case.

So let's ditch Qt 5 on Android  and give Qt 6 another chance at some
point.
2020-12-05 21:44:04 +01:00

41 lines
1.8 KiB
Diff

From 2c8ca36b5f87ccfc039c0b669c80f21205769758 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 9 Dec 2018 14:28:07 +0100
Subject: [PATCH 1/4] Fix clang/libc++ build under Android
---
mkspecs/android-clang/qmake.conf | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/mkspecs/android-clang/qmake.conf b/mkspecs/android-clang/qmake.conf
index 05b7979142..83d030793b 100644
--- a/mkspecs/android-clang/qmake.conf
+++ b/mkspecs/android-clang/qmake.conf
@@ -30,11 +30,12 @@ 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 \
+QMAKE_CFLAGS += -DANDROID_HAS_WSTRING --sysroot=$$ANDROID_PLATFORM_ROOT_PATH \
-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
+ -isystem $$NDK_ROOT/sources/cxx-stl/llvm-libc++abi/include \
+ -isystem $$NDK_ROOT/sysroot/usr/include
ANDROID_SOURCES_CXX_STL_LIBDIR = $$NDK_ROOT/sources/cxx-stl/llvm-libc++/libs/$$ANDROID_TARGET_ARCH
@@ -44,6 +45,8 @@ ANDROID_USE_LLVM = true
exists($$ANDROID_SOURCES_CXX_STL_LIBDIR/libc++.so): \
ANDROID_CXX_STL_LIBS = -lc++
+else: exists($$ANDROID_SOURCES_CXX_STL_LIBDIR/libc++_shared.so): \
+ ANDROID_CXX_STL_LIBS = -lc++_shared
else: \
ANDROID_CXX_STL_LIBS = $$ANDROID_SOURCES_CXX_STL_LIBDIR/libc++.so.$$replace(ANDROID_PLATFORM, "android-", "")
--
2.23.0