Skip to content

Commit 94dba7c

Browse files
committed
Fast toolchain file fixes
1 parent de4d60c commit 94dba7c

File tree

4 files changed

+23
-6
lines changed

4 files changed

+23
-6
lines changed

.github/workflows/CrossBuilds.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,9 @@ jobs:
120120
android_abi: ${{ matrix.config.android_abi }}
121121
cross_file: ${{ matrix.config.cross_file }}
122122
run: |
123-
wget https://dl.google.com/android/repository/android-ndk-${ndk_version}-linux.zip
124-
mkdir ${ndk_path}
123+
wget -q https://dl.google.com/android/repository/android-ndk-${ndk_version}-linux.zip
124+
mkdir -p ${ndk_path}
125125
unzip -d ${ndk_path} android-ndk-${ndk_version}-linux.zip
126-
# Move the directory
127-
mv ${ndk_path}/* ${ndk_path}
128126
ls -l ${ndk_path}
129127
echo "set(CMAKE_CROSSCOMPILING_EMULATOR '${qemu};-L;${ndk_path}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/')" >> ${cross_file}
130128
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+
# Search for required packages (compiler + libc) with `apt search mips64`
3+
# sudo apt install gcc-mips64el-linux-gnuabi64 g++-mips64el-linux-gnuabi64 binutils-mips64el-linux-gnuabi64 libc6-dev-mips64el-cross qemu-user-static
4+
set(CMAKE_SYSTEM_NAME Linux)
5+
set(CMAKE_SYSTEM_PROCESSOR mips64el)
6+
7+
set(CMAKE_C_COMPILER mips64el-linux-gnuabi64-gcc)
8+
set(CMAKE_ASM_COMPILER mips64el-linux-gnuabi64-gcc)
9+
set(CMAKE_CROSS_COMPILING 1)
10+
11+
set(CMAKE_SYSROOT /usr/mips64el-linux-gnuabi64/usr/)
12+
13+
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
14+
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
15+
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
16+
17+
set(CMAKE_CROSSCOMPILING_EMULATOR qemu-mips64el-static;-L;/usr/mips64el-linux-gnuabi64/)

cross_configs/linux_mips_ubuntu24.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ set(CMAKE_SYSTEM_NAME Linux)
55
set(CMAKE_SYSTEM_PROCESSOR mips)
66

77
set(CMAKE_C_COMPILER mips-linux-gnu-gcc)
8-
set(CMAKE_CXX_COMPILER mips-linux-gnu-g++)
8+
set(CMAKE_ASM_COMPILER mips-linux-gnu-gcc)
9+
set(CMAKE_CROSS_COMPILING 1)
910

1011
set(CMAKE_SYSROOT /usr/mips-linux-gnu/usr/)
1112

cross_configs/linux_ppc64_ubuntu24.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ set(CMAKE_SYSTEM_NAME Linux)
55
set(CMAKE_SYSTEM_PROCESSOR ppc64)
66

77
set(CMAKE_C_COMPILER powerpc64-linux-gnu-gcc)
8-
set(CMAKE_CXX_COMPILER powerpc64-linux-gnu-g++)
8+
set(CMAKE_ASM_COMPILER powerpc64-linux-gnu-gcc)
9+
set(CMAKE_CROSS_COMPILING 1)
910

1011
set(CMAKE_SYSROOT /usr/powerpc64-linux-gnu/usr)
1112

0 commit comments

Comments
 (0)