external/python3/ExternalPackage_python3.mk |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

New commits:
commit 06c36603857d8d3487736cd885faddee53d1b588
Author:     Andras Timar <[email protected]>
AuthorDate: Wed Feb 18 13:11:58 2026 +0100
Commit:     Miklos Vajna <[email protected]>
CommitDate: Thu Feb 19 08:59:10 2026 +0100

    external: derive Python3 SOABI suffix from HOST_PLATFORM
    
    The SOABI platform suffix was hardcoded to -<cpu>-linux-gnu for
    three architectures, which fails on musl libc where Python builds
    the extension modules as .cpython-312-x86_64-linux-musl.so.
    
    Derive the suffix from HOST_PLATFORM instead, stripping the vendor
    field (e.g. x86_64-pc-linux-gnu -> -x86_64-linux-gnu, or
    aarch64-alpine-linux-musl -> -aarch64-linux-musl). This handles
    any libc variant and CPU architecture automatically.
    
    Change-Id: I3f8a2b1c5d7e9f0a4b6c8d2e1f3a5b7c9d0e2f4a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199617
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>

diff --git a/external/python3/ExternalPackage_python3.mk 
b/external/python3/ExternalPackage_python3.mk
index 8c436f8b5916..8835e5fe57fd 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -66,13 +66,9 @@ $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(
 # Obviously this list should not contain stuff with external dependencies
 # that may not be available on baseline systems.
 
-ifeq ($(CPUNAME),AARCH64)
-SOABI=-aarch64-linux-gnu
-else ifeq ($(CPUNAME),POWERPC64)
-SOABI=-powerpc64le-linux-gnu
-else
-SOABI=-x86_64-linux-gnu
-endif
+# Derive SOABI platform suffix from HOST_PLATFORM (e.g. x86_64-pc-linux-gnu
+# or aarch64-alpine-linux-musl), stripping the vendor field.
+SOABI=-$(word 1,$(subst -, ,$(HOST_PLATFORM)))-$(word 3,$(subst -, 
,$(HOST_PLATFORM)))-$(word 4,$(subst -, ,$(HOST_PLATFORM)))
 
python3_EXTENSION_MODULE_SUFFIX=cpython-$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if
 $(ENABLE_DBGUTIL),d)$(SOABI)
 python3_EXTENSION_MODULES= \
        Modules/array.$(python3_EXTENSION_MODULE_SUFFIX).so \

Reply via email to