Skip to content

Commit f439f7c

Browse files
madmoarnout
authored andcommitted
package/pkg-cargo.mk: fix building cargo packages on 32bit arm
There are duplicated symbols between rustc and gcc. Specifying --allow-multiple-definition to the linker as workaround until rustc is fixed. rust-lang issue: rust-lang/compiler-builtins#420 Fixes: http://autobuild.buildroot.net/results/53f/53f5598b8e520caaa135fb4923c09da382dab329 Signed-off-by: Moritz Bitsch <[email protected]> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
1 parent 08f6960 commit f439f7c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

package/pkg-cargo.mk

+8
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ PKG_CARGO_ENV = \
4646
CARGO_BUILD_TARGET="$(RUSTC_TARGET_NAME)" \
4747
CARGO_TARGET_$(call UPPERCASE,$(RUSTC_TARGET_NAME))_LINKER=$(notdir $(TARGET_CROSS))gcc
4848

49+
#
50+
# This is a workaround for https://github.com/rust-lang/compiler-builtins/issues/420
51+
# and should be removed when fixed upstream
52+
#
53+
ifeq ($(NORMALIZED_ARCH),arm)
54+
PKG_CARGO_ENV += RUSTFLAGS="-Clink-arg=-Wl,--allow-multiple-definition"
55+
endif
56+
4957
HOST_PKG_CARGO_ENV = \
5058
$(PKG_COMMON_CARGO_ENV)
5159

0 commit comments

Comments
 (0)