kumquat-buildroot/package/rustc/rustc.mk
Thomas Petazzoni b6378631c2 package/pkg-cargo.mk: use CARGO_TARGET_<target>_LINKER instead of cargo config file
package/rustc/rustc.mk produces a config file in $(CARGO_HOME) that
points to the linker. We can simplify that by using the
CARGO_TARGET_<target>_LINKER environment variable.

This will also fix problems when host == target, where the target
linker gets picked up incorrectly.

Fixes:

  http://autobuild.buildroot.net/results/2183f1835f2ef553e45e83959910205127b2b259/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-01-09 12:13:49 +01:00

23 lines
599 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-$(LIBC)$(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))