diff --git a/packages/libllvm/build.sh b/packages/libllvm/build.sh index 1ebfa21f930633b..1b89efba22cb3c2 100644 --- a/packages/libllvm/build.sh +++ b/packages/libllvm/build.sh @@ -5,7 +5,7 @@ TERMUX_PKG_LICENSE_FILE="llvm/LICENSE.TXT" TERMUX_PKG_MAINTAINER="@finagolfin" LLVM_MAJOR_VERSION=16 TERMUX_PKG_VERSION=${LLVM_MAJOR_VERSION}.0.6 -TERMUX_PKG_REVISION=2 +TERMUX_PKG_REVISION=3 TERMUX_PKG_SHA256=ce5e71081d17ce9e86d7cbcfa28c4b04b9300f8fb7e78422b1feb6bc52c3028e TERMUX_PKG_SRCURL=https://github.com/llvm/llvm-project/releases/download/llvmorg-$TERMUX_PKG_VERSION/llvm-project-$TERMUX_PKG_VERSION.src.tar.xz TERMUX_PKG_HOSTBUILD=true diff --git a/packages/libllvm/llvm-lib-Support-Unix-Path.inc.patch b/packages/libllvm/llvm-lib-Support-Unix-Path.inc.patch new file mode 100644 index 000000000000000..5d190d894cb8e3a --- /dev/null +++ b/packages/libllvm/llvm-lib-Support-Unix-Path.inc.patch @@ -0,0 +1,19 @@ +diff -u -r ../orig-src/llvm/lib/Support/Unix/Path.inc ./llvm/lib/Support/Unix/Path.inc +--- ../orig-src/llvm/lib/Support/Unix/Path.inc 2023-09-29 21:36:47.056335287 +0000 ++++ ./llvm/lib/Support/Unix/Path.inc 2023-09-29 21:40:31.091417185 +0000 +@@ -252,6 +252,7 @@ + return exe_path; + #elif defined(__linux__) || defined(__CYGWIN__) || defined(__gnu_hurd__) + char exe_path[PATH_MAX]; ++#ifndef __ANDROID__ /* Avoid looking at /proc/self/exe, as it does not work with termux-exec linker wrapping */ + const char *aPath = "/proc/self/exe"; + if (sys::fs::exists(aPath)) { + // /proc is not always mounted under Linux (chroot for example). +@@ -280,6 +281,7 @@ + return std::string(real_path); + #endif + } ++#endif + // Fall back to the classical detection. + if (getprogpath(exe_path, argv0)) + return exe_path;