rust-1.2.0: fix llvm link issue cause "multiple crates" error

Fixes #6 (until something else comes along and adds another '-L')

At the same time remove the no longer needed patch to tweak llvm
version checking, we disable those checks in configure now.
This commit is contained in:
Cody P Schafer
2015-08-26 12:17:28 -04:00
parent 6750c4fcdd
commit a626e68cee
4 changed files with 37 additions and 57 deletions
@@ -1,28 +0,0 @@
From dd270c83db48947a4719ca330d6353b8633a053d Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Fri, 7 Aug 2015 15:50:44 -0400
Subject: [PATCH 10/10] configure: allow the llvm shipped as a submodule to be
used
---
configure | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index c07a517..4299e40 100755
--- a/configure
+++ b/configure
@@ -943,8 +943,8 @@ then
LLVM_CONFIG="$CFG_LLVM_ROOT/bin/llvm-config"
LLVM_VERSION=$($LLVM_CONFIG --version)
- case $LLVM_VERSION in
- (3.[5-6]*)
+ case ${LLVM_VERSION%svn} in
+ (3.[567]*)
msg "found ok version of LLVM: $LLVM_VERSION"
;;
(*)
--
2.5.0
@@ -0,0 +1,36 @@
From 64679c95a8f1fcc27702a0ada730d1fd320ab307 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Wed, 26 Aug 2015 11:21:36 -0400
Subject: [PATCH 10/10] mk: tell rustc that we're only looking for native libs
in the LLVM_LIBDIR
This fixes the case where we try to re-build & re-install rust to the
same prefix (without uninstalling) while using an llvm-root that is the
same as the prefix.
Without this, builds like that fail with:
'error: multiple dylib candidates for `std` found'
See https://github.com/jmesmon/meta-rust/issues/6 for some details.
May also be related to #20342.
---
mk/main.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mk/main.mk b/mk/main.mk
index 73fb58b..4075c24 100644
--- a/mk/main.mk
+++ b/mk/main.mk
@@ -294,7 +294,7 @@ LLVM_VERSION_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --version)
LLVM_BINDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --bindir)
LLVM_INCDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --includedir)
LLVM_LIBDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libdir)
-LLVM_LIBDIR_RUSTFLAGS_$(1)=-L "$$(LLVM_LIBDIR_$(1))"
+LLVM_LIBDIR_RUSTFLAGS_$(1)=-L native="$$(LLVM_LIBDIR_$(1))"
LLVM_LIBS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libs $$(LLVM_COMPONENTS))
LLVM_LDFLAGS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --ldflags)
ifeq ($$(findstring freebsd,$(1)),freebsd)
--
2.5.0
@@ -1,28 +0,0 @@
From dc0e31730dbd22f457c65cac083c233d6fd9cd88 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Fri, 7 Aug 2015 15:50:44 -0400
Subject: [PATCH 11/11] configure: allow the llvm shipped as a submodule to be
used
---
configure | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index c07a517..4299e40 100755
--- a/configure
+++ b/configure
@@ -943,8 +943,8 @@ then
LLVM_CONFIG="$CFG_LLVM_ROOT/bin/llvm-config"
LLVM_VERSION=$($LLVM_CONFIG --version)
- case $LLVM_VERSION in
- (3.[5-6]*)
+ case ${LLVM_VERSION%svn} in
+ (3.[567]*)
msg "found ok version of LLVM: $LLVM_VERSION"
;;
(*)
--
2.5.0
+1 -1
View File
@@ -14,7 +14,7 @@ SRC_URI_append = "\
file://${PP}/0007-mk-install-use-disable-rewrite-paths.patch \
file://${PP}/0008-install-disable-ldconfig.patch \
file://${PP}/0009-Remove-crate-metadata-from-symbol-hashing.patch \
file://${PP}/0010-configure-allow-the-llvm-shipped-as-a-submodule-to-b.patch \
file://${PP}/0010-mk-tell-rustc-that-we-re-only-looking-for-native-lib.patch \
\
file://rust-installer/0001-add-option-to-disable-rewriting-of-install-paths.patch;patchdir=src/rust-installer \
"