ScarletNX builds for 64-bit RISC-V (rv64gc) and LoongArch (LA64 v1.0) Linux. No machine of either has run it yet. CI
cross-builds their AppImages for the nightlies, not for pull requests (ScarletNX-linux-riscv64 and
ScarletNX-linux-loongarch64, the appimage-cross job in
.github/workflows/build.yml) against an Arch system root of the architecture and runs them under qemu as installed,
as it does PowerPC64 LE's (PowerPC64). The nightlies publish them when their jobs built, as
PowerPC64 LE's.
As PowerPC64 LE's, with the linux-riscv64-cross or linux-loongarch64-cross preset and an Arch root of the
architecture in SNX_SYSROOT (its pkg-config files and its GCC runtime). scripts/appimage-sysroot.sh ROOT
installs what the AppImage links into an unpacked Arch root, as CI does, which keeps the root it makes for a week. Its
SDL3 is the root's package, which SNX_SYSTEM_SDL3 takes:
export SNX_SYSROOT=/path/to/the/root
cmake --preset linux-riscv64-cross -DSNX_SYSTEM_SDL3=ON
cmake --build --preset linux-riscv64-cross
CI packages the AppImages with this machine's appimagetool, which resolves mkdwarfs for this machine too, as the
target's compresses many times slower under qemu (Build).
cmake/cross.cmake): the runtime library is merged into each module with its functions' own
target features, and the module's linker (link_elf.c, the relocations in elf_object.c) moves no code, so it
refuses R_RISCV_ALIGN and R_LARCH_ALIGN.amocas.q) and from LoongArch v1.1 (sc.q), so a module calls RtAPI.cas128 (SNX_ABI 12,
src/common/runtime/cas128.c). It runs the instruction where the kernel (riscv_hwprobe) or CPUCFG says every
core has it; elsewhere it swaps the halves under a lock of the address's stripe, each a 64-bit compare-and-swap, and
undoes the first when the second finds another value. Callers of it see the 16 bytes change at once; a plain store
to one half between its two swaps is not refused, as a real exclusive monitor would refuse it.Made from docs/hosts/riscv-loongarch.md at 69237645142c. GPL-3.0-or-later.