package/rustc: prepare for musl-based platforms support
authorNathaniel Husted <nathaniel.husted@outlook.com>
Tue, 18 May 2021 20:54:30 +0000 (22:54 +0200)
committerYann E. MORIN <yann.morin.1998@free.fr>
Tue, 18 May 2021 21:19:47 +0000 (23:19 +0200)
The current rustc package only supports configurations based on glibc
and hardcodes this requirement. This patch prepares the addition of
support for musl-based platforms by using $(LIBC) instead of
hardcoding "gnu" as the C library specifier when defining
RUSTC_TARGET_NAME.

Signed-off-by: Nathaniel Husted <nathaniel.husted@outlook.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/rustc/rustc.mk

index 35ffc36106831a3e5dab078cd86377af11cdb6c9..52860b7eff2245e8370fe99b13240af6ec2ce1d6 100644 (file)
@@ -8,7 +8,7 @@ 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)
+RUSTC_TARGET_NAME = $(RUSTC_ARCH)-unknown-linux-$(LIBC)$(RUSTC_ABI)
 endif
 
 ifeq ($(HOSTARCH),x86)