patches and version bumps

This commit is contained in:
Cody P Schafer
2014-11-19 17:20:15 -05:00
parent 437dd5d57c
commit d90a7a8e07
17 changed files with 1359 additions and 69 deletions
+7
View File
@@ -0,0 +1,7 @@
SRCREV_cargo = "baa873b09a3d54447516954161d91f794b8ec33d"
SRC_URI_append = "\
file://0001-dl-snapshot-be-more-forgiving-to-triples.patch \
"
require cargo.inc
@@ -1,4 +1,4 @@
From e097e84e4d0f1315d7b20b7c8a59b0060b1343ed Mon Sep 17 00:00:00 2001
From 5998606dc38d69b1ccf870242b2549dc76b6d418 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Sun, 16 Nov 2014 21:35:19 -0500
Subject: [PATCH] dl-snapshot: be more forgiving to triples
@@ -8,10 +8,10 @@ Subject: [PATCH] dl-snapshot: be more forgiving to triples
1 file changed, 37 insertions(+), 13 deletions(-)
diff --git a/src/etc/dl-snapshot.py b/src/etc/dl-snapshot.py
index 64329ac..31ada37 100644
index 096b02e..cfbfc83 100644
--- a/src/etc/dl-snapshot.py
+++ b/src/etc/dl-snapshot.py
@@ -18,20 +18,44 @@ win32 = lines[5]
@@ -25,20 +25,44 @@ win32 = lines[5]
win64 = lines[6]
triple = sys.argv[1]
@@ -67,8 +67,8 @@ index 64329ac..31ada37 100644
+
+triple = new_triple
platform, hash = me.strip().split(' ')
platform, hash = me.strip().split()
--
2.0.4
2.1.3
+3 -3
View File
@@ -1,7 +1,7 @@
From e9a22fbdb8e938bd10a7af6972386dfb29f359f0 Mon Sep 17 00:00:00 2001
From 7059bccadb5cdf560f1c060ed3f785fe935ad68d Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 17 Nov 2014 19:44:58 -0500
Subject: [PATCH 20/28] Support --bindir
Subject: [PATCH 20/29] Support --bindir
---
configure | 4 ++++
@@ -121,5 +121,5 @@ index 4f43b1e..add1c26 100644
install -m755 "${CFG_SRC_DIR}/$p" "${FILE_INSTALL_PATH}"
else
--
2.0.4
2.1.3
@@ -1,7 +1,7 @@
From a8bb6cf82242c69b20390c7ae32d865341b286a7 Mon Sep 17 00:00:00 2001
From 21379cee1db605007e5eb2b28b1d55ac24c04a5b Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 17 Nov 2014 20:10:42 -0500
Subject: [PATCH 21/28] Remember relative libdir and bindir from build time
Subject: [PATCH 21/29] Remember relative libdir and bindir from build time
---
configure | 6 +++
@@ -11,7 +11,7 @@ Subject: [PATCH 21/28] Remember relative libdir and bindir from build time
4 files changed, 37 insertions(+), 47 deletions(-)
diff --git a/configure b/configure
index bdfeedd..7914601 100755
index bdfeedd..c9bec44 100755
--- a/configure
+++ b/configure
@@ -340,6 +340,7 @@ need_cmd date
@@ -28,8 +28,8 @@ index bdfeedd..7914601 100755
+# 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}")
+CFG_BINDIR_RELATIVE=$(realpath --relative-to="${CFG_PREFIX}" "${CFG_BINDIR}")
+CFG_LIBDIR_RELATIVE=$(realpath --relative-to="${CFG_PREFIX}" "${CFG_LIBDIR}")
+
# Validate Options
step_msg "validating $CFG_SELF args"
@@ -174,7 +174,7 @@ index fee289d..b626308 100644
// The name of rustc's own place to organize libraries.
diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs
index d5d488e..cddf970 100644
index d27a338..2e1138e 100644
--- a/src/librustc_trans/back/link.rs
+++ b/src/librustc_trans/back/link.rs
@@ -1015,11 +1015,10 @@ fn link_args(cmd: &mut Command,
@@ -191,5 +191,5 @@ index d5d488e..cddf970 100644
path.push(&tlib);
--
2.0.4
2.1.3
@@ -1,7 +1,7 @@
From 846a56728ba8b7ba64b12c2969bd133a384fc474 Mon Sep 17 00:00:00 2001
From 44d01c0ca3e2d1f6d6432ce6cef5a6430aade4f2 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 22/28] mk: add missing CFG_BINDIR_RELATIVE uses
Subject: [PATCH 22/29] 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.0.4
2.1.3
@@ -1,7 +1,7 @@
From 0612ce2204bc9376a7fc187700b04c4e3f42e875 Mon Sep 17 00:00:00 2001
From 6c66b1d90457ef8cf6b6ef73301c5f74f1e41d7d 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 23/28] mk: add missing CFG_LIBDIR_RELATIVE
Subject: [PATCH 23/29] 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.0.4
2.1.3
@@ -0,0 +1,27 @@
From 9c4d2a42ecae5908e4864352422d5e28457307b3 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 24/29] 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
@@ -1,7 +1,7 @@
From 0cd38a8844e7511f5db4ab14ec6fa80a2f9a63ec Mon Sep 17 00:00:00 2001
From 58a621bdfafd3dfb7aa5e9dc7e9df177fe8977eb 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 24/28] mk: add rule to create bindir
Subject: [PATCH 25/29] 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.0.4
2.1.3
@@ -1,36 +0,0 @@
From 1e2044eb7a251d850ac01793a6e3d1ccd6171c9d Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Tue, 18 Nov 2014 14:52:56 -0500
Subject: [PATCH 25/28] mk: always use bin and lib as bindir and libdir for
stage0 CFG_BUILD
---
mk/main.mk | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/mk/main.mk b/mk/main.mk
index 0fb6f5f..676ea21 100644
--- a/mk/main.mk
+++ b/mk/main.mk
@@ -333,8 +333,18 @@ define SREQ
# Destinations of artifacts for the host compiler
HROOT$(1)_H_$(3) = $(3)/stage$(1)
+
+ifeq ($(1)-$(3),0-$$(CFG_BUILD))
+# stage0 relative paths are fixed. This is done because we don't have control
+# over where the bootstrap (snapshot or local) rustc looks to locate it's
+# libdir. At the moment, this assumes the relative paths (from sysroot aka
+# prefix) are 'lib' and 'bin'.
+HBIN$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/bin
+HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/lib
+else
HBIN$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_BINDIR_RELATIVE)
HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_LIBDIR_RELATIVE)
+endif
# Destinations of artifacts for target architectures
TROOT$(1)_T_$(2)_H_$(3) = $$(HLIB$(1)_H_$(3))/rustlib/$(2)
--
2.0.4
@@ -0,0 +1,70 @@
From 1cac153be4b71e97ec61c894c3681e803a17f985 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Tue, 18 Nov 2014 14:52:56 -0500
Subject: [PATCH 26/29] 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
need to pass it the location explicitly.
bin is always used as the bindir because that is where it is extracted
to by the downloader (could be changed in the future if we're inclined)
---
mk/main.mk | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/mk/main.mk b/mk/main.mk
index 0fb6f5f..2e6c6c8 100644
--- a/mk/main.mk
+++ b/mk/main.mk
@@ -333,7 +333,15 @@ define SREQ
# Destinations of artifacts for the host compiler
HROOT$(1)_H_$(3) = $(3)/stage$(1)
+
+ifeq ($(1)-$(3),0-$$(CFG_BUILD))
+# stage0 relative paths are fixed so we can bootstrap from snapshots
+# (downloaded snapshots drop their rustc in HROOT/bin)
+# libdir discrepancy is worked around with RUSTFLAGS below.
+HBIN$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/bin
+else
HBIN$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_BINDIR_RELATIVE)
+endif
HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_LIBDIR_RELATIVE)
# Destinations of artifacts for target architectures
@@ -341,6 +349,15 @@ TROOT$(1)_T_$(2)_H_$(3) = $$(HLIB$(1)_H_$(3))/rustlib/$(2)
TBIN$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/bin
TLIB$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/lib
+# Don't trust stage0, be explicit about libraries
+# TODO: rather than specifying sysroot, we really want to tell which libdir to
+# use (ie: the dir containing 'rustlib'). This would allow us to avoid
+# passing the '-L' options.
+ifeq ($(1),0)
+RUSTFLAGS_S_$(1)_T_$(2)_H_$(3) += --sysroot "$$(HROOT$(1)_H_$(3))" \
+ -L "$$(TLIB$(1)_T_$(2)_H_$(3))"
+endif
+
# Preqrequisites for using the stageN compiler
ifeq ($(1),0)
HSREQ$(1)_H_$(3) = $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3))
@@ -450,6 +467,7 @@ STAGE$(1)_T_$(2)_H_$(3) := \
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
--cfg $$(CFGFLAG$(1)_T_$(2)_H_$(3)) \
$$(CFG_RUSTC_FLAGS) $$(EXTRAFLAGS_STAGE$(1)) --target=$(2)) \
+ $$(RUSTFLAGS_S_$(1)_T_$(2)_H_$(3)) \
$$(RUSTC_FLAGS_$(2))
PERF_STAGE$(1)_T_$(2)_H_$(3) := \
@@ -458,6 +476,7 @@ PERF_STAGE$(1)_T_$(2)_H_$(3) := \
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
--cfg $$(CFGFLAG$(1)_T_$(2)_H_$(3)) \
$$(CFG_RUSTC_FLAGS) $$(EXTRAFLAGS_STAGE$(1)) --target=$(2)) \
+ $$(RUSTFLAGS_S_$(1)_T_$(2)_H_$(3)) \
$$(RUSTC_FLAGS_$(2))
endef
--
2.1.3
@@ -1,7 +1,7 @@
From 09fdc1a963093e3b1b3eecb98393dc8a0e933020 Mon Sep 17 00:00:00 2001
From 70cbf9f2285349700fd1fce8b3e4d2ca25ca53c7 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Tue, 18 Nov 2014 14:53:39 -0500
Subject: [PATCH 26/28] mk/stage0: complain instead of creating an empty file
Subject: [PATCH 27/29] 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.0.4
2.1.3
@@ -1,7 +1,7 @@
From 8a273a8bb1a2f6f5499b6e79a0894581a1284183 Mon Sep 17 00:00:00 2001
From 3cee7291722137195a9cc6f6556609ecac75fb8a Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Tue, 18 Nov 2014 16:32:03 -0500
Subject: [PATCH 27/28] mk/target: fix typo so we depend on the correct
Subject: [PATCH 28/29] 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.0.4
2.1.3
@@ -1,7 +1,7 @@
From 370101c62c740c4ef86453277b9cd39561095c54 Mon Sep 17 00:00:00 2001
From c70d53d795de0d361cdb2220fc348993336be850 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Tue, 18 Nov 2014 18:56:12 -0500
Subject: [PATCH 28/28] rustdoc: avoid supplying a bad default sysroot so the
Subject: [PATCH 29/29] 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.0.4
2.1.3
@@ -0,0 +1,47 @@
From 77db00da6b4c11214461ee17288ac3b12c4cc950 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Wed, 19 Nov 2014 13:58:57 -0500
Subject: [PATCH] mk: instead of lieing about stage0 libdir, pass flags to the
compiler to force the right libdirs
---
mk/main.mk | 14 ++++++++++++--
mk/target.mk | 1 +
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/mk/main.mk b/mk/main.mk
index 676ea21..3e070c2 100644
--- a/mk/main.mk
+++ b/mk/main.mk
@@ -340,17 +340,26 @@ ifeq ($(1)-$(3),0-$$(CFG_BUILD))
# libdir. At the moment, this assumes the relative paths (from sysroot aka
# prefix) are 'lib' and 'bin'.
HBIN$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/bin
-HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/lib
else
HBIN$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_BINDIR_RELATIVE)
-HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_LIBDIR_RELATIVE)
endif
+HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_LIBDIR_RELATIVE)
+
# Destinations of artifacts for target architectures
TROOT$(1)_T_$(2)_H_$(3) = $$(HLIB$(1)_H_$(3))/rustlib/$(2)
TBIN$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/bin
TLIB$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/lib
+# Don't trust stage0, be explicit about libraries
+# TODO: rather than specifying sysroot, we really want to tell which libdir to
+# use (ie: the dir containing 'rustlib'). This would allow us to avoid
+# passing the '-L' options.
+ifeq ($(1), 0)
+RUSTFLAGS_S_$(1)_T_$(2)_H_$(3) += --sysroot "$$(HROOT$(1)_H_$(3))" \
+ -L "$$(TLIB$(1)_T_$(2)_H_$(3)"
+endif
+
# Preqrequisites for using the stageN compiler
ifeq ($(1),0)
HSREQ$(1)_H_$(3) = $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3))
--
2.1.3
+1
View File
@@ -15,4 +15,5 @@ SRC_URI_append = "\
file://0028-rustdoc-avoid-supplying-a-bad-default-sysroot-so-the.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://0033-mk-instead-of-lieing-about-stage0-libdir-pass-flags-.patch \
"
+20
View File
@@ -0,0 +1,20 @@
SRCREV = "bfaa7bcab3459907014c31d3bf980f65ccd14b08"
require rust-git.inc
SRC_URI_append = "\
file://0001-platform.mk-avoid-choking-on-i586.patch \
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 \
"