Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/pkg-cargo.mk: fix building cargo packages on 32bit arm
@ 2022-02-17 23:06 Moritz Bitsch via buildroot
  2022-03-07 21:23 ` Arnout Vandecappelle
  2022-07-24 16:08 ` Yann E. MORIN
  0 siblings, 2 replies; 4+ messages in thread
From: Moritz Bitsch via buildroot @ 2022-02-17 23:06 UTC (permalink / raw)
  To: buildroot; +Cc: Moritz Bitsch

From: Moritz Bitsch <moritz@h6t.eu>

there are duplicated symbols between rustc and gcc. Specifying
--allow-multiple-definition to the linker as workaround until
rustc is fixed.

rust-lang issue: https://github.com/rust-lang/compiler-builtins/issues/420

Fixes: http://autobuild.buildroot.net/results/53f/53f5598b8e520caaa135fb4923c09da382dab329
Signed-off-by: Moritz Bitsch <moritz@h6t.eu>
---
 package/pkg-cargo.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/pkg-cargo.mk b/package/pkg-cargo.mk
index e74a8358bc..71d695d926 100644
--- a/package/pkg-cargo.mk
+++ b/package/pkg-cargo.mk
@@ -46,6 +46,14 @@ PKG_CARGO_ENV = \
 	CARGO_BUILD_TARGET="$(RUSTC_TARGET_NAME)" \
 	CARGO_TARGET_$(call UPPERCASE,$(RUSTC_TARGET_NAME))_LINKER=$(notdir $(TARGET_CROSS))gcc
 
+#
+# This is a workaround for https://github.com/rust-lang/compiler-builtins/issues/420
+# and should be removed when fixed upstream
+#
+ifeq ($(NORMALIZED_ARCH),arm)
+	PKG_CARGO_ENV += RUSTFLAGS="-Clink-arg=-Wl,--allow-multiple-definition"
+endif
+
 HOST_PKG_CARGO_ENV = \
 	$(PKG_COMMON_CARGO_ENV)
 
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-25  9:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-17 23:06 [Buildroot] [PATCH 1/1] package/pkg-cargo.mk: fix building cargo packages on 32bit arm Moritz Bitsch via buildroot
2022-03-07 21:23 ` Arnout Vandecappelle
2022-07-24 16:08 ` Yann E. MORIN
2022-07-25  9:20   ` Moritz Bitsch via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox