Skip to content

Commit bfa6341

Browse files
billatarmgowthamsk-arm
authored andcommitted
.cargo/config.toml: remove
When compiling on an aarch64 host, the override of the linker to the cross "compiler" (uses the gcc frontend) causes a build failure. Theirs no reason to set these globally for all developers as their build host may be different as well as their toolchain preference and naming conventions. Instead override the target specific linker variable in a --config option string in the cross compilation tests. Signed-off-by: Bill Roberts <[email protected]>
1 parent c8a8eaa commit bfa6341

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

.cargo/config.toml

-7
This file was deleted.

test/cross-compile.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,17 @@ export PKG_CONFIG=$(pwd)/test/pkg-config
1818
export SYSROOT=/tmp/arm-linux-gnueabihf
1919
# Add the correct libcrypto to the linking process
2020
export RUSTFLAGS="-lcrypto -L/tmp/arm-linux-gnueabihf/lib"
21-
cargo build --features "pkcs11-provider, mbed-crypto-provider, tpm-provider, unix-peer-credentials-authenticator, direct-authenticator" --target armv7-unknown-linux-gnueabihf
21+
cargo build --features "pkcs11-provider, mbed-crypto-provider, tpm-provider, unix-peer-credentials-authenticator, direct-authenticator" \
22+
--target armv7-unknown-linux-gnueabihf \
23+
--config 'target.armv7-unknown-linux-gnueabihf.linker="arm-linux-gnueabihf-gcc"'
2224

2325
export SYSROOT=/tmp/aarch64-linux-gnu
2426
export RUSTFLAGS="-lcrypto -L/tmp/aarch64-linux-gnu/lib"
2527
# Pull in the TS code
2628
git submodule update --init
27-
cargo build --features "pkcs11-provider, mbed-crypto-provider, tpm-provider, trusted-service-provider, unix-peer-credentials-authenticator, direct-authenticator" --target aarch64-unknown-linux-gnu
29+
cargo build --features "pkcs11-provider, mbed-crypto-provider, tpm-provider, trusted-service-provider, unix-peer-credentials-authenticator, direct-authenticator" \
30+
--target aarch64-unknown-linux-gnu \
31+
--config 'target.aarch64-unknown-linux-gnu.linker="aarch64-linux-gnu-gcc"'
2832

2933
# This is needed because for some reason the i686/i386 libs aren't picked up if we don't toss them around just before...
3034
apt install -y libc6-dev-i386-amd64-cross

0 commit comments

Comments
 (0)