new cargo & rust patches
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
SRCREV_cargo = "36be0451c406b84ae1e3aefa5deb7715e7d42a43"
|
||||||
|
|
||||||
|
SRC_URI_append = "\
|
||||||
|
file://0001-dl-snapshot-be-more-forgiving-to-triples.patch \
|
||||||
|
"
|
||||||
|
|
||||||
|
require cargo.inc
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
From a8137a8bab79b7052e30b10b26ee9f67790160dd Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cody P Schafer <dev@codyps.com>
|
||||||
|
Date: Tue, 18 Nov 2014 13:07:46 -0500
|
||||||
|
Subject: [PATCH] rustc_back/target: add debug output for target search
|
||||||
|
|
||||||
|
---
|
||||||
|
src/librustc_back/target/mod.rs | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/librustc_back/target/mod.rs b/src/librustc_back/target/mod.rs
|
||||||
|
index 27ad897..682c4fe 100644
|
||||||
|
--- a/src/librustc_back/target/mod.rs
|
||||||
|
+++ b/src/librustc_back/target/mod.rs
|
||||||
|
@@ -369,9 +369,11 @@ impl Target {
|
||||||
|
let mut paths = os::split_paths(target_path.as_slice());
|
||||||
|
paths.push(sysroot.join_many([env!("CFG_LIBDIR_RELATIVE"), "rust", "targets"]));
|
||||||
|
|
||||||
|
+ debug!("RUST_TARGET_PATH={}", paths.map(|x| x.display()));
|
||||||
|
for dir in paths.iter() {
|
||||||
|
let p = dir.join(path.clone());
|
||||||
|
if p.is_file() {
|
||||||
|
+ debug!("Selected target={}", p.display());
|
||||||
|
return load_file(&p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.1.3
|
||||||
|
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
From c2981f76da9514262289662585acfcdd5925b761 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cody P Schafer <dev@codyps.com>
|
||||||
|
Date: Tue, 18 Nov 2014 13:44:13 -0500
|
||||||
|
Subject: [PATCH] mk: add missing CFG_BINDIR_RELATIVE uses
|
||||||
|
|
||||||
|
---
|
||||||
|
mk/main.mk | 2 +-
|
||||||
|
mk/perf.mk | 4 ++--
|
||||||
|
mk/prepare.mk | 4 ++--
|
||||||
|
3 files changed, 5 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/mk/main.mk b/mk/main.mk
|
||||||
|
index 36f0e58..0fb6f5f 100644
|
||||||
|
--- a/mk/main.mk
|
||||||
|
+++ b/mk/main.mk
|
||||||
|
@@ -333,7 +333,7 @@ define SREQ
|
||||||
|
|
||||||
|
# Destinations of artifacts for the host compiler
|
||||||
|
HROOT$(1)_H_$(3) = $(3)/stage$(1)
|
||||||
|
-HBIN$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/bin
|
||||||
|
+HBIN$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_BINDIR_RELATIVE)
|
||||||
|
HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_LIBDIR_RELATIVE)
|
||||||
|
|
||||||
|
# Destinations of artifacts for target architectures
|
||||||
|
diff --git a/mk/perf.mk b/mk/perf.mk
|
||||||
|
index 16cbaab..f8a354c 100644
|
||||||
|
--- a/mk/perf.mk
|
||||||
|
+++ b/mk/perf.mk
|
||||||
|
@@ -10,13 +10,13 @@
|
||||||
|
|
||||||
|
|
||||||
|
ifdef CFG_PERF_TOOL
|
||||||
|
-rustc-perf$(X): $(CFG_BUILD)/stage2/bin/rustc$(X_$(CFG_BUILD))
|
||||||
|
+rustc-perf$(X): $(CFG_BUILD)/stage2/$(CFG_BINDIR_RELATIVE)/rustc$(X_$(CFG_BUILD))
|
||||||
|
@$(call E, perf compile: $@)
|
||||||
|
$(PERF_STAGE2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) \
|
||||||
|
-o $@ $(COMPILER_CRATE) >rustc-perf.err 2>&1
|
||||||
|
$(Q)rm -f $(LIBRUSTC_GLOB)
|
||||||
|
else
|
||||||
|
-rustc-perf$(X): $(CFG_BUILD)/stage2/bin/rustc$(X_$(CFG_BUILD))
|
||||||
|
+rustc-perf$(X): $(CFG_BUILD)/stage2/$(CFG_BINDIR_RELATIVE)/rustc$(X_$(CFG_BUILD))
|
||||||
|
$(Q)touch $@
|
||||||
|
endif
|
||||||
|
|
||||||
|
diff --git a/mk/prepare.mk b/mk/prepare.mk
|
||||||
|
index 7df2489..842078f 100644
|
||||||
|
--- a/mk/prepare.mk
|
||||||
|
+++ b/mk/prepare.mk
|
||||||
|
@@ -147,10 +147,10 @@ endef
|
||||||
|
define DEF_PREPARE
|
||||||
|
|
||||||
|
prepare-base-$(1): PREPARE_SOURCE_DIR=$$(PREPARE_HOST)/stage$$(PREPARE_STAGE)
|
||||||
|
-prepare-base-$(1): PREPARE_SOURCE_BIN_DIR=$$(PREPARE_SOURCE_DIR)/bin
|
||||||
|
+prepare-base-$(1): PREPARE_SOURCE_BIN_DIR=$$(PREPARE_SOURCE_DIR)/$$(CFG_BINDIR_RELATIVE)
|
||||||
|
prepare-base-$(1): PREPARE_SOURCE_LIB_DIR=$$(PREPARE_SOURCE_DIR)/$$(CFG_LIBDIR_RELATIVE)
|
||||||
|
prepare-base-$(1): PREPARE_SOURCE_MAN_DIR=$$(S)/man
|
||||||
|
-prepare-base-$(1): PREPARE_DEST_BIN_DIR=$$(PREPARE_DEST_DIR)/bin
|
||||||
|
+prepare-base-$(1): PREPARE_DEST_BIN_DIR=$$(PREPARE_DEST_DIR)/$$(CFG_BINDIR_RELATIVE)
|
||||||
|
prepare-base-$(1): PREPARE_DEST_LIB_DIR=$$(PREPARE_DEST_DIR)/$$(CFG_LIBDIR_RELATIVE)
|
||||||
|
prepare-base-$(1): PREPARE_DEST_MAN_DIR=$$(PREPARE_DEST_DIR)/share/man/man1
|
||||||
|
prepare-base-$(1): prepare-everything-$(1)
|
||||||
|
--
|
||||||
|
2.1.3
|
||||||
|
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
From e7698f1b26120737e7807a4b3d4f4367ffd6a830 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cody P Schafer <dev@codyps.com>
|
||||||
|
Date: Tue, 18 Nov 2014 13:48:14 -0500
|
||||||
|
Subject: [PATCH] mk: add missing CFG_LIBDIR_RELATIVE
|
||||||
|
|
||||||
|
---
|
||||||
|
mk/grammar.mk | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/mk/grammar.mk b/mk/grammar.mk
|
||||||
|
index 12190fb..dcebabf 100644
|
||||||
|
--- a/mk/grammar.mk
|
||||||
|
+++ b/mk/grammar.mk
|
||||||
|
@@ -11,8 +11,8 @@
|
||||||
|
BG = $(CFG_BUILD_DIR)/grammar/
|
||||||
|
SG = $(S)src/grammar/
|
||||||
|
B = $(CFG_BUILD_DIR)/$(CFG_BUILD)/stage2/
|
||||||
|
-L = $(B)lib/rustlib/$(CFG_BUILD)/lib
|
||||||
|
-LD = $(CFG_BUILD)/stage2/lib/rustlib/$(CFG_BUILD)/lib/
|
||||||
|
+L = $(B)$(CFG_LIBDIR_RELATIVE)/rustlib/$(CFG_BUILD)/lib
|
||||||
|
+LD = $(CFG_BUILD)/stage2/$(CFG_LIBDIR_RELATIVE)/rustlib/$(CFG_BUILD)/lib/
|
||||||
|
RUSTC = $(STAGE2_T_$(CFG_BUILD)_H_$(CFG_BUILD))
|
||||||
|
|
||||||
|
# Run the reference lexer against libsyntax and compare the tokens and spans.
|
||||||
|
--
|
||||||
|
2.1.3
|
||||||
|
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
From c18e65a1b96d12e88bb9068f5ca25c335a910ab2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cody P Schafer <dev@codyps.com>
|
||||||
|
Date: Tue, 18 Nov 2014 14:02:36 -0500
|
||||||
|
Subject: [PATCH] configure: CFG_*DIR_RELATIVE: avoid requiring existence
|
||||||
|
|
||||||
|
---
|
||||||
|
configure | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/configure b/configure
|
||||||
|
index c9bec44..7914601 100755
|
||||||
|
--- a/configure
|
||||||
|
+++ b/configure
|
||||||
|
@@ -566,8 +566,8 @@ fi
|
||||||
|
|
||||||
|
# Determine libdir and bindir relative to prefix
|
||||||
|
step_msg "calculating relative paths to prefix = ${CFG_PREFIX}"
|
||||||
|
-CFG_BINDIR_RELATIVE=$(realpath --relative-to="${CFG_PREFIX}" "${CFG_BINDIR}")
|
||||||
|
-CFG_LIBDIR_RELATIVE=$(realpath --relative-to="${CFG_PREFIX}" "${CFG_LIBDIR}")
|
||||||
|
+CFG_BINDIR_RELATIVE=$(realpath -m --relative-to="${CFG_PREFIX}" "${CFG_BINDIR}")
|
||||||
|
+CFG_LIBDIR_RELATIVE=$(realpath -m --relative-to="${CFG_PREFIX}" "${CFG_LIBDIR}")
|
||||||
|
|
||||||
|
# Validate Options
|
||||||
|
step_msg "validating $CFG_SELF args"
|
||||||
|
--
|
||||||
|
2.1.3
|
||||||
|
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
From 367597c0504a8ee4758eb2ccaef760c02b483e46 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cody P Schafer <dev@codyps.com>
|
||||||
|
Date: Tue, 18 Nov 2014 14:07:37 -0500
|
||||||
|
Subject: [PATCH] mk: add rule to create bindir, unconditionalize rule to
|
||||||
|
create libdir
|
||||||
|
|
||||||
|
Without this make fails due to not finding a way to create the bindir target.
|
||||||
|
|
||||||
|
Not clear that having the libdir rule be unconditional, so supply it all the time to avoid issues in the future
|
||||||
|
---
|
||||||
|
mk/host.mk | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/mk/host.mk b/mk/host.mk
|
||||||
|
index 59a0095..9f8d5c4 100644
|
||||||
|
--- a/mk/host.mk
|
||||||
|
+++ b/mk/host.mk
|
||||||
|
@@ -59,10 +59,10 @@ endef
|
||||||
|
# $(4) - the host triple (same as $(3))
|
||||||
|
define CP_HOST_STAGE_N
|
||||||
|
|
||||||
|
-ifneq ($(CFG_LIBDIR_RELATIVE),bin)
|
||||||
|
$$(HLIB$(2)_H_$(4))/:
|
||||||
|
@mkdir -p $$@
|
||||||
|
-endif
|
||||||
|
+$$(HBIN$(2)_H_$(4))/:
|
||||||
|
+ @mkdir -p $$@
|
||||||
|
|
||||||
|
endef
|
||||||
|
|
||||||
|
--
|
||||||
|
2.1.3
|
||||||
|
|
||||||
@@ -11,4 +11,9 @@ SRC_URI_append = "\
|
|||||||
file://0008-Support-bindir.patch \
|
file://0008-Support-bindir.patch \
|
||||||
file://0009-Remember-relative-libdir-and-bindir-from-build-time.patch \
|
file://0009-Remember-relative-libdir-and-bindir-from-build-time.patch \
|
||||||
file://0010-Target-add-default-target.json-path-libdir-rust-targ.patch \
|
file://0010-Target-add-default-target.json-path-libdir-rust-targ.patch \
|
||||||
|
file://0011-rustc_back-target-add-debug-output-for-target-search.patch \
|
||||||
|
file://0012-mk-add-missing-CFG_BINDIR_RELATIVE-uses.patch \
|
||||||
|
file://0013-mk-add-missing-CFG_LIBDIR_RELATIVE.patch \
|
||||||
|
file://0014-configure-CFG_-DIR_RELATIVE-avoid-requiring-existenc.patch \
|
||||||
|
file://0015-mk-add-rule-to-create-bindir-unconditionalize-rule-t.patch \
|
||||||
"
|
"
|
||||||
|
|||||||
Reference in New Issue
Block a user