mirror of
https://github.com/openwrt/packages.git
synced 2025-12-27 04:39:58 +04:00
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 <dyoung@viridiparente.com>
(cherry picked from commit 3d799c3eee)
This commit is contained in:
committed by
Tianling Shen
parent
e9d12e3799
commit
985d0af6eb
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user