Merge pull request #215 from Splendide-Imaginarius/mkxp-z-armv6

Fix armv6 cross-compile target
This commit is contained in:
Splendide Imaginarius 2024-09-03 04:03:07 +00:00 committed by GitHub
commit ae04a71b9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View file

@ -9,5 +9,5 @@ cmake = 'cmake'
[host_machine]
system = 'linux'
cpu_family = 'arm'
cpu = 'generic-armv6+fp'
cpu = 'generic-armv6zk+vfpv2'
endian = 'little'

View file

@ -21,7 +21,12 @@
export ARCH=armv6
export ARCH_OPENSSL=armv4
export ARCH_CFLAGS="-mcpu=generic-armv6+fp -mtune=generic-armv6+fp"
# -march flags from:
# https://raspberrypi.stackexchange.com/questions/2046/which-cpu-flags-are-suitable-for-gcc-on-raspberry-pi
# https://stackoverflow.com/questions/35132319/build-for-armv6-with-gnueabihf
# Disable Thumb since Raspbian doesn't use it and it produces a compiler error:
# https://thinkingeek.com/2014/12/20/arm-assembler-raspberry-pi-chapter-22/
export ARCH_CFLAGS="-march=armv6zk+vfpv2 -marm"
export ARCH_CONFIGURE=arm-linux-gnueabihf
export CC="$ARCH_CONFIGURE-gcc"
export ARCH_CMAKE_TOOLCHAIN=toolchain-arm32.cmake