From: Drew Young Date: Mon, 9 Oct 2023 21:19:50 +0000 (-0400) Subject: rust: fix build with glibc, ARM and hard floats X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=3d799c3eeedfe8813ca3fb2debadffb231f621c1;p=openwrt-packages.git 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 --- 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