summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Matteo Bernardini2022-08-04 19:22:06 +0200
committer Matteo Bernardini2022-10-01 10:11:23 +0200
commit4c741c0a8059c2fdad4aec8715bbc9217b8f699a (patch)
tree97bebbfe9e7ed9b52f135d8ca91c3fe23c983d19
parent1bbfcb24994b4f85d5525c6a462e1110099ea32e (diff)
downloadslackbuilds-android-tools.tar.gz
development/android-tools: Fix building with gcc >= 12.x.android-tools
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--development/android-tools/android-tools.SlackBuild5
-rw-r--r--development/android-tools/patches/0012-CMakeLists.txt-Disable-Werror-by-default.patch24
-rw-r--r--development/android-tools/patches/0021-tls-include-functional.patch22
3 files changed, 51 insertions, 0 deletions
diff --git a/development/android-tools/android-tools.SlackBuild b/development/android-tools/android-tools.SlackBuild
index c858d18140..7096067f4c 100644
--- a/development/android-tools/android-tools.SlackBuild
+++ b/development/android-tools/android-tools.SlackBuild
@@ -81,6 +81,11 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+( cd vendor/adb
+ patch -p1 < $CWD/patches/0021-tls-include-functional.patch )
+( cd vendor/boringssl
+ patch -p1 < $CWD/patches/0012-CMakeLists.txt-Disable-Werror-by-default.patch )
+
export GOCACHE=$(pwd)/build/go-cache
export GO111MODULE=off
diff --git a/development/android-tools/patches/0012-CMakeLists.txt-Disable-Werror-by-default.patch b/development/android-tools/patches/0012-CMakeLists.txt-Disable-Werror-by-default.patch
new file mode 100644
index 0000000000..c9ac7ff3b3
--- /dev/null
+++ b/development/android-tools/patches/0012-CMakeLists.txt-Disable-Werror-by-default.patch
@@ -0,0 +1,24 @@
+From 9ecab80323875e95b08b5e6f327e4d5bd5d70478 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
+Date: Sat, 21 May 2022 11:47:32 +0200
+Subject: [PATCH] CMakeLists.txt: Disable -Werror by default
+
+Boringssl regularly fails to compile with newer GCC versions due
+to new warnings introduced by GCC upstream.
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f58e853cd..b1fec9616 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -117,7 +117,7 @@ endif()
+ if(CMAKE_COMPILER_IS_GNUCXX OR CLANG)
+ # Note clang-cl is odd and sets both CLANG and MSVC. We base our configuration
+ # primarily on our normal Clang one.
+- set(C_CXX_FLAGS "-Werror -Wformat=2 -Wsign-compare -Wmissing-field-initializers -Wwrite-strings -Wvla")
++ set(C_CXX_FLAGS "-Wformat=2 -Wsign-compare -Wmissing-field-initializers -Wwrite-strings -Wvla")
+ if(MSVC)
+ # clang-cl sets different default warnings than clang. It also treats -Wall
+ # as -Weverything, to match MSVC. Instead -W3 is the alias for -Wall.
diff --git a/development/android-tools/patches/0021-tls-include-functional.patch b/development/android-tools/patches/0021-tls-include-functional.patch
new file mode 100644
index 0000000000..8b4a517021
--- /dev/null
+++ b/development/android-tools/patches/0021-tls-include-functional.patch
@@ -0,0 +1,22 @@
+From 9d0394f52324e7ccc62c67ce34cfe6ef9e85f043 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
+Date: Wed, 18 May 2022 01:02:57 +0200
+Subject: [PATCH] tls: include <functional>
+
+Fixes compilation with GCC 12.1.
+---
+ tls/include/adb/tls/tls_connection.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tls/include/adb/tls/tls_connection.h b/tls/include/adb/tls/tls_connection.h
+index bc5b98ab..a112756c 100644
+--- a/tls/include/adb/tls/tls_connection.h
++++ b/tls/include/adb/tls/tls_connection.h
+@@ -19,6 +19,7 @@
+ #include <stddef.h>
+ #include <stdint.h>
+
++#include <functional>
+ #include <string_view>
+ #include <vector>
+