python: Do not assume GNU Binutils
and assume Clang/LLVM toolchain instead.
This commit is contained in:
parent
e089df25a2
commit
5e3a5dca19
29
packages/python/Lib-ctypes-util.py.patch
Normal file
29
packages/python/Lib-ctypes-util.py.patch
Normal file
@ -0,0 +1,29 @@
|
||||
--- a/Lib/ctypes/util.py
|
||||
+++ b/Lib/ctypes/util.py
|
||||
@@ -172,7 +172,7 @@
|
||||
# assuming GNU binutils / ELF
|
||||
if not f:
|
||||
return None
|
||||
- objdump = shutil.which('objdump')
|
||||
+ objdump = shutil.which('llvm-objdump')
|
||||
if not objdump:
|
||||
# objdump is not available, give up
|
||||
return None
|
||||
@@ -209,7 +209,7 @@
|
||||
expr = os.fsencode(expr)
|
||||
|
||||
try:
|
||||
- proc = subprocess.Popen(('/sbin/ldconfig', '-r'),
|
||||
+ proc = subprocess.Popen(('@TERMUX_PREFIX@/bin/ldconfig', '-r'),
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.DEVNULL)
|
||||
except OSError: # E.g. command not found
|
||||
@@ -300,7 +300,7 @@
|
||||
def _findLib_ld(name):
|
||||
# See issue #9998 for why this is needed
|
||||
expr = r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name)
|
||||
- cmd = ['ld', '-t']
|
||||
+ cmd = ['ld.lld', '-t']
|
||||
libpath = os.environ.get('LD_LIBRARY_PATH')
|
||||
if libpath:
|
||||
for d in libpath.split(':'):
|
@ -4,7 +4,7 @@ TERMUX_PKG_LICENSE="PythonPL"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
_MAJOR_VERSION=3.10
|
||||
TERMUX_PKG_VERSION=${_MAJOR_VERSION}.2
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL=https://www.python.org/ftp/python/${TERMUX_PKG_VERSION}/Python-${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_SHA256=17de3ac7da9f2519aa9d64378c603a73a0e9ad58dffa8812e45160c086de64c7
|
||||
TERMUX_PKG_DEPENDS="gdbm, libandroid-posix-semaphore, libandroid-support, libbz2, libcrypt, libexpat, libffi, liblzma, libsqlite, ncurses, ncurses-ui-libs, openssl, readline, zlib"
|
||||
|
Loading…
Reference in New Issue
Block a user