Add manylinux_2_28-aarch64 image and fix qemu path in 2_34 variant

Add a new manylinux_2_28-aarch64 cross-compilation image targeting
AlmaLinux 8 (glibc 2.28) for building portable Python wheels for
aarch64 from x86_64 hosts. Based on the manylinux_2_34-aarch64
variant with adjusted glibc (2.28) and kernel headers (4.18).

Also fix CMAKE_CROSSCOMPILING_EMULATOR in the 2_34 Toolchain.cmake
to use /usr/bin/qemu-aarch64-static (matching what the Dockerfile
actually installs).
This commit is contained in:
Julian Oes
2026-04-03 06:43:18 +13:00
parent 9b3357cf9b
commit 7633bc2b5e
9 changed files with 1309 additions and 4 deletions
+21
View File
@@ -0,0 +1,21 @@
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
set(MANYLINUX_2_28 TRUE)
set(cross_triple "aarch64-unknown-linux-gnu")
set(cross_root /usr/xcc/${cross_triple})
set(CMAKE_C_COMPILER $ENV{CC})
set(CMAKE_CXX_COMPILER $ENV{CXX})
set(CMAKE_Fortran_COMPILER $ENV{FC})
set(CMAKE_CXX_FLAGS "-I ${cross_root}/include/")
list(APPEND CMAKE_FIND_ROOT_PATH ${CMAKE_PREFIX_PATH} ${cross_root} ${cross_root}/${cross_triple})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_SYSROOT ${cross_root}/${cross_triple}/sysroot)
set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-aarch64-static)