···1-From 597e73f2a4b2f0b508127931b36d5540d6941823 Mon Sep 17 00:00:00 2001
2From: Frederik Rietdijk <fridh@fridh.nl>
3Date: Mon, 28 Aug 2017 09:24:06 +0200
4Subject: [PATCH] Don't use ldconfig
56---
7- Lib/ctypes/util.py | 70 ++----------------------------------------------------
8- 1 file changed, 2 insertions(+), 68 deletions(-)
910diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
11-index 5e8b31a854..7b45ce6c15 100644
12--- a/Lib/ctypes/util.py
13+++ b/Lib/ctypes/util.py
14-@@ -94,46 +94,7 @@ elif os.name == "posix":
15- import re, tempfile
1617 def _findLib_gcc(name):
18- # Run GCC's linker with the -t (aka --trace) option and examine the
···51- # Raised if the file was already removed, which is the normal
52- # behaviour of GCC if linking fails
53- pass
54-- res = re.search(expr, trace)
55- if not res:
56- return None
57-- return os.fsdecode(res.group(0))
0000000058+ return None
59-6061 if sys.platform == "sunos5":
62-@@ -255,34 +216,7 @@ elif os.name == "posix":
063 else:
6465 def _findSoname_ldconfig(name):
···96 def _findLib_ld(name):
97 # See issue #9998 for why this is needed
98--
99-2.15.0
100
···1+From ba458f33f335b217d078fdce56e9c6f9f93adb49 Mon Sep 17 00:00:00 2001
2From: Frederik Rietdijk <fridh@fridh.nl>
3Date: Mon, 28 Aug 2017 09:24:06 +0200
4Subject: [PATCH] Don't use ldconfig
56---
7+ Lib/ctypes/util.py | 78 ++--------------------------------------------
8+ 1 file changed, 2 insertions(+), 76 deletions(-)
910diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
11+index 0c2510e..79635a8 100644
12--- a/Lib/ctypes/util.py
13+++ b/Lib/ctypes/util.py
14+@@ -100,54 +100,7 @@ elif os.name == "posix":
15+ return thefile.read(4) == elf_header
1617 def _findLib_gcc(name):
18- # Run GCC's linker with the -t (aka --trace) option and examine the
···51- # Raised if the file was already removed, which is the normal
52- # behaviour of GCC if linking fails
53- pass
54+- res = re.findall(expr, trace)
55- if not res:
56- return None
57+-
58+- for file in res:
59+- # Check if the given file is an elf file: gcc can report
60+- # some files that are linker scripts and not actual
61+- # shared objects. See bpo-41976 for more details
62+- if not _is_elf(file):
63+- continue
64+- return os.fsdecode(file)
65+-
66+ return None
06768 if sys.platform == "sunos5":
69+ # use /usr/ccs/bin/dump on solaris
70+@@ -268,34 +221,7 @@ elif os.name == "posix":
71 else:
7273 def _findSoname_ldconfig(name):
···104 def _findLib_ld(name):
105 # See issue #9998 for why this is needed
106--
107+2.30.0
108