diff --git a/recipes/rust/files/0020-Support-bindir.patch b/recipes/rust/files/0050-Support-bindir.patch similarity index 98% rename from recipes/rust/files/0020-Support-bindir.patch rename to recipes/rust/files/0050-Support-bindir.patch index bad9451..308cc83 100644 --- a/recipes/rust/files/0020-Support-bindir.patch +++ b/recipes/rust/files/0050-Support-bindir.patch @@ -1,7 +1,7 @@ From 7059bccadb5cdf560f1c060ed3f785fe935ad68d Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Mon, 17 Nov 2014 19:44:58 -0500 -Subject: [PATCH 20/29] Support --bindir +Subject: [PATCH 50/62] Support --bindir --- configure | 4 ++++ @@ -121,5 +121,5 @@ index 4f43b1e..add1c26 100644 install -m755 "${CFG_SRC_DIR}/$p" "${FILE_INSTALL_PATH}" else -- -2.1.3 +2.0.4 diff --git a/recipes/rust/files/0021-Remember-relative-libdir-and-bindir-from-build-time.patch b/recipes/rust/files/0051-Remember-relative-libdir-and-bindir-from-build-time.patch similarity index 99% rename from recipes/rust/files/0021-Remember-relative-libdir-and-bindir-from-build-time.patch rename to recipes/rust/files/0051-Remember-relative-libdir-and-bindir-from-build-time.patch index 313bf60..7e7fc21 100644 --- a/recipes/rust/files/0021-Remember-relative-libdir-and-bindir-from-build-time.patch +++ b/recipes/rust/files/0051-Remember-relative-libdir-and-bindir-from-build-time.patch @@ -1,7 +1,7 @@ From 21379cee1db605007e5eb2b28b1d55ac24c04a5b Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Mon, 17 Nov 2014 20:10:42 -0500 -Subject: [PATCH 21/29] Remember relative libdir and bindir from build time +Subject: [PATCH 51/62] Remember relative libdir and bindir from build time --- configure | 6 +++ @@ -191,5 +191,5 @@ index d27a338..2e1138e 100644 path.push(&tlib); -- -2.1.3 +2.0.4 diff --git a/recipes/rust/files/0022-mk-add-missing-CFG_BINDIR_RELATIVE-uses.patch b/recipes/rust/files/0052-mk-add-missing-CFG_BINDIR_RELATIVE-uses.patch similarity index 96% rename from recipes/rust/files/0022-mk-add-missing-CFG_BINDIR_RELATIVE-uses.patch rename to recipes/rust/files/0052-mk-add-missing-CFG_BINDIR_RELATIVE-uses.patch index 7c8ecd0..dbbf780 100644 --- a/recipes/rust/files/0022-mk-add-missing-CFG_BINDIR_RELATIVE-uses.patch +++ b/recipes/rust/files/0052-mk-add-missing-CFG_BINDIR_RELATIVE-uses.patch @@ -1,7 +1,7 @@ From 44d01c0ca3e2d1f6d6432ce6cef5a6430aade4f2 Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Tue, 18 Nov 2014 13:44:13 -0500 -Subject: [PATCH 22/29] mk: add missing CFG_BINDIR_RELATIVE uses +Subject: [PATCH 52/62] mk: add missing CFG_BINDIR_RELATIVE uses --- mk/main.mk | 2 +- @@ -60,5 +60,5 @@ index 7df2489..842078f 100644 prepare-base-$(1): PREPARE_DEST_MAN_DIR=$$(PREPARE_DEST_DIR)/share/man/man1 prepare-base-$(1): prepare-everything-$(1) -- -2.1.3 +2.0.4 diff --git a/recipes/rust/files/0023-mk-add-missing-CFG_LIBDIR_RELATIVE.patch b/recipes/rust/files/0053-mk-add-missing-CFG_LIBDIR_RELATIVE.patch similarity index 92% rename from recipes/rust/files/0023-mk-add-missing-CFG_LIBDIR_RELATIVE.patch rename to recipes/rust/files/0053-mk-add-missing-CFG_LIBDIR_RELATIVE.patch index ae66ac7..8cf2965 100644 --- a/recipes/rust/files/0023-mk-add-missing-CFG_LIBDIR_RELATIVE.patch +++ b/recipes/rust/files/0053-mk-add-missing-CFG_LIBDIR_RELATIVE.patch @@ -1,7 +1,7 @@ From 6c66b1d90457ef8cf6b6ef73301c5f74f1e41d7d Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Tue, 18 Nov 2014 13:48:14 -0500 -Subject: [PATCH 23/29] mk: add missing CFG_LIBDIR_RELATIVE +Subject: [PATCH 53/62] mk: add missing CFG_LIBDIR_RELATIVE --- mk/grammar.mk | 4 ++-- @@ -23,5 +23,5 @@ index 12190fb..dcebabf 100644 # Run the reference lexer against libsyntax and compare the tokens and spans. -- -2.1.3 +2.0.4 diff --git a/recipes/rust/files/0024-configure-CFG_-DIR_RELATIVE-avoid-requiring-existenc.patch b/recipes/rust/files/0054-configure-CFG_-DIR_RELATIVE-avoid-requiring-existenc.patch similarity index 92% rename from recipes/rust/files/0024-configure-CFG_-DIR_RELATIVE-avoid-requiring-existenc.patch rename to recipes/rust/files/0054-configure-CFG_-DIR_RELATIVE-avoid-requiring-existenc.patch index a3d5a9d..c63c435 100644 --- a/recipes/rust/files/0024-configure-CFG_-DIR_RELATIVE-avoid-requiring-existenc.patch +++ b/recipes/rust/files/0054-configure-CFG_-DIR_RELATIVE-avoid-requiring-existenc.patch @@ -1,7 +1,7 @@ From 9c4d2a42ecae5908e4864352422d5e28457307b3 Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Tue, 18 Nov 2014 14:02:36 -0500 -Subject: [PATCH 24/29] configure: CFG_*DIR_RELATIVE: avoid requiring existence +Subject: [PATCH 54/62] configure: CFG_*DIR_RELATIVE: avoid requiring existence --- configure | 4 ++-- @@ -23,5 +23,5 @@ index c9bec44..7914601 100755 # Validate Options step_msg "validating $CFG_SELF args" -- -2.1.3 +2.0.4 diff --git a/recipes/rust/files/0025-mk-add-rule-to-create-bindir.patch b/recipes/rust/files/0055-mk-add-rule-to-create-bindir.patch similarity index 92% rename from recipes/rust/files/0025-mk-add-rule-to-create-bindir.patch rename to recipes/rust/files/0055-mk-add-rule-to-create-bindir.patch index 0734536..dc2f7cc 100644 --- a/recipes/rust/files/0025-mk-add-rule-to-create-bindir.patch +++ b/recipes/rust/files/0055-mk-add-rule-to-create-bindir.patch @@ -1,7 +1,7 @@ From 58a621bdfafd3dfb7aa5e9dc7e9df177fe8977eb Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Tue, 18 Nov 2014 14:07:37 -0500 -Subject: [PATCH 25/29] mk: add rule to create bindir +Subject: [PATCH 55/62] mk: add rule to create bindir Without this make fails due to not finding a way to create the bindir target. --- @@ -28,5 +28,5 @@ index 59a0095..b8e8345 100644 endef -- -2.1.3 +2.0.4 diff --git a/recipes/rust/files/0026-mk-always-use-bin-as-bindir-for-stage0-CFG_BUILD-and.patch b/recipes/rust/files/0056-mk-always-use-bin-as-bindir-for-stage0-CFG_BUILD-and.patch similarity index 97% rename from recipes/rust/files/0026-mk-always-use-bin-as-bindir-for-stage0-CFG_BUILD-and.patch rename to recipes/rust/files/0056-mk-always-use-bin-as-bindir-for-stage0-CFG_BUILD-and.patch index 4492613..aec169b 100644 --- a/recipes/rust/files/0026-mk-always-use-bin-as-bindir-for-stage0-CFG_BUILD-and.patch +++ b/recipes/rust/files/0056-mk-always-use-bin-as-bindir-for-stage0-CFG_BUILD-and.patch @@ -1,7 +1,7 @@ From 1cac153be4b71e97ec61c894c3681e803a17f985 Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Tue, 18 Nov 2014 14:52:56 -0500 -Subject: [PATCH 26/29] mk: always use bin as bindir for stage0 CFG_BUILD and +Subject: [PATCH 56/62] mk: always use bin as bindir for stage0 CFG_BUILD and pass it an -L to the TLIB dir We can't trust stage0 rustc to actually know where our libdir is, so we @@ -66,5 +66,5 @@ index 0fb6f5f..2e6c6c8 100644 endef -- -2.1.3 +2.0.4 diff --git a/recipes/rust/files/0027-mk-stage0-complain-instead-of-creating-an-empty-file.patch b/recipes/rust/files/0057-mk-stage0-complain-instead-of-creating-an-empty-file.patch similarity index 92% rename from recipes/rust/files/0027-mk-stage0-complain-instead-of-creating-an-empty-file.patch rename to recipes/rust/files/0057-mk-stage0-complain-instead-of-creating-an-empty-file.patch index 0de3836..e2c71e9 100644 --- a/recipes/rust/files/0027-mk-stage0-complain-instead-of-creating-an-empty-file.patch +++ b/recipes/rust/files/0057-mk-stage0-complain-instead-of-creating-an-empty-file.patch @@ -1,7 +1,7 @@ From 70cbf9f2285349700fd1fce8b3e4d2ca25ca53c7 Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Tue, 18 Nov 2014 14:53:39 -0500 -Subject: [PATCH 27/29] mk/stage0: complain instead of creating an empty file +Subject: [PATCH 57/62] mk/stage0: complain instead of creating an empty file If the expected rustc snapshot is not where we expect it to be, complain and fail at that point rather than creating a empty rustc file @@ -24,5 +24,5 @@ index e028bba..460a4a7 100644 # For other targets, let the host build the target: -- -2.1.3 +2.0.4 diff --git a/recipes/rust/files/0028-mk-target-fix-typo-so-we-depend-on-the-correct-direc.patch b/recipes/rust/files/0058-mk-target-fix-typo-so-we-depend-on-the-correct-direc.patch similarity index 92% rename from recipes/rust/files/0028-mk-target-fix-typo-so-we-depend-on-the-correct-direc.patch rename to recipes/rust/files/0058-mk-target-fix-typo-so-we-depend-on-the-correct-direc.patch index 4b5b913..602b16c 100644 --- a/recipes/rust/files/0028-mk-target-fix-typo-so-we-depend-on-the-correct-direc.patch +++ b/recipes/rust/files/0058-mk-target-fix-typo-so-we-depend-on-the-correct-direc.patch @@ -1,7 +1,7 @@ From 3cee7291722137195a9cc6f6556609ecac75fb8a Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Tue, 18 Nov 2014 16:32:03 -0500 -Subject: [PATCH 28/29] mk/target: fix typo so we depend on the correct +Subject: [PATCH 58/62] mk/target: fix typo so we depend on the correct directory Without this, if we we're using a non-standard host libdir, the target @@ -25,5 +25,5 @@ index ed7d8bb..acdf780 100644 $$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --cfg $(4) -- -2.1.3 +2.0.4 diff --git a/recipes/rust/files/0029-rustdoc-avoid-supplying-a-bad-default-sysroot-so-the.patch b/recipes/rust/files/0059-rustdoc-avoid-supplying-a-bad-default-sysroot-so-the.patch similarity index 94% rename from recipes/rust/files/0029-rustdoc-avoid-supplying-a-bad-default-sysroot-so-the.patch rename to recipes/rust/files/0059-rustdoc-avoid-supplying-a-bad-default-sysroot-so-the.patch index a01df2c..98f0c8f 100644 --- a/recipes/rust/files/0029-rustdoc-avoid-supplying-a-bad-default-sysroot-so-the.patch +++ b/recipes/rust/files/0059-rustdoc-avoid-supplying-a-bad-default-sysroot-so-the.patch @@ -1,7 +1,7 @@ From c70d53d795de0d361cdb2220fc348993336be850 Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Tue, 18 Nov 2014 18:56:12 -0500 -Subject: [PATCH 29/29] rustdoc: avoid supplying a bad default sysroot so the +Subject: [PATCH 59/62] rustdoc: avoid supplying a bad default sysroot so the librustc code can calculate it properly --- @@ -30,5 +30,5 @@ index 21242e6..b040a4b 100644 crate_types: vec!(config::CrateTypeRlib), lint_opts: vec!((warning_lint, lint::Allow)), -- -2.1.3 +2.0.4 diff --git a/recipes/rust/files/0060-src-etc-install.sh-use-LIBDIR-and-BINDIR-RELATIVE.patch b/recipes/rust/files/0060-src-etc-install.sh-use-LIBDIR-and-BINDIR-RELATIVE.patch new file mode 100644 index 0000000..80264c9 --- /dev/null +++ b/recipes/rust/files/0060-src-etc-install.sh-use-LIBDIR-and-BINDIR-RELATIVE.patch @@ -0,0 +1,75 @@ +From 573101145b8d5a666b7b45c557838e4f1a8837e7 Mon Sep 17 00:00:00 2001 +From: Cody P Schafer +Date: Wed, 19 Nov 2014 19:30:06 -0500 +Subject: [PATCH 60/62] src/etc/install.sh: use LIBDIR and BINDIR RELATIVE + +--- + src/etc/install.sh | 23 ++++++++++++++--------- + 1 file changed, 14 insertions(+), 9 deletions(-) + +diff --git a/src/etc/install.sh b/src/etc/install.sh +index add1c26..021dc31 100644 +--- a/src/etc/install.sh ++++ b/src/etc/install.sh +@@ -315,6 +315,11 @@ then + exit 0 + fi + ++# Determine libdir and bindir relative to prefix ++step_msg "calculating relative paths to prefix = ${CFG_PREFIX}" ++CFG_BINDIR_RELATIVE=$(realpath -m --relative-to="${CFG_PREFIX}" "${CFG_BINDIR}") ++CFG_LIBDIR_RELATIVE=$(realpath -m --relative-to="${CFG_PREFIX}" "${CFG_LIBDIR}") ++ + step_msg "validating $CFG_SELF args" + validate_opt + +@@ -328,8 +333,8 @@ then + if [ -z "${CFG_UNINSTALL}" ] + then + msg "verifying platform can run binaries" +- export $CFG_LD_PATH_VAR="${CFG_SRC_DIR}/lib:$CFG_OLD_LD_PATH_VAR" +- "${CFG_SRC_DIR}/bin/rustc" --version > /dev/null ++ export $CFG_LD_PATH_VAR="${CFG_SRC_DIR}/${CFG_LIBDIR_RELATIVE}:$CFG_OLD_LD_PATH_VAR" ++ "${CFG_SRC_DIR}/${CFG_BINDIR_RELATIVE}/rustc" --version > /dev/null + if [ $? -ne 0 ] + then + err "can't execute rustc binary on this platform" +@@ -432,16 +437,16 @@ while read p; do + # Decide the destination of the file + FILE_INSTALL_PATH="${CFG_PREFIX}/$p" + +- if echo "$p" | grep "^lib/" > /dev/null ++ if echo "$p" | grep "^${CFG_LIBDIR_RELATIVE}/" > /dev/null + then +- pp=`echo $p | sed 's/^lib\///'` ++ pp=`echo $p | sed 's;^'${CFG_LIBDIR_RELATIVE}'/;;'` + FILE_INSTALL_PATH="${CFG_LIBDIR}/$pp" + fi + +- if echo "$p" | grep "^bin/" > /dev/null ++ if echo "$p" | grep "^${CFG_BINDIR_RELATIVE}/" > /dev/null + then + is_bin=true +- pp=`echo $p | sed 's/^bin\///'` ++ pp=`echo $p | sed 's;^'${CFG_BINDIR_RELATIVE}'/;;'` + FILE_INSTALL_PATH="${CFG_BINDIR}/$pp" + fi + +@@ -497,11 +502,11 @@ fi + if [ -z "${CFG_DISABLE_VERIFY}" ] + then + msg "verifying installed binaries are executable" +- "${CFG_PREFIX}/bin/rustc" --version 2> /dev/null 1> /dev/null ++ "${CFG_PREFIX}/${CFG_BINDIR_RELATIVE}/rustc" --version 2> /dev/null 1> /dev/null + if [ $? -ne 0 ] + then +- export $CFG_LD_PATH_VAR="${CFG_PREFIX}/lib:$CFG_OLD_LD_PATH_VAR" +- "${CFG_PREFIX}/bin/rustc" --version > /dev/null ++ export $CFG_LD_PATH_VAR="${CFG_PREFIX}/${CFG_LIBDIR_RELATIVE}:$CFG_OLD_LD_PATH_VAR" ++ "${CFG_PREFIX}/${CFG_BINDIR_RELATIVE}/rustc" --version > /dev/null + if [ $? -ne 0 ] + then + ERR="can't execute installed rustc binary. " +-- +2.0.4 + diff --git a/recipes/rust/files/0061-configure-silence-warning-about-LOCAL_RUST_ROOT-bein.patch b/recipes/rust/files/0061-configure-silence-warning-about-LOCAL_RUST_ROOT-bein.patch new file mode 100644 index 0000000..db3edb5 --- /dev/null +++ b/recipes/rust/files/0061-configure-silence-warning-about-LOCAL_RUST_ROOT-bein.patch @@ -0,0 +1,32 @@ +From 67cd20cddb82e4f09d8963e6398f36c200d8991a Mon Sep 17 00:00:00 2001 +From: Cody P Schafer +Date: Wed, 19 Nov 2014 19:54:24 -0500 +Subject: [PATCH 61/62] configure: silence warning about LOCAL_RUST_ROOT being + set + +We have a default value for this ('/usr/local'), so this warning is +printed ALL the time unless one does --enable-local-rust. As a result, +it doesn't really help at all. +--- + configure | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/configure b/configure +index 7914601..a5c6aa8 100755 +--- a/configure ++++ b/configure +@@ -710,11 +710,6 @@ then + fi + step_msg "using rustc at: ${CFG_LOCAL_RUST_ROOT} with version: $LRV" + putvar CFG_LOCAL_RUST_ROOT +-else +- if [ ! -z "$CFG_LOCAL_RUST_ROOT" ] +- then +- warn "Use of --local-rust-root without --enable-local-rust" +- fi + fi + + # Force freebsd to build with clang; gcc doesn't like us there +-- +2.0.4 + diff --git a/recipes/rust/files/0062-configure-allow-local-rust-root-to-be-given-a-direct.patch b/recipes/rust/files/0062-configure-allow-local-rust-root-to-be-given-a-direct.patch new file mode 100644 index 0000000..2a4f12b --- /dev/null +++ b/recipes/rust/files/0062-configure-allow-local-rust-root-to-be-given-a-direct.patch @@ -0,0 +1,45 @@ +From 158d68fff7134af6dd48e307c1562482e1446709 Mon Sep 17 00:00:00 2001 +From: Cody P Schafer +Date: Wed, 19 Nov 2014 20:01:08 -0500 +Subject: [PATCH 62/62] configure: allow local-rust-root to be given a direct + path to rustc + +--- + configure | 17 +++++++++-------- + 1 file changed, 9 insertions(+), 8 deletions(-) + +diff --git a/configure b/configure +index a5c6aa8..ec66abf 100755 +--- a/configure ++++ b/configure +@@ -690,18 +690,19 @@ fi + if [ ! -z "$CFG_ENABLE_LOCAL_RUST" ] + then + system_rustc=$(which rustc) +- if [ -f ${CFG_LOCAL_RUST_ROOT}/bin/rustc${BIN_SUF} ] +- then +- : # everything already configured +- elif [ -n "$system_rustc" ] +- then +- # we assume that rustc is in a /bin directory +- CFG_LOCAL_RUST_ROOT=${system_rustc%/bin/rustc} ++ c="${CFG_LOCAL_RUST_ROOT}/bin/rustc${BIN_SUF}" ++ if [ -f "$c" ]; then ++ CFG_LOCAL_RUST_ROOT="$c" ++ elif [ -x "${CFG_LOCAL_RUST_ROOT}" ]; then ++ # everything is already configured ++ : ++ elif [ -n "$system_rustc" ]; then ++ CFG_LOCAL_RUST_ROOT=${system_rustc} + else + err "no local rust to use" + fi + +- CMD="${CFG_LOCAL_RUST_ROOT}/bin/rustc${BIN_SUF}" ++ CMD="${CFG_LOCAL_RUST_ROOT}" + LRV=`$CMD --version` + if [ $? -ne 0 ] + then +-- +2.0.4 + diff --git a/recipes/rust/rust_0.12.0+2014-11-19.bb b/recipes/rust/rust_0.12.0+2014-11-19.bb index 255aed9..e210d9a 100644 --- a/recipes/rust/rust_0.12.0+2014-11-19.bb +++ b/recipes/rust/rust_0.12.0+2014-11-19.bb @@ -6,14 +6,17 @@ SRC_URI_append = "\ file://0007-mk-rt-compiler_rt-pass-LDFLAGS-from-CFG_GCCISH_LINK_.patch \ file://0030-Target-add-default-target.json-path-libdir-rust-targ.patch \ file://0031-mk-cfg-add-.mk-suffix-on-files-to-avoid-supprises-wh.patch \ - file://0020-Support-bindir.patch \ - file://0021-Remember-relative-libdir-and-bindir-from-build-time.patch \ - file://0022-mk-add-missing-CFG_BINDIR_RELATIVE-uses.patch \ - file://0023-mk-add-missing-CFG_LIBDIR_RELATIVE.patch \ - file://0024-configure-CFG_-DIR_RELATIVE-avoid-requiring-existenc.patch \ - file://0025-mk-add-rule-to-create-bindir.patch \ - file://0026-mk-always-use-bin-as-bindir-for-stage0-CFG_BUILD-and.patch \ - file://0027-mk-stage0-complain-instead-of-creating-an-empty-file.patch \ - file://0028-mk-target-fix-typo-so-we-depend-on-the-correct-direc.patch \ - file://0029-rustdoc-avoid-supplying-a-bad-default-sysroot-so-the.patch \ + file://0050-Support-bindir.patch \ + file://0051-Remember-relative-libdir-and-bindir-from-build-time.patch \ + file://0052-mk-add-missing-CFG_BINDIR_RELATIVE-uses.patch \ + file://0053-mk-add-missing-CFG_LIBDIR_RELATIVE.patch \ + file://0054-configure-CFG_-DIR_RELATIVE-avoid-requiring-existenc.patch \ + file://0055-mk-add-rule-to-create-bindir.patch \ + file://0056-mk-always-use-bin-as-bindir-for-stage0-CFG_BUILD-and.patch \ + file://0057-mk-stage0-complain-instead-of-creating-an-empty-file.patch \ + file://0058-mk-target-fix-typo-so-we-depend-on-the-correct-direc.patch \ + file://0059-rustdoc-avoid-supplying-a-bad-default-sysroot-so-the.patch \ + file://0060-src-etc-install.sh-use-LIBDIR-and-BINDIR-RELATIVE.patch \ + file://0061-configure-silence-warning-about-LOCAL_RUST_ROOT-bein.patch \ + file://0062-configure-allow-local-rust-root-to-be-given-a-direct.patch \ "