Skip to content

Commit 239d3b0

Browse files
committed
Add cross build/testing for ARM.
1 parent a88d390 commit 239d3b0

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/CrossBuilds.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,17 @@ jobs:
8080
packages: 'gcc-powerpc64-linux-gnu g++-powerpc64-linux-gnu binutils-powerpc64-linux-gnu libc6-dev-ppc64-cross qemu-user-static',
8181
cross_file: 'cross_configs/linux_ppc64_ubuntu24.cmake',
8282
}
83+
- {
84+
name: 'QEMU Linux ARM',
85+
os: ubuntu-24.04,
86+
arch: x64,
87+
build-system: 'cmake',
88+
diet-build: 'OFF',
89+
build_type: 'Debug',
90+
diet_build: false,
91+
packages: 'gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user-static',
92+
cross_file: 'cross_configs/linux_arm_ubuntu24.cmake',
93+
}
8394
- {
8495
name: '[BUILD ONLY] Windows i686 mingw',
8596
os: ubuntu-24.04,
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This example file is for builds on Ubunutu 24.04.
2+
# sudo apt install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user-static
3+
set(CMAKE_SYSTEM_NAME Linux)
4+
set(CMAKE_SYSTEM_PROCESSOR arm)
5+
6+
set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
7+
set(CMAKE_ASM_COMPILER arm-linux-gnueabihf-gcc)
8+
set(CMAKE_CROSS_COMPILING 1)
9+
10+
set(CMAKE_SYSROOT /usr/arm-linux-gnueabihf)
11+
12+
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
13+
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
14+
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
15+
16+
set(CMAKE_CROSSCOMPILING_EMULATOR qemu-arm-static;-L;${CMAKE_SYSROOT})
17+

0 commit comments

Comments
 (0)