025b863e6f
This commit modifies the host-rust virtual package to default to host-rust-bin when no other selection has been made, as long as the host supports rust. This allows host only tools to still use rust when the target architecture does not support it. Add target-specific variable which is used to differentiate host and target arch requirements (BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS). A target package shall depend on this variable where a host package will use the previously defined BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS. The new "target" version is selectable for the same set of architectures as before, but now depends on the host variant. Signed-off-by: Sam Voss <sam.voss@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Tested-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
23 lines
595 B
Makefile
23 lines
595 B
Makefile
################################################################################
|
|
#
|
|
# rustc
|
|
#
|
|
################################################################################
|
|
|
|
RUSTC_ARCH = $(call qstrip,$(BR2_PACKAGE_HOST_RUSTC_ARCH))
|
|
RUSTC_ABI = $(call qstrip,$(BR2_PACKAGE_HOST_RUSTC_ABI))
|
|
|
|
ifeq ($(BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS),y)
|
|
RUSTC_TARGET_NAME = $(RUSTC_ARCH)-unknown-linux-gnu$(RUSTC_ABI)
|
|
endif
|
|
|
|
ifeq ($(HOSTARCH),x86)
|
|
RUSTC_HOST_ARCH = i686
|
|
else
|
|
RUSTC_HOST_ARCH = $(HOSTARCH)
|
|
endif
|
|
|
|
RUSTC_HOST_NAME = $(RUSTC_HOST_ARCH)-unknown-linux-gnu
|
|
|
|
$(eval $(host-virtual-package))
|