Skip to content

Commit 5e380a1

Browse files
committed
Allow stable API extensions to include a multiarch tuple in the filename
This permits stable ABI extensions for multiple architectures to be co-installed into the same directory, without clashing with each other.
1 parent 363374c commit 5e380a1

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Makefile.pre.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,6 +1729,7 @@ Python/interpconfig.o: $(srcdir)/Python/interpconfig.c $(srcdir)/Python/config_c
17291729
Python/dynload_shlib.o: $(srcdir)/Python/dynload_shlib.c Makefile
17301730
$(CC) -c $(PY_CORE_CFLAGS) \
17311731
-DSOABI='"$(SOABI)"' \
1732+
$(MULTIARCH_CPPFLAGS) \
17321733
-o $@ $(srcdir)/Python/dynload_shlib.c
17331734

17341735
Python/dynload_hpux.o: $(srcdir)/Python/dynload_hpux.c Makefile

Python/dynload_shlib.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ const char *_PyImport_DynLoadFiletab[] = {
4141
"." SOABI ".so",
4242
#ifdef ALT_SOABI
4343
"." ALT_SOABI ".so",
44+
#endif
45+
#ifdef MULTIARCH
46+
".abi" PYTHON_ABI_STRING "-" MULTIARCH ".so",
4447
#endif
4548
".abi" PYTHON_ABI_STRING ".so",
4649
".so",

0 commit comments

Comments
 (0)