2018-02-04 19:07:40 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# rustc
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
RUSTC_ARCH = $(call qstrip,$(BR2_PACKAGE_HOST_RUSTC_ARCH))
|
|
|
|
RUSTC_ABI = $(call qstrip,$(BR2_PACKAGE_HOST_RUSTC_ABI))
|
|
|
|
|
2018-08-23 00:33:50 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS),y)
|
2018-02-13 08:21:27 +01:00
|
|
|
RUSTC_TARGET_NAME = $(RUSTC_ARCH)-unknown-linux-gnu$(RUSTC_ABI)
|
2018-08-23 00:33:50 +02:00
|
|
|
endif
|
2018-02-04 19:07:40 +01:00
|
|
|
|
|
|
|
ifeq ($(HOSTARCH),x86)
|
|
|
|
RUSTC_HOST_ARCH = i686
|
|
|
|
else
|
|
|
|
RUSTC_HOST_ARCH = $(HOSTARCH)
|
|
|
|
endif
|
|
|
|
|
2018-02-13 08:21:27 +01:00
|
|
|
RUSTC_HOST_NAME = $(RUSTC_HOST_ARCH)-unknown-linux-gnu
|
2018-02-04 19:07:40 +01:00
|
|
|
|
|
|
|
$(eval $(host-virtual-package))
|
2020-02-07 19:08:20 +01:00
|
|
|
|
|
|
|
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
|