diff --git a/package/pkg-cargo.mk b/package/pkg-cargo.mk index 7f63595831..77d2f66b17 100644 --- a/package/pkg-cargo.mk +++ b/package/pkg-cargo.mk @@ -43,7 +43,8 @@ PKG_CARGO_ENV = \ __CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS="nightly" \ CARGO_UNSTABLE_TARGET_APPLIES_TO_HOST="true" \ CARGO_TARGET_APPLIES_TO_HOST="false" \ - CARGO_BUILD_TARGET="$(RUSTC_TARGET_NAME)" + CARGO_BUILD_TARGET="$(RUSTC_TARGET_NAME)" \ + CARGO_TARGET_$(subst,-,_,$(RUSTC_TARGET_NAME))_LINKER=$(notdir $(TARGET_CROSS))gcc HOST_PKG_CARGO_ENV = \ $(PKG_COMMON_CARGO_ENV) diff --git a/package/rustc/cargo-config.in b/package/rustc/cargo-config.in deleted file mode 100644 index 47fad026be..0000000000 --- a/package/rustc/cargo-config.in +++ /dev/null @@ -1,2 +0,0 @@ -[target.@RUSTC_TARGET_NAME@] -linker = "@CROSS_PREFIX@gcc" diff --git a/package/rustc/rustc.mk b/package/rustc/rustc.mk index 52860b7eff..0513dd0b40 100644 --- a/package/rustc/rustc.mk +++ b/package/rustc/rustc.mk @@ -20,15 +20,3 @@ endif RUSTC_HOST_NAME = $(RUSTC_HOST_ARCH)-unknown-linux-gnu $(eval $(host-virtual-package)) - -ifeq ($(BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS),y) -define RUSTC_INSTALL_CARGO_CONFIG - mkdir -p $(HOST_DIR)/share/cargo - sed -e 's/@RUSTC_TARGET_NAME@/$(RUSTC_TARGET_NAME)/' \ - -e 's/@CROSS_PREFIX@/$(notdir $(TARGET_CROSS))/' \ - package/rustc/cargo-config.in \ - > $(HOST_DIR)/share/cargo/config -endef -# check-package disable TypoInPackageVariable - TOOLCHAIN intended -TOOLCHAIN_POST_INSTALL_STAGING_HOOKS += RUSTC_INSTALL_CARGO_CONFIG -endif