File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- set -euo pipefail
2
+ set -euox pipefail
3
3
4
4
TARGETARCH=" $1 "
5
5
BUILDARCH=" $2 "
6
6
7
+ apt-get update
8
+
7
9
if [ " $TARGETARCH " = " $BUILDARCH " ]; then
8
10
# Native build
9
11
rustup target list --installed > /tmp/TARGET
@@ -16,24 +18,15 @@ elif [ "$TARGETARCH" = "arm64" ]; then
16
18
echo " aarch64-unknown-linux-gnu" > /tmp/TARGET
17
19
echo " aarch64-linux-gnu-gcc" > /tmp/LINKER
18
20
19
- apt-get update
20
21
apt-get install -y gcc-aarch64-linux-gnu libgcc-s1-arm64-cross pkg-config
21
22
22
23
LIBDIR=" /usr/aarch64-linux-gnu/lib"
23
-
24
- # Also install gcc for aarch64 to get libgcc
25
- apt-get install -y gcc-aarch64-linux-gnu
26
-
27
24
elif [ " $TARGETARCH " = " arm" ]; then
28
25
echo " armv7-unknown-linux-gnueabihf" > /tmp/TARGET
29
26
echo " arm-linux-gnueabihf-gcc" > /tmp/LINKER
30
27
31
- apt-get update
32
28
apt-get install -y gcc-arm-linux-gnueabihf libgcc-s1-armhf-cross cmake libclang1 clang pkg-config
33
29
34
- # Ensure gcc-arm-linux-gnueabihf is available
35
- apt-get install -y gcc-arm-linux-gnueabihf
36
-
37
30
cargo install --force --locked bindgen-cli
38
31
39
32
SYSROOT=$( arm-linux-gnueabihf-gcc -print-sysroot)
You can’t perform that action at this time.
0 commit comments