Skip to content

Commit 7ee32e0

Browse files
committed
ci: Fix GDB Python scripting support for Canadian cross builds
The GDB for Canadian cross compilation builds (linux-aarch64 and macos-aarch64) were previously compiled without the Python scripting support because `CT_GDB_CROSS_PYTHON` is not enabled by default for Canadian cross compilation. Now that we explicitly set `CT_GDB_CROSS_PYTHON=y` for these hosts, the GDB build is failing due to the host Python libraries missing on the build system. This commit updates the CI workflow to specify the libpython cross compilation kits for the linux-aarch64 and macos-aarch64 hosts so that the GDB build system can resolve the host Python dependencies on the cross build machine. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent 5abd8f7 commit 7ee32e0

File tree

1 file changed

+28
-6
lines changed

1 file changed

+28
-6
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -572,19 +572,41 @@ jobs:
572572
CT_GDB_CROSS_BUILD_NO_PYTHON=y
573573
EOF
574574
575-
if [ "${{ matrix.host.name }}" == "windows-x86_64" ]; then
576-
# Clone mingw-w64-libpython cross compilation kit
575+
if [ "${{ matrix.host.name }}" == "linux-aarch64" ]; then
576+
# Clone crosskit-aarch64-linux-libpython cross compilation kit
577+
git clone \
578+
https://github.com/stephanosio/crosskit-aarch64-linux-libpython.git \
579+
${WORKSPACE}/crosskit-aarch64-linux-libpython
580+
# Use Python 3.8.0
581+
export LIBPYTHON_KIT_ROOT=${WORKSPACE}/crosskit-aarch64-linux-libpython/python-3.8.0
582+
# Set Python configuration resolver for GDB
583+
cat <<EOF >> .config
584+
CT_GDB_CROSS_PYTHON_BINARY="${LIBPYTHON_KIT_ROOT}/bin/python"
585+
EOF
586+
elif [ "${{ matrix.host.name }}" == "macos-aarch64" ]; then
587+
# Clone crosskit-aarch64-darwin-libpython cross compilation kit
588+
git clone \
589+
https://github.com/stephanosio/crosskit-aarch64-darwin-libpython.git \
590+
${WORKSPACE}/crosskit-aarch64-darwin-libpython
591+
# Use Python 3.8.12
592+
export LIBPYTHON_KIT_ROOT=${WORKSPACE}/crosskit-aarch64-darwin-libpython/python-3.8.12
593+
# Set Python configuration resolver for GDB
594+
cat <<EOF >> .config
595+
CT_GDB_CROSS_PYTHON_BINARY="${LIBPYTHON_KIT_ROOT}/bin/python"
596+
EOF
597+
elif [ "${{ matrix.host.name }}" == "windows-x86_64" ]; then
598+
# Clone crosskit-mingw-w64-libpython cross compilation kit
577599
git clone \
578-
https://github.com/stephanosio/mingw-w64-libpython.git \
579-
${WORKSPACE}/mingw-w64-libpython
600+
https://github.com/stephanosio/crosskit-mingw-w64-libpython.git \
601+
${WORKSPACE}/crosskit-mingw-w64-libpython
580602
# Use Python 3.8.3
581-
export LIBPYTHON_KIT_ROOT=${WORKSPACE}/mingw-w64-libpython/python-3.8.3
603+
export LIBPYTHON_KIT_ROOT=${WORKSPACE}/crosskit-mingw-w64-libpython/python-3.8.3
582604
# Set Python configuration resolver for GDB
583605
cat <<EOF >> .config
584606
CT_GDB_CROSS_PYTHON_BINARY="${LIBPYTHON_KIT_ROOT}/bin/python"
585607
EOF
586608
else
587-
# Use Python 3.8 for Linux and macOS builds
609+
# Use Python 3.8 for non-Canadian Linux and macOS builds
588610
cat <<EOF >> .config
589611
CT_GDB_CROSS_PYTHON_BINARY="python3.8"
590612
EOF

0 commit comments

Comments
 (0)