Skip to content

Commit de561ee

Browse files
committed
Update cross-compile patches for arm32
1 parent 5034878 commit de561ee

File tree

6 files changed

+15
-4
lines changed

6 files changed

+15
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ endef
2424

2525
# Architectures
2626

27-
arm32v7-%: CROSS_ARCH=arm32v7
27+
arm32v7-%: CROSS_ARCH=arm32
2828
arm64v8-%: DOCKER_ARCH=arm64v8
2929
amd64-%: DOCKER_ARCH=amd64
3030
dev-%:

scripts/build/cross-compile.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
case "$1" in
4-
arm32v7)
4+
arm32)
55
TARGET_ARCH="armv7-unknown-linux-gnueabihf"
66
DPKG_ARCH="armhf"
77
PKG="gcc-arm-linux-gnueabihf"

scripts/build/make.bash

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,22 @@ shift
3535
mkdir -p build
3636
cd build
3737

38+
case "$(dpkg --print-architecture)" in
39+
amd64) ARCH="amd64" ;;
40+
arm64) ARCH="arm64" ;;
41+
armhf) ARCH="arm32" ;;
42+
*)
43+
echo "Unsupported architecture: $(dpkg --print-architecture)"
44+
exit 1
45+
;;
46+
esac
47+
3848
case "$CROSS_ARCH" in
39-
arm32v7)
49+
arm32)
4050
export PKG_CONFIG_ALLOW_CROSS_armv7_unknown_linux_gnueabihf=1
4151
export PKG_CONFIG_LIBDIR_armv7_unknown_linux_gnueabihf=/usr/lib/arm-linux-gnueabihf/pkgconfig
4252
export DEB_HOST_RUST_TYPE=armv7-unknown-linux-gnueabihf
53+
export ARCH=arm32
4354
;;
4455

4556
*)
@@ -54,7 +65,7 @@ if [[ -z "$DEBUG" ]]; then
5465
../scripts/build/git-clone.bash ../repos/versions "$REPO"
5566
fi
5667
../scripts/build/strip-cargo.bash "$REPO"
57-
../scripts/build/apply-patches.bash "../repos/patches/$REPO" "../repos/patches-$CROSS_ARCH/$REPO"
68+
../scripts/build/apply-patches.bash "../repos/patches/$REPO" "../repos/patches-$ARCH/$REPO"
5869
../scripts/build/resolve-dependencies.bash "$REPO"
5970
../scripts/build/experimental-cargo.bash "$REPO"
6071
fi

0 commit comments

Comments
 (0)