From 283b707502e2ad04a8c5cf83038757b2a9ce3cb2 Mon Sep 17 00:00:00 2001 From: mattip Date: Thu, 19 Mar 2026 20:44:58 +0200 Subject: [PATCH 1/4] move to manylinux_2_28 and use the distro's gcc14 --- .github/workflows/posix.yml | 20 ++++---- CHANGELOG.md | 5 +- ci-before-build.sh | 5 -- pyproject.toml | 7 +-- tools/install-static-clang.sh | 90 ----------------------------------- 5 files changed, 14 insertions(+), 113 deletions(-) delete mode 100755 tools/install-static-clang.sh diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index 712d166e..871f87d5 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -28,10 +28,10 @@ jobs: fail-fast: false matrix: include: - - { os: ubuntu-latest, PLAT: i686, INTERFACE64: '0', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} + - { os: ubuntu-latest, PLAT: i686, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} - - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '0', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} - - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '1', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} + - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} + - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '1', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} - { os: macos-14, PLAT: x86_64, INTERFACE64: '0', MB_ML_LIBC: macosx} - { os: macos-14, PLAT: x86_64, INTERFACE64: '1', MB_ML_LIBC: macosx} @@ -42,17 +42,17 @@ jobs: - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '0', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '1', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} - - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '0', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} - - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '1', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} + - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} + - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '1', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '0', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '1', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} - - { os: ubuntu-24.04-arm, PLAT: ppc64le, INTERFACE64: '0', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} - - { os: ubuntu-24.04-arm, PLAT: ppc64le, INTERFACE64: '1', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} + - { os: ubuntu-24.04-arm, PLAT: ppc64le, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} + - { os: ubuntu-24.04-arm, PLAT: ppc64le, INTERFACE64: '1', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} - - { os: ubuntu-24.04-arm, PLAT: s390x, INTERFACE64: '0', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} - - { os: ubuntu-24.04-arm, PLAT: s390x, INTERFACE64: '1', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} + - { os: ubuntu-24.04-arm, PLAT: s390x, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} + - { os: ubuntu-24.04-arm, PLAT: s390x, INTERFACE64: '1', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} - { os: ubuntu-24.04-arm, PLAT: riscv64, INTERFACE64: '0', MB_ML_VER: '_2_39', MB_ML_LIBC: manylinux} - { os: ubuntu-24.04-arm, PLAT: riscv64, INTERFACE64: '1', MB_ML_VER: '_2_39', MB_ML_LIBC: manylinux} @@ -62,9 +62,7 @@ jobs: MB_ML_LIBC: ${{ matrix.MB_ML_LIBC }} MB_ML_VER: ${{ matrix.MB_ML_VER }} INTERFACE64: ${{ matrix.INTERFACE64 }} - BUILD_DIR: ${{ github.workspace }} PLAT: ${{ matrix.PLAT }} - OS-NAME: ${{ matrix.os }} steps: - uses: actions/checkout@v6.0.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a2d7b58..acd94ec9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## OpenBLAS v0.3.31.159 (v0.3.31-159-g7a95460b) +### 0.3.31.159.1 (2026-03-20) +- Move to manylinux_2_28 wheels, use gcc14 instead of clang + ### 0.3.31.159.0 (2026-03-17) - Update to v0.3.31.159 @@ -98,4 +101,4 @@ ## OpenBLAS v0.3.29.0 ### 0.3.29.0.0 (2025-04-03) -- Add build script for Windows on ARM64 \ No newline at end of file +- Add build script for Windows on ARM64 diff --git a/ci-before-build.sh b/ci-before-build.sh index 83abf25c..504b7114 100755 --- a/ci-before-build.sh +++ b/ci-before-build.sh @@ -24,11 +24,6 @@ fi sed -e "s/^VERSION = .*/VERSION = ${version}/" -i.bak OpenBLAS/Makefile.rule echo "creating wheel from $OPENBLAS_COMMIT (NIGHTLY is $NIGHTLY)" -if [ "$(uname)" != "Darwin" ]; then - ./tools/install-static-clang.sh - export PATH=/opt/clang/bin:$PATH -fi - # Build OpenBLAS source build-openblas.sh diff --git a/pyproject.toml b/pyproject.toml index 7b58511f..ac97c006 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta" [project] name = "scipy-openblas64" # v0.3.31.159 -version = "0.3.31.159.0" +version = "0.3.31.159.1" requires-python = ">=3.7" description = "Provides OpenBLAS for python packaging" readme = "README.md" @@ -50,13 +50,8 @@ environment-pass = [ "MB_ML_LIBC", "MB_ML_VER", "INTERFACE64", - "BUILD_DIR", "PLAT", - "OS-NAME", - "RUNNER_ARCH", ] -[tool.cibuildwheel.linux] -environment = { CC = "/opt/clang/bin/clang", CXX = "/opt/clang/bin/clang++", LDFLAGS = "-fuse-ld=lld" } [project.entry-points.pkg_config] scipy-openblas = 'scipy_openblas64.lib.pkgconfig' diff --git a/tools/install-static-clang.sh b/tools/install-static-clang.sh deleted file mode 100755 index b146b209..00000000 --- a/tools/install-static-clang.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/bash - -# Stop at any error, show all commands -set -exuo pipefail - -TOOLCHAIN_PATH=/opt/clang - -# Download static-clang -DEFAULT_ARCH="$(uname -m)" -if [ "${STATIC_CLANG_ARCH:-}" == "" ]; then - STATIC_CLANG_ARCH="${RUNNER_ARCH:-${DEFAULT_ARCH}}" -fi -case "${STATIC_CLANG_ARCH}" in - ARM64|aarch64|arm64|arm64/*) GO_ARCH=arm64;; - ARM|armv7l|armv8l|arm|arm/v7) GO_ARCH=arm;; # assume arm/v7 for arm - X64|x86_64|amd64|amd64/*) GO_ARCH=amd64;; - X86|i686|386) GO_ARCH=386;; - ppc64le) GO_ARCH=ppc64le;; - riscv64) GO_ARCH=riscv64;; - s390x) GO_ARCH=s390x;; - *) echo "No static-clang toolchain for ${CLANG_ARCH}">2; exit 1;; -esac -STATIC_CLANG_VERSION=21.1.6.0 -STATIC_CLANG_FILENAME="static-clang-linux-${GO_ARCH}.tar.xz" -STATIC_CLANG_URL="https://github.com/mayeut/static-clang-images/releases/download/v${STATIC_CLANG_VERSION}/${STATIC_CLANG_FILENAME}" -pushd /tmp -cat<<'EOF' | grep "${STATIC_CLANG_FILENAME}" > "${STATIC_CLANG_FILENAME}.sha256" -3f92a131d27ca606dae8230550236a0c897a7f5990d61a293814e0abea8d0e1f static-clang-linux-386.tar.xz -3fc6a3500cb9514b2c3af6d4a95676842769c301f872b6cea8c15576a64e756c static-clang-linux-amd64.tar.xz -82ea0c148ec75f72a2f6f61cc877561efe9675c6e59a1a2c4d130f088f9dc868 static-clang-linux-arm.tar.xz -9b5ad28877b6d56aff530164f7f88590e5d3441a1fddd7a73370539783056120 static-clang-linux-arm64.tar.xz -2adccbcad99d033222c8a63872739919375a7aef2339ce2e8ab7dcfc938502b1 static-clang-linux-loong64.tar.xz -5f551911ad73ecbbcf278e6d05a04bc68bd0dc4918a6a145352072f7734959c6 static-clang-linux-ppc64le.tar.xz -90f5beda1004bec124607df1f9fc0a70c2b9f382b82ab1db2703ebd131c920ef static-clang-linux-riscv64.tar.xz -e4047765a5e64bace4be36f6aae4d859e96bc1298d3ff5ba6b7d6100ea7d23f7 static-clang-linux-s390x.tar.xz -EOF -curl -fsSLO "${STATIC_CLANG_URL}" -sha256sum -c "${STATIC_CLANG_FILENAME}.sha256" -tar -C /opt -xf "${STATIC_CLANG_FILENAME}" -popd - -# configure target triple -case "${AUDITWHEEL_POLICY}-${AUDITWHEEL_ARCH}" in - manylinux*-armv7l) TARGET_TRIPLE=armv7-unknown-linux-gnueabihf;; - musllinux*-armv7l) TARGET_TRIPLE=armv7-alpine-linux-musleabihf;; - manylinux*-ppc64le) TARGET_TRIPLE=powerpc64le-unknown-linux-gnu;; - musllinux*-ppc64le) TARGET_TRIPLE=powerpc64le-alpine-linux-musl;; - manylinux*-*) TARGET_TRIPLE=${AUDITWHEEL_ARCH}-unknown-linux-gnu;; - musllinux*-*) TARGET_TRIPLE=${AUDITWHEEL_ARCH}-alpine-linux-musl;; -esac -case "${AUDITWHEEL_POLICY}-${AUDITWHEEL_ARCH}" in - *-riscv64) M_ARCH="-march=rv64gc";; - *-x86_64) M_ARCH="-march=x86-64";; - *-armv7l) M_ARCH="-march=armv7a";; - manylinux*-i686) M_ARCH="-march=k8 -mtune=generic";; # same as gcc manylinux2014 / manylinux_2_28 - musllinux*-i686) M_ARCH="-march=pentium-m -mtune=generic";; # same as gcc musllinux_1_2 -esac -GCC_TRIPLE=$(gcc -dumpmachine) - -cat<"${TOOLCHAIN_PATH}/bin/${AUDITWHEEL_PLAT}.cfg" - -target ${TARGET_TRIPLE} - ${M_ARCH:-} - --gcc-toolchain=${DEVTOOLSET_ROOTPATH:-}/usr - --gcc-triple=${GCC_TRIPLE} -EOF - -cat<"${TOOLCHAIN_PATH}/bin/clang.cfg" - @${AUDITWHEEL_PLAT}.cfg -EOF - -cat<"${TOOLCHAIN_PATH}/bin/clang++.cfg" - @${AUDITWHEEL_PLAT}.cfg -EOF - -cat<"${TOOLCHAIN_PATH}/bin/clang-cpp.cfg" - @${AUDITWHEEL_PLAT}.cfg -EOF - -# override entrypoint to add the toolchain to PATH -mv /usr/local/bin/manylinux-entrypoint /usr/local/bin/manylinux-entrypoint-org -cat</usr/local/bin/manylinux-entrypoint -#!/bin/bash - -set -eu - -export PATH="${TOOLCHAIN_PATH}/bin:\${PATH}" -exec /usr/local/bin/manylinux-entrypoint-org "\$@" -EOF - -chmod +x /usr/local/bin/manylinux-entrypoint From 46d8a65e5fa1c9ec5f4dd2e24897136cf11f6061 Mon Sep 17 00:00:00 2001 From: mattip Date: Fri, 20 Mar 2026 08:28:11 +0200 Subject: [PATCH 2/4] use clang on some platforms --- .github/workflows/posix.yml | 39 +++++++-------- OpenBLAS | 2 +- ci-before-build.sh | 8 ++++ pyproject.toml | 1 + tools/install-static-clang.sh | 90 +++++++++++++++++++++++++++++++++++ 5 files changed, 120 insertions(+), 20 deletions(-) create mode 100755 tools/install-static-clang.sh diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index 871f87d5..7100f818 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -28,34 +28,34 @@ jobs: fail-fast: false matrix: include: - - { os: ubuntu-latest, PLAT: i686, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} + - { os: ubuntu-latest, PLAT: i686, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux, COMPILER: system} - - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} - - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '1', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} + - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux, COMPILER: system} + - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '1', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux, COMPILER: system} - - { os: macos-14, PLAT: x86_64, INTERFACE64: '0', MB_ML_LIBC: macosx} - - { os: macos-14, PLAT: x86_64, INTERFACE64: '1', MB_ML_LIBC: macosx} + - { os: macos-14, PLAT: x86_64, INTERFACE64: '0', MB_ML_LIBC: macosx, COMPILER: system} + - { os: macos-14, PLAT: x86_64, INTERFACE64: '1', MB_ML_LIBC: macosx, COMPILER: system} - - { os: macos-latest, PLAT: arm64, INTERFACE64: '0', MB_ML_LIBC: macosx} - - { os: macos-latest, PLAT: arm64, INTERFACE64: '1', MB_ML_LIBC: macosx} + - { os: macos-latest, PLAT: arm64, INTERFACE64: '0', MB_ML_LIBC: macosx, COMPILER: system} + - { os: macos-latest, PLAT: arm64, INTERFACE64: '1', MB_ML_LIBC: macosx, COMPILER: system} - - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '0', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} - - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '1', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} + - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '0', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux, COMPILER: system} + - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '1', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux, COMPILER: system} - - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} - - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '1', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} + - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux, COMPILER: system} + - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '1', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux, COMPILER: system} - - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '0', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} - - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '1', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} + - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '0', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux, COMPILER: system} + - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '1', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux, COMPILER: system} - - { os: ubuntu-24.04-arm, PLAT: ppc64le, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} - - { os: ubuntu-24.04-arm, PLAT: ppc64le, INTERFACE64: '1', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} + - { os: ubuntu-24.04-arm, PLAT: ppc64le, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux, COMPILER: clang} + - { os: ubuntu-24.04-arm, PLAT: ppc64le, INTERFACE64: '1', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux, COMPILER: clang} - - { os: ubuntu-24.04-arm, PLAT: s390x, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} - - { os: ubuntu-24.04-arm, PLAT: s390x, INTERFACE64: '1', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} + - { os: ubuntu-24.04-arm, PLAT: s390x, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux, COMPILER: clang} + - { os: ubuntu-24.04-arm, PLAT: s390x, INTERFACE64: '1', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux, COMPILER: clang} - - { os: ubuntu-24.04-arm, PLAT: riscv64, INTERFACE64: '0', MB_ML_VER: '_2_39', MB_ML_LIBC: manylinux} - - { os: ubuntu-24.04-arm, PLAT: riscv64, INTERFACE64: '1', MB_ML_VER: '_2_39', MB_ML_LIBC: manylinux} + - { os: ubuntu-24.04-arm, PLAT: riscv64, INTERFACE64: '0', MB_ML_VER: '_2_39', MB_ML_LIBC: manylinux, COMPILER: clang} + - { os: ubuntu-24.04-arm, PLAT: riscv64, INTERFACE64: '1', MB_ML_VER: '_2_39', MB_ML_LIBC: manylinux, COMPILER: clang} env: NIGHTLY: ${{ inputs.publish == false && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }} @@ -63,6 +63,7 @@ jobs: MB_ML_VER: ${{ matrix.MB_ML_VER }} INTERFACE64: ${{ matrix.INTERFACE64 }} PLAT: ${{ matrix.PLAT }} + COMPILER: ${{ matrix.compiler }} steps: - uses: actions/checkout@v6.0.1 diff --git a/OpenBLAS b/OpenBLAS index 7a95460b..e9aab19b 160000 --- a/OpenBLAS +++ b/OpenBLAS @@ -1 +1 @@ -Subproject commit 7a95460bb1fc7081a7861515705ed06a6223a5a2 +Subproject commit e9aab19bbc202609d3234dc5adcfc66468295de5 diff --git a/ci-before-build.sh b/ci-before-build.sh index 504b7114..71f0a78b 100755 --- a/ci-before-build.sh +++ b/ci-before-build.sh @@ -24,6 +24,14 @@ fi sed -e "s/^VERSION = .*/VERSION = ${version}/" -i.bak OpenBLAS/Makefile.rule echo "creating wheel from $OPENBLAS_COMMIT (NIGHTLY is $NIGHTLY)" +if [ "$COMPILER" == "clang" ]; then + ./tools/install-static-clang.sh + export PATH=/opt/clang/bin:$PATH + export CC = "/opt/clang/bin/clang" + export CXX = "/opt/clang/bin/clang++" + export LDFLAGS = "-fuse-ld=lld" +fi + # Build OpenBLAS source build-openblas.sh diff --git a/pyproject.toml b/pyproject.toml index ac97c006..3b331324 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,6 +51,7 @@ environment-pass = [ "MB_ML_VER", "INTERFACE64", "PLAT", + "COMPILER", ] [project.entry-points.pkg_config] diff --git a/tools/install-static-clang.sh b/tools/install-static-clang.sh new file mode 100755 index 00000000..b146b209 --- /dev/null +++ b/tools/install-static-clang.sh @@ -0,0 +1,90 @@ +#!/bin/bash + +# Stop at any error, show all commands +set -exuo pipefail + +TOOLCHAIN_PATH=/opt/clang + +# Download static-clang +DEFAULT_ARCH="$(uname -m)" +if [ "${STATIC_CLANG_ARCH:-}" == "" ]; then + STATIC_CLANG_ARCH="${RUNNER_ARCH:-${DEFAULT_ARCH}}" +fi +case "${STATIC_CLANG_ARCH}" in + ARM64|aarch64|arm64|arm64/*) GO_ARCH=arm64;; + ARM|armv7l|armv8l|arm|arm/v7) GO_ARCH=arm;; # assume arm/v7 for arm + X64|x86_64|amd64|amd64/*) GO_ARCH=amd64;; + X86|i686|386) GO_ARCH=386;; + ppc64le) GO_ARCH=ppc64le;; + riscv64) GO_ARCH=riscv64;; + s390x) GO_ARCH=s390x;; + *) echo "No static-clang toolchain for ${CLANG_ARCH}">2; exit 1;; +esac +STATIC_CLANG_VERSION=21.1.6.0 +STATIC_CLANG_FILENAME="static-clang-linux-${GO_ARCH}.tar.xz" +STATIC_CLANG_URL="https://github.com/mayeut/static-clang-images/releases/download/v${STATIC_CLANG_VERSION}/${STATIC_CLANG_FILENAME}" +pushd /tmp +cat<<'EOF' | grep "${STATIC_CLANG_FILENAME}" > "${STATIC_CLANG_FILENAME}.sha256" +3f92a131d27ca606dae8230550236a0c897a7f5990d61a293814e0abea8d0e1f static-clang-linux-386.tar.xz +3fc6a3500cb9514b2c3af6d4a95676842769c301f872b6cea8c15576a64e756c static-clang-linux-amd64.tar.xz +82ea0c148ec75f72a2f6f61cc877561efe9675c6e59a1a2c4d130f088f9dc868 static-clang-linux-arm.tar.xz +9b5ad28877b6d56aff530164f7f88590e5d3441a1fddd7a73370539783056120 static-clang-linux-arm64.tar.xz +2adccbcad99d033222c8a63872739919375a7aef2339ce2e8ab7dcfc938502b1 static-clang-linux-loong64.tar.xz +5f551911ad73ecbbcf278e6d05a04bc68bd0dc4918a6a145352072f7734959c6 static-clang-linux-ppc64le.tar.xz +90f5beda1004bec124607df1f9fc0a70c2b9f382b82ab1db2703ebd131c920ef static-clang-linux-riscv64.tar.xz +e4047765a5e64bace4be36f6aae4d859e96bc1298d3ff5ba6b7d6100ea7d23f7 static-clang-linux-s390x.tar.xz +EOF +curl -fsSLO "${STATIC_CLANG_URL}" +sha256sum -c "${STATIC_CLANG_FILENAME}.sha256" +tar -C /opt -xf "${STATIC_CLANG_FILENAME}" +popd + +# configure target triple +case "${AUDITWHEEL_POLICY}-${AUDITWHEEL_ARCH}" in + manylinux*-armv7l) TARGET_TRIPLE=armv7-unknown-linux-gnueabihf;; + musllinux*-armv7l) TARGET_TRIPLE=armv7-alpine-linux-musleabihf;; + manylinux*-ppc64le) TARGET_TRIPLE=powerpc64le-unknown-linux-gnu;; + musllinux*-ppc64le) TARGET_TRIPLE=powerpc64le-alpine-linux-musl;; + manylinux*-*) TARGET_TRIPLE=${AUDITWHEEL_ARCH}-unknown-linux-gnu;; + musllinux*-*) TARGET_TRIPLE=${AUDITWHEEL_ARCH}-alpine-linux-musl;; +esac +case "${AUDITWHEEL_POLICY}-${AUDITWHEEL_ARCH}" in + *-riscv64) M_ARCH="-march=rv64gc";; + *-x86_64) M_ARCH="-march=x86-64";; + *-armv7l) M_ARCH="-march=armv7a";; + manylinux*-i686) M_ARCH="-march=k8 -mtune=generic";; # same as gcc manylinux2014 / manylinux_2_28 + musllinux*-i686) M_ARCH="-march=pentium-m -mtune=generic";; # same as gcc musllinux_1_2 +esac +GCC_TRIPLE=$(gcc -dumpmachine) + +cat<"${TOOLCHAIN_PATH}/bin/${AUDITWHEEL_PLAT}.cfg" + -target ${TARGET_TRIPLE} + ${M_ARCH:-} + --gcc-toolchain=${DEVTOOLSET_ROOTPATH:-}/usr + --gcc-triple=${GCC_TRIPLE} +EOF + +cat<"${TOOLCHAIN_PATH}/bin/clang.cfg" + @${AUDITWHEEL_PLAT}.cfg +EOF + +cat<"${TOOLCHAIN_PATH}/bin/clang++.cfg" + @${AUDITWHEEL_PLAT}.cfg +EOF + +cat<"${TOOLCHAIN_PATH}/bin/clang-cpp.cfg" + @${AUDITWHEEL_PLAT}.cfg +EOF + +# override entrypoint to add the toolchain to PATH +mv /usr/local/bin/manylinux-entrypoint /usr/local/bin/manylinux-entrypoint-org +cat</usr/local/bin/manylinux-entrypoint +#!/bin/bash + +set -eu + +export PATH="${TOOLCHAIN_PATH}/bin:\${PATH}" +exec /usr/local/bin/manylinux-entrypoint-org "\$@" +EOF + +chmod +x /usr/local/bin/manylinux-entrypoint From 6453832f43c77166baac24d177b3ab677c8f84c8 Mon Sep 17 00:00:00 2001 From: mattip Date: Fri, 20 Mar 2026 09:02:10 +0200 Subject: [PATCH 3/4] typo --- ci-before-build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci-before-build.sh b/ci-before-build.sh index 71f0a78b..2b33b98a 100755 --- a/ci-before-build.sh +++ b/ci-before-build.sh @@ -27,9 +27,9 @@ echo "creating wheel from $OPENBLAS_COMMIT (NIGHTLY is $NIGHTLY)" if [ "$COMPILER" == "clang" ]; then ./tools/install-static-clang.sh export PATH=/opt/clang/bin:$PATH - export CC = "/opt/clang/bin/clang" - export CXX = "/opt/clang/bin/clang++" - export LDFLAGS = "-fuse-ld=lld" + export CC="/opt/clang/bin/clang" + export CXX="/opt/clang/bin/clang++" + export LDFLAGS="-fuse-ld=lld" fi # Build OpenBLAS From facf30df2159a8a07b6af612e0374019804eb998 Mon Sep 17 00:00:00 2001 From: mattip Date: Fri, 20 Mar 2026 11:58:07 +0200 Subject: [PATCH 4/4] show make stdout --- tools/build_steps.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/build_steps.sh b/tools/build_steps.sh index 9fc5b75b..8737d4be 100644 --- a/tools/build_steps.sh +++ b/tools/build_steps.sh @@ -190,14 +190,14 @@ function build_lib { fi if [ -n "$dynamic_list" ]; then CFLAGS="$CFLAGS -fvisibility=protected -Wno-uninitialized" \ - make BUFFERSIZE=20 DYNAMIC_ARCH=1 QUIET_MAKE=1 \ + make BUFFERSIZE=20 DYNAMIC_ARCH=1 \ USE_OPENMP=0 NUM_THREADS=64 \ DYNAMIC_LIST="$dynamic_list" \ BINARY="$bitness" $interface_flags \ TARGET="$target" else CFLAGS="$CFLAGS -fvisibility=protected -Wno-uninitialized" \ - make BUFFERSIZE=20 DYNAMIC_ARCH=1 QUIET_MAKE=1 \ + make BUFFERSIZE=20 DYNAMIC_ARCH=1 \ USE_OPENMP=0 NUM_THREADS=64 \ BINARY="$bitness" $interface_flags \ TARGET="$target"