7070 - name : Install Linux armv7 cross toolchain
7171 if : ${{ matrix.target == 'armv7-unknown-linux-gnueabihf' }}
7272 run : |
73- # Restrict default sources to amd64 so apt does not query non-existent armhf indices on security.ubuntu.com
74- sudo tee /etc/apt/sources.list >/dev/null <<'EOF'
75- deb [arch=amd64] http://archive.ubuntu.com/ubuntu noble main restricted universe multiverse
76- deb [arch=amd64] http://archive.ubuntu.com/ubuntu noble-updates main restricted universe multiverse
77- deb [arch=amd64] http://archive.ubuntu.com/ubuntu noble-backports main restricted universe multiverse
78- deb [arch=amd64] http://security.ubuntu.com/ubuntu noble-security main restricted universe multiverse
79- EOF
80- sudo dpkg --add-architecture armhf
81- # Point armhf sources to ubuntu-ports; security.ubuntu.com lacks 32-bit indexes on 24.04
82- sudo tee /etc/apt/sources.list.d/ubuntu-armhf.list >/dev/null <<'EOF'
83- deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports noble main restricted universe multiverse
84- deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports noble-updates main restricted universe multiverse
85- deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports noble-security main restricted universe multiverse
86- EOF
8773 sudo apt-get update
8874 # Provide armv7 toolchain and OpenSSL dev headers/libs for the cross build
8975 sudo apt-get install -y gcc-arm-linux-gnueabihf pkg-config libssl-dev:armhf
@@ -98,17 +84,17 @@ jobs:
9884 export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
9985 export PKG_CONFIG_ALLOW_CROSS=1
10086 export PKG_CONFIG_PATH="/usr/lib/aarch64-linux-gnu/pkgconfig:${PKG_CONFIG_PATH:-}"
101- export OPENSSL_LIB_DIR=/usr/lib/aarch64-linux-gnu
102- export OPENSSL_INCLUDE_DIR=/usr/include/aarch64-linux-gnu
87+ export OPENSSL_NO_PKG_CONFIG=1
88+ export OPENSSL_STATIC=1
10389 fi
10490 if [[ "${{ matrix.target }}" == "armv7-unknown-linux-gnueabihf" ]]; then
10591 export CC_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-gcc
10692 export AR_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-ar
10793 export CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc
10894 export PKG_CONFIG_ALLOW_CROSS=1
10995 export PKG_CONFIG_PATH="/usr/lib/arm-linux-gnueabihf/pkgconfig:${PKG_CONFIG_PATH:-}"
110- export OPENSSL_LIB_DIR=/usr/lib/arm-linux-gnueabihf
111- export OPENSSL_INCLUDE_DIR=/usr/include/arm-linux-gnueabihf
96+ export OPENSSL_NO_PKG_CONFIG=1
97+ export OPENSSL_STATIC=1
11298 fi
11399 cargo build --release --target ${{ matrix.target }}
114100 shell : bash
0 commit comments