From 3d799c3eeedfe8813ca3fb2debadffb231f621c1 Mon Sep 17 00:00:00 2001 From: Drew Young Date: Mon, 9 Oct 2023 17:19:50 -0400 Subject: [PATCH] rust: fix build with glibc, ARM and hard floats Patch the target triple for Rust with glibc to include hard floating point support. The GNU target triple used elsewhere does not include hard float support, instead `-mfloat-abi=hard` is passed separately. For Rust it must be included in the target triple. This was already being done for musl, this commit adds the same patching for glibc. Without this patch Rust compilation fails with an error like this (abbreviated to fit the line length): ld: error: libstd.so uses VFP register arguments, ... does not ld: failed to merge target specific data of file ... Signed-off-by: Drew Young --- lang/rust/rust-values.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/lang/rust/rust-values.mk b/lang/rust/rust-values.mk index 4c21c2752..7a4d1fcf8 100644 --- a/lang/rust/rust-values.mk +++ b/lang/rust/rust-values.mk @@ -52,6 +52,7 @@ ifeq ($(ARCH),arm) ifeq ($(CONFIG_HAS_FPU),y) RUSTC_TARGET_ARCH:=$(subst musleabi,musleabihf,$(RUSTC_TARGET_ARCH)) + RUSTC_TARGET_ARCH:=$(subst gnueabi,gnueabihf,$(RUSTC_TARGET_ARCH)) endif endif