From 749ac5ed544bf325820fb6ab6c1f24133252cb01 Mon Sep 17 00:00:00 2001 From: fgsfds Date: Tue, 7 Feb 2023 20:38:40 +0100 Subject: [PATCH] ci: nswitch: do not rely on dkp-pacman at all --- scripts/gha/build_nswitch_docker.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/scripts/gha/build_nswitch_docker.sh b/scripts/gha/build_nswitch_docker.sh index 53698f51..94af4a34 100644 --- a/scripts/gha/build_nswitch_docker.sh +++ b/scripts/gha/build_nswitch_docker.sh @@ -14,14 +14,28 @@ build_hlsdk() ./waf clean } -echo "Downloading missing deps..." +echo "Setting up environment..." + +# we can't actually download dkp-toolchain-vars even from here, so +export PORTLIBS_ROOT=${DEVKITPRO}/portlibs +export PATH=${DEVKITPRO}/tools/bin:${DEVKITPRO}/devkitA64/bin:$PATH +export TOOL_PREFIX=aarch64-none-elf- +export CC=${TOOL_PREFIX}gcc +export CXX=${TOOL_PREFIX}g++ +export AR=${TOOL_PREFIX}gcc-ar +export RANLIB=${TOOL_PREFIX}gcc-ranlib +export PORTLIBS_PREFIX=${DEVKITPRO}/portlibs/switch +export PATH=$PORTLIBS_PREFIX/bin:$PATH +export ARCH="-march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIC -ftls-model=local-exec" +export CFLAGS="${ARCH} -O2 -ffunction-sections -fdata-sections" +export CXXFLAGS="${CFLAGS}" +export CPPFLAGS="-D__SWITCH__ -I${PORTLIBS_PREFIX}/include -isystem ${DEVKITPRO}/libnx/include" +export LDFLAGS="${ARCH} -L${PORTLIBS_PREFIX}/lib -L${DEVKITPRO}/libnx/lib" +export LIBS="-lnx" -dkp-pacman -S --noconfirm dkp-toolchain-vars || die # forgive me father, for I have sinned ln -s /usr/bin/python3 /usr/bin/python -source $DEVKITPRO/switchvars.sh - echo "Building libsolder..." make -C libsolder install || die