rust: new version

This commit is contained in:
Cody P Schafer
2014-12-30 13:39:34 -05:00
parent 8662c92b99
commit 0acbffda6e
13 changed files with 89 additions and 224 deletions
@@ -1,4 +1,4 @@
From f44cc2a67ad292043da06759d3e0c31fa8645e31 Mon Sep 17 00:00:00 2001
From b850685d1411a03164401db202b9e85ac42d3b26 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Wed, 26 Nov 2014 10:00:32 -0500
Subject: [PATCH 01/10] libstd/io/process/Command: fully quote and escape the
@@ -15,10 +15,10 @@ shell.
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/src/libstd/io/process.rs b/src/libstd/io/process.rs
index d4d24c1..90e5567 100644
index 93aa627..3319408 100644
--- a/src/libstd/io/process.rs
+++ b/src/libstd/io/process.rs
@@ -383,14 +383,38 @@ impl Command {
@@ -384,14 +384,38 @@ impl Command {
}
}
@@ -60,5 +60,5 @@ index d4d24c1..90e5567 100644
Ok(())
}
--
2.1.3
2.2.1
@@ -1,4 +1,4 @@
From 26e8dcbdca19b167f69611322e761a315e869580 Mon Sep 17 00:00:00 2001
From 5ec27dbc4ad64d837e15ff30c4489e8bdd045ed9 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 1 Dec 2014 15:50:13 -0500
Subject: [PATCH 02/10] std/io/process: add Show tests
@@ -8,7 +8,7 @@ Subject: [PATCH 02/10] std/io/process: add Show tests
1 file changed, 12 insertions(+)
diff --git a/src/libstd/io/process.rs b/src/libstd/io/process.rs
index 90e5567..67476f0 100644
index 3319408..3f8c7ff 100644
--- a/src/libstd/io/process.rs
+++ b/src/libstd/io/process.rs
@@ -1237,4 +1237,16 @@ mod tests {
@@ -29,5 +29,5 @@ index 90e5567..67476f0 100644
+ }
}
--
2.1.3
2.2.1
@@ -1,4 +1,4 @@
From fdff8ab61314dcb89c4868f9508714ca3bb35999 Mon Sep 17 00:00:00 2001
From a3192892b91d1df606f4b237b1cc08118d66658c Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Sat, 15 Nov 2014 20:12:48 -0500
Subject: [PATCH 03/10] platform.mk: avoid choking on i586
@@ -23,5 +23,5 @@ index 7ca2473..cc69851 100644
$(foreach t,$(CFG_TARGET),$(eval $(call DEF_HOST_VAR,$(t))))
$(foreach t,$(CFG_TARGET),$(info cfg: host for $(t) is $(HOST_$(t))))
--
2.1.3
2.2.1
@@ -1,4 +1,4 @@
From 1f6acefac88b2a175472415295bf75d51b36cfb8 Mon Sep 17 00:00:00 2001
From 269155039002d97223d0053f6436c47da07c3d4e Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 17 Nov 2014 16:14:15 -0500
Subject: [PATCH 04/10] mk/rt/compiler_rt: pass LDFLAGS from
@@ -9,10 +9,10 @@ Subject: [PATCH 04/10] mk/rt/compiler_rt: pass LDFLAGS from
1 file changed, 1 insertion(+)
diff --git a/mk/rt.mk b/mk/rt.mk
index 38aec83..fefb7da 100644
index 6a7be26..65b6ae1 100644
--- a/mk/rt.mk
+++ b/mk/rt.mk
@@ -231,6 +231,7 @@ $$(COMPRT_LIB_$(1)): $$(COMPRT_DEPS) $$(MKFILE_DEPS)
@@ -230,6 +230,7 @@ $$(COMPRT_LIB_$(1)): $$(COMPRT_DEPS) $$(MKFILE_DEPS)
AR="$$(AR_$(1))" \
RANLIB="$$(AR_$(1)) s" \
CFLAGS="$$(CFG_GCCISH_CFLAGS_$(1))" \
@@ -21,5 +21,5 @@ index 38aec83..fefb7da 100644
triple-builtins
$$(Q)cp $$(COMPRT_BUILD_DIR_$(1))/triple/builtins/libcompiler_rt.a $$(COMPRT_LIB_$(1))
--
2.1.3
2.2.1
@@ -1,4 +1,4 @@
From e6faded5eb13349f4d7aba02d39f3fef0d8b1ef6 Mon Sep 17 00:00:00 2001
From 9220aae4ace6ade2c22c42a4d141d6938512242a Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Tue, 18 Nov 2014 01:40:21 -0500
Subject: [PATCH 05/10] Target: add default target.json path:
@@ -11,25 +11,25 @@ Subject: [PATCH 05/10] Target: add default target.json path:
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
index 33de2c9..bc90f90 100644
index 5f3fbf8..99ffb6e 100644
--- a/src/librustc/session/config.rs
+++ b/src/librustc/session/config.rs
@@ -546,8 +546,8 @@ pub fn build_configuration(sess: &Session) -> ast::CrateConfig {
@@ -635,8 +635,8 @@ pub fn build_configuration(sess: &Session) -> ast::CrateConfig {
v
}
-pub fn build_target_config(opts: &Options, sp: &SpanHandler) -> Config {
- let target = match Target::search(opts.target_triple.as_slice()) {
- let target = match Target::search(opts.target_triple[]) {
+pub fn build_target_config(sysroot: &Path, opts: &Options, sp: &SpanHandler) -> Config {
+ let target = match Target::search(sysroot, opts.target_triple.as_slice()) {
+ let target = match Target::search(sysroot, opts.target_triple[]) {
Ok(t) => t,
Err(e) => {
sp.handler().fatal((format!("Error loading target specification: {}", e)).as_slice());
sp.handler().fatal((format!("Error loading target specification: {}", e))[]);
diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs
index 047e598..25151be 100644
index 35c325b..402effb 100644
--- a/src/librustc/session/mod.rs
+++ b/src/librustc/session/mod.rs
@@ -239,7 +239,11 @@ pub fn build_session_(sopts: config::Options,
@@ -242,7 +242,11 @@ pub fn build_session_(sopts: config::Options,
local_crate_source_file: Option<Path>,
span_diagnostic: diagnostic::SpanHandler)
-> Session {
@@ -43,7 +43,7 @@ index 047e598..25151be 100644
let default_sysroot = match sopts.maybe_sysroot {
Some(_) => None,
diff --git a/src/librustc_back/target/mod.rs b/src/librustc_back/target/mod.rs
index 68a80ed..f94a802 100644
index 99a25be..612f456 100644
--- a/src/librustc_back/target/mod.rs
+++ b/src/librustc_back/target/mod.rs
@@ -291,7 +291,7 @@ impl Target {
@@ -55,17 +55,17 @@ index 68a80ed..f94a802 100644
use std::os;
use std::io::File;
use std::path::Path;
@@ -366,8 +366,8 @@ impl Target {
@@ -365,8 +365,8 @@ impl Target {
let target_path = os::getenv("RUST_TARGET_PATH").unwrap_or(String::new());
- let paths = os::split_paths(target_path.as_slice());
- let paths = os::split_paths(target_path[]);
- // FIXME 16351: add a sane default search path?
+ let mut paths = os::split_paths(target_path.as_slice());
+ let mut paths = os::split_paths(target_path[]);
+ paths.push(sysroot.join_many(&[env!("CFG_LIBDIR_RELATIVE"), "rust", "targets"]));
for dir in paths.iter() {
let p = dir.join(path.clone());
--
2.1.3
2.2.1
@@ -1,4 +1,4 @@
From acf5bafb0c2c2fcb35932c94a7faf2f62aa0eb3f Mon Sep 17 00:00:00 2001
From b127eaf1de5c38a98aadc3fe9fcac952c850504e 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 06/10] mk: for stage0, use RUSTFLAGS to override target libs
@@ -64,5 +64,5 @@ index 4aed1ce..867d919 100644
endef
--
2.1.3
2.2.1
@@ -1,4 +1,4 @@
From fda66b4ff221ef687878fa32792d5e1718882402 Mon Sep 17 00:00:00 2001
From 544d3997edacfd414664c14cc628d573023af28e 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 07/10] mk: add missing CFG_LIBDIR_RELATIVE
@@ -23,5 +23,5 @@ index a9f4590..d254941 100644
# Run the reference lexer against libsyntax and compare the tokens and spans.
--
2.1.3
2.2.1
@@ -1,4 +1,4 @@
From 592d635387c99882fe0a8204b4efa6177e3473c3 Mon Sep 17 00:00:00 2001
From 9dc70d95f890865b8f3f87edba9a9441b8ad3755 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 24 Nov 2014 13:10:15 -0500
Subject: [PATCH 08/10] configure: support --bindir, and extend libdir to
@@ -15,17 +15,15 @@ windows platforms
---
configure | 51 +++++++++++++++++-------
mk/host.mk | 6 ++-
mk/install.mk | 4 +-
mk/main.mk | 11 ++++++
mk/perf.mk | 4 +-
mk/prepare.mk | 4 +-
src/etc/install.sh | 54 ++++++++++++++++++++++---
src/librustc/metadata/filesearch.rs | 78 ++++++++++++++-----------------------
src/librustc_trans/back/link.rs | 3 +-
9 files changed, 137 insertions(+), 78 deletions(-)
7 files changed, 87 insertions(+), 70 deletions(-)
diff --git a/configure b/configure
index 70d6ba3..c79a218 100755
index f14009b..8659809 100755
--- a/configure
+++ b/configure
@@ -309,6 +309,31 @@ envopt() {
@@ -103,7 +101,7 @@ index 70d6ba3..c79a218 100755
# Validate Options
step_msg "validating $CFG_SELF args"
validate_opt
@@ -1332,6 +1354,7 @@ putvar CFG_PREFIX
@@ -1331,6 +1353,7 @@ putvar CFG_PREFIX
putvar CFG_HOST
putvar CFG_TARGET
putvar CFG_LIBDIR_RELATIVE
@@ -130,28 +128,6 @@ index 59a0095..b8e8345 100644
endif
endef
diff --git a/mk/install.mk b/mk/install.mk
index 88b451f..0fba6ee 100644
--- a/mk/install.mk
+++ b/mk/install.mk
@@ -21,7 +21,7 @@ ifeq (root user, $(USER) $(patsubst %,user,$(SUDO_USER)))
else
$(Q)$(MAKE) prepare_install
endif
- $(Q)cd tmp/empty_dir && sh ../../tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)" "$(MAYBE_DISABLE_VERIFY)"
+ $(Q)cd tmp/empty_dir && sh ../../tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)" --bindir="$(DESTDIR)$(CFG_BINDIR)" "$(MAYBE_DISABLE_VERIFY)"
# Remove tmp files because it's a decent amount of disk space
$(Q)rm -R tmp/dist
@@ -34,7 +34,7 @@ ifeq (root user, $(USER) $(patsubst %,user,$(SUDO_USER)))
else
$(Q)$(MAKE) prepare_uninstall
endif
- $(Q)cd tmp/empty_dir && sh ../../tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --uninstall --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)"
+ $(Q)cd tmp/empty_dir && sh ../../tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --uninstall --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)" --bindir="$(DESTDIR)$(CFG_BINDIR)"
# Remove tmp files because it's a decent amount of disk space
$(Q)rm -R tmp/dist
diff --git a/mk/main.mk b/mk/main.mk
index 867d919..cfbc1b0 100644
--- a/mk/main.mk
@@ -220,134 +196,11 @@ index d404d3d..afc6d81 100644
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)
diff --git a/src/etc/install.sh b/src/etc/install.sh
index 8bc48fc..05dd983 100644
--- a/src/etc/install.sh
+++ b/src/etc/install.sh
@@ -205,6 +205,32 @@ absolutify() {
ABSOLUTIFIED="${FILE_PATH}"
}
+abspath () {
+ case "$1" in
+ /*) echo "$1" ;;
+ *) echo "$PWD/$1" ;;
+ esac
+}
+
+relpath () {
+ local src=$(abspath "$1")
+ local dst=$(abspath "$2")
+ local common=$src
+ local result=
+
+ # Start by checking if the whole src is common, then strip off pack
+ # components until we find the common element.
+ while [ "${dst#"$common"}" = "$dst" ]; do
+ common=$(dirname "$common")
+ result="../$result"
+ done
+
+ local down="${dst#"$common"}"
+ result="${result}${down#/}"
+ echo "$result"
+}
+
+
msg "looking for install programs"
need_cmd mkdir
need_cmd printf
@@ -285,6 +311,8 @@ then
CFG_LIBDIR_RELATIVE=bin
fi
+CFG_BINDIR_RELATIVE=bin
+
if [ "$CFG_OSTYPE" = "pc-mingw32" ] || [ "$CFG_OSTYPE" = "w64-mingw32" ]
then
CFG_LD_PATH_VAR=PATH
@@ -311,6 +339,7 @@ case "$CFG_LIBDIR" in
esac
CFG_LIBDIR_RELATIVE=`echo ${CFG_LIBDIR} | cut -c$((${#CFG_PREFIX}+${CAT_INC}))-`
+valopt bindir "${CFG_PREFIX}/${CFG_BINDIR_RELATIVE}" "install binaries"
valopt mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
if [ $HELP -eq 1 ]
@@ -319,6 +348,11 @@ then
exit 0
fi
+# Determine libdir and bindir relative to prefix
+step_msg "calculating relative paths to prefix = ${CFG_PREFIX}"
+CFG_BINDIR_RELATIVE=$(relpath "${CFG_PREFIX}" "${CFG_BINDIR}")
+CFG_LIBDIR_RELATIVE=$(relpath "${CFG_PREFIX}" "${CFG_LIBDIR}")
+
step_msg "validating $CFG_SELF args"
validate_opt
@@ -332,8 +366,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"
@@ -431,6 +465,7 @@ need_ok "failed to create installed manifest"
# Now install, iterate through the new manifest and copy files
while read p; do
+ is_bin=false
# Decide the destination of the file
FILE_INSTALL_PATH="${CFG_PREFIX}/$p"
@@ -441,6 +476,13 @@ while read p; do
FILE_INSTALL_PATH="${CFG_LIBDIR}/$pp"
fi
+ if echo "$p" | grep "^${CFG_BINDIR_RELATIVE}/" > /dev/null
+ then
+ is_bin=true
+ pp=`echo $p | sed 's;^'${CFG_BINDIR_RELATIVE}'/;;'`
+ FILE_INSTALL_PATH="${CFG_BINDIR}/$pp"
+ fi
+
if echo "$p" | grep "^share/man/" > /dev/null
then
pp=`echo $p | sed 's/^share\/man\///'`
@@ -458,7 +500,7 @@ while read p; do
# Install the file
msg "${FILE_INSTALL_PATH}"
- if echo "$p" | grep "^bin/" > /dev/null
+ if $is_bin
then
install -m755 "${CFG_SRC_DIR}/$p" "${FILE_INSTALL_PATH}"
else
@@ -493,11 +535,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. "
diff --git a/src/librustc/metadata/filesearch.rs b/src/librustc/metadata/filesearch.rs
index 89f3343..b626308 100644
index 0b859ab..f92fca6 100644
--- a/src/librustc/metadata/filesearch.rs
+++ b/src/librustc/metadata/filesearch.rs
@@ -66,8 +66,7 @@ impl<'a> FileSearch<'a> {
@@ -72,8 +72,7 @@ impl<'a> FileSearch<'a> {
if !found {
let rustpath = rust_path();
for path in rustpath.iter() {
@@ -357,7 +210,7 @@ index 89f3343..b626308 100644
debug!("is {} in visited_dirs? {}", tlib_path.display(),
visited_dirs.contains(&tlib_path.as_vec().to_vec()));
@@ -149,7 +148,7 @@ impl<'a> FileSearch<'a> {
@@ -155,7 +154,7 @@ impl<'a> FileSearch<'a> {
// Returns a list of directories where target-specific tool binaries are located.
pub fn get_tools_search_paths(&self) -> Vec<Path> {
let mut p = Path::new(self.sysroot);
@@ -366,7 +219,7 @@ index 89f3343..b626308 100644
p.push(rustlibdir());
p.push(self.triple);
p.push("bin");
@@ -157,8 +156,8 @@ impl<'a> FileSearch<'a> {
@@ -163,8 +162,8 @@ impl<'a> FileSearch<'a> {
}
}
@@ -377,7 +230,7 @@ index 89f3343..b626308 100644
assert!(p.is_relative());
p.push(rustlibdir());
p.push(target_triple);
@@ -168,17 +167,24 @@ pub fn relative_target_lib_path(sysroot: &Path, target_triple: &str) -> Path {
@@ -174,17 +173,24 @@ pub fn relative_target_lib_path(sysroot: &Path, target_triple: &str) -> Path {
fn make_target_lib_path(sysroot: &Path,
target_triple: &str) -> Path {
@@ -406,7 +259,7 @@ index 89f3343..b626308 100644
pub fn get_or_default_sysroot() -> Path {
// Follow symlinks. If the resolved path is relative, make it absolute.
fn canonicalize(path: Option<Path>) -> Option<Path> {
@@ -190,7 +196,17 @@ pub fn get_or_default_sysroot() -> Path {
@@ -196,7 +202,17 @@ pub fn get_or_default_sysroot() -> Path {
}
match canonicalize(os::self_exe_name()) {
@@ -425,7 +278,7 @@ index 89f3343..b626308 100644
None => panic!("can't determine value for sysroot")
}
}
@@ -248,45 +264,9 @@ pub fn rust_path() -> Vec<Path> {
@@ -254,45 +270,9 @@ pub fn rust_path() -> Vec<Path> {
env_rust_path
}
@@ -475,16 +328,16 @@ index 89f3343..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 d8cdffe..76c2bd8 100644
index ec61d3a..7928699 100644
--- a/src/librustc_trans/back/link.rs
+++ b/src/librustc_trans/back/link.rs
@@ -1002,11 +1002,10 @@ fn link_args(cmd: &mut Command,
@@ -1000,11 +1000,10 @@ fn link_args(cmd: &mut Command,
// where extern libraries might live, based on the
// addl_lib_search_paths
if sess.opts.cg.rpath {
- let sysroot = sess.sysroot();
let target_triple = sess.opts.target_triple.as_slice();
let get_install_prefix_lib_path = || {
let target_triple = sess.opts.target_triple[];
let get_install_prefix_lib_path = |:| {
let install_prefix = option_env!("CFG_PREFIX").expect("CFG_PREFIX");
- let tlib = filesearch::relative_target_lib_path(sysroot, target_triple);
+ let tlib = filesearch::relative_target_lib_path(target_triple);
@@ -492,5 +345,5 @@ index d8cdffe..76c2bd8 100644
path.push(&tlib);
--
2.1.3
2.2.1
@@ -1,4 +1,4 @@
From 58f69e6978ed1975c27c3b0450c75be40b737688 Mon Sep 17 00:00:00 2001
From 1bfe46dd62c1a72b20be921eba8fcd57c56974ef Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 24 Nov 2014 13:54:42 -0500
Subject: [PATCH 09/10] Parallelize submake invocations
@@ -25,7 +25,7 @@ index aadc55b..f671745 100644
clean-llvm$(1): ;
diff --git a/mk/install.mk b/mk/install.mk
index 0fba6ee..72b799c 100644
index 632df3c..954d494 100644
--- a/mk/install.mk
+++ b/mk/install.mk
@@ -17,9 +17,9 @@ endif
@@ -38,9 +38,9 @@ index 0fba6ee..72b799c 100644
- $(Q)$(MAKE) prepare_install
+ $(Q)$(P)$(MAKE) prepare_install
endif
$(Q)cd tmp/empty_dir && sh ../../tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)" --bindir="$(DESTDIR)$(CFG_BINDIR)" "$(MAYBE_DISABLE_VERIFY)"
$(Q)cd tmp/empty_dir && sh ../../tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)" "$(MAYBE_DISABLE_VERIFY)"
# Remove tmp files because it's a decent amount of disk space
@@ -30,9 +30,9 @@ prepare_install: dist-install-dir-$(CFG_BUILD) | tmp/empty_dir
@@ -30,9 +30,9 @@ prepare_install: dist/$(PKG_NAME)-$(CFG_BUILD).tar.gz | tmp/empty_dir
uninstall:
ifeq (root user, $(USER) $(patsubst %,user,$(SUDO_USER)))
# Build the dist as the original user
@@ -50,7 +50,7 @@ index 0fba6ee..72b799c 100644
- $(Q)$(MAKE) prepare_uninstall
+ $(Q)$(P)$(MAKE) prepare_uninstall
endif
$(Q)cd tmp/empty_dir && sh ../../tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --uninstall --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)" --bindir="$(DESTDIR)$(CFG_BINDIR)"
$(Q)cd tmp/empty_dir && sh ../../tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --uninstall --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)"
# Remove tmp files because it's a decent amount of disk space
diff --git a/mk/llvm.mk b/mk/llvm.mk
index ba2e073..3998806 100644
@@ -75,19 +75,19 @@ index ba2e073..3998806 100644
touch $$@
diff --git a/mk/rt.mk b/mk/rt.mk
index fefb7da..43c4b25 100644
index 65b6ae1..a064ee1 100644
--- a/mk/rt.mk
+++ b/mk/rt.mk
@@ -182,7 +182,7 @@ $$(JEMALLOC_LOCAL_$(1)): $$(JEMALLOC_DEPS) $$(MKFILE_DEPS)
@@ -181,7 +181,7 @@ $$(JEMALLOC_LOCAL_$(1)): $$(JEMALLOC_DEPS) $$(MKFILE_DEPS)
RANLIB="$$(AR_$(1)) s" \
CPPFLAGS="-I $(S)src/rt/" \
EXTRA_CFLAGS="-g1"
EXTRA_CFLAGS="-g1 -ffunction-sections -fdata-sections"
- $$(Q)$$(MAKE) -C "$$(JEMALLOC_BUILD_DIR_$(1))" build_lib_static
+ $$(Q)$$(P)$$(MAKE) -C "$$(JEMALLOC_BUILD_DIR_$(1))" build_lib_static
ifeq ($$(CFG_DISABLE_JEMALLOC),)
RUSTFLAGS_alloc := --cfg jemalloc
@@ -224,7 +224,7 @@ COMPRT_BUILD_DIR_$(1) := $$(RT_OUTPUT_DIR_$(1))/compiler-rt
@@ -223,7 +223,7 @@ COMPRT_BUILD_DIR_$(1) := $$(RT_OUTPUT_DIR_$(1))/compiler-rt
$$(COMPRT_LIB_$(1)): $$(COMPRT_DEPS) $$(MKFILE_DEPS)
@$$(call E, make: compiler-rt)
@@ -96,7 +96,7 @@ index fefb7da..43c4b25 100644
ProjSrcRoot="$(S)src/compiler-rt" \
ProjObjRoot="$$(abspath $$(COMPRT_BUILD_DIR_$(1)))" \
CC="$$(CC_$(1))" \
@@ -302,7 +302,7 @@ $$(BACKTRACE_BUILD_DIR_$(1))/Makefile: $$(BACKTRACE_DEPS) $$(MKFILE_DEPS)
@@ -301,7 +301,7 @@ $$(BACKTRACE_BUILD_DIR_$(1))/Makefile: $$(BACKTRACE_DEPS) $$(MKFILE_DEPS)
$$(BACKTRACE_LIB_$(1)): $$(BACKTRACE_BUILD_DIR_$(1))/Makefile $$(MKFILE_DEPS)
@$$(call E, make: libbacktrace)
@@ -118,5 +118,5 @@ index 3bbc8f4..4300b02 100644
S := $(CFG_SRC_DIR)
--
2.1.3
2.2.1
@@ -1,4 +1,4 @@
From 7de72f3bde37bf724704d541407aaf794909fd4d Mon Sep 17 00:00:00 2001
From 30483be2c93f9ebd8f1322c2fd4ff4c765e10f59 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Wed, 3 Dec 2014 19:15:19 -0500
Subject: [PATCH 10/10] std/thread_local: workaround for NULL __dso_handle
@@ -8,10 +8,10 @@ Subject: [PATCH 10/10] std/thread_local: workaround for NULL __dso_handle
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libstd/thread_local/mod.rs b/src/libstd/thread_local/mod.rs
index e2e8461..2bf891e 100644
index 242dceb..45ce980 100644
--- a/src/libstd/thread_local/mod.rs
+++ b/src/libstd/thread_local/mod.rs
@@ -308,7 +308,7 @@ mod imp {
@@ -323,7 +323,7 @@ mod imp {
#[linkage = "extern_weak"]
static __cxa_thread_atexit_impl: *const ();
}
@@ -21,5 +21,5 @@ index e2e8461..2bf891e 100644
arg: *mut u8,
dso_handle: *mut u8) -> libc::c_int;
--
2.1.3
2.2.1
@@ -0,0 +1,25 @@
Remove ldconfig(1) execution to prevent the installation script from accessing
outside of a sandbox.
diff --git a/src/rust-installer/install-template.sh b/src/rust-installer/install-template.sh
index 545de67..242d6f4 100644
--- a/src/rust-installer/install-template.sh
+++ b/src/rust-installer/install-template.sh
@@ -508,17 +508,6 @@ done < "${CFG_SRC_DIR}/lib/${TEMPLATE_REL_MANIFEST_DIR}/manifest.in"
msg
-# Run ldconfig to make dynamic libraries available to the linker
-if [ "$CFG_OSTYPE" = "unknown-linux-gnu" ]
- then
- ldconfig
- if [ $? -ne 0 ]
- then
- warn "failed to run ldconfig."
- warn "this may happen when not installing as root and may be fine"
- fi
-fi
-
# Sanity check: can we run the installed binaries?
#
# As with the verification above, make sure the right LD_LIBRARY_PATH-equivalent
-15
View File
@@ -1,15 +0,0 @@
SRCREV = "77cd5cc54eda4243614be32b893db512beab0f8e"
require rust-git.inc
SRC_URI_append = "\
file://0001-libstd-io-process-Command-fully-quote-and-escape-the.patch \
file://0002-std-io-process-add-Show-tests.patch \
file://0003-platform.mk-avoid-choking-on-i586.patch \
file://0004-mk-rt-compiler_rt-pass-LDFLAGS-from-CFG_GCCISH_LINK_.patch \
file://0005-Target-add-default-target.json-path-libdir-rust-targ.patch \
file://0006-mk-for-stage0-use-RUSTFLAGS-to-override-target-libs-.patch \
file://0007-mk-add-missing-CFG_LIBDIR_RELATIVE.patch \
file://0008-configure-support-bindir-and-extend-libdir-to-non-bl.patch \
file://0009-Parallelize-submake-invocations.patch \
file://0010-std-thread_local-workaround-for-NULL-__dso_handle.patch \
"
@@ -1,4 +1,4 @@
SRCREV = "5484d6f6d2844e9c52d42db52a1ba94739e10996"
SRCREV = "71123902e17ad339649f33423995eac78da40e3c"
require rust-git.inc
SRC_URI_append = "\
@@ -12,4 +12,6 @@ SRC_URI_append = "\
file://0008-configure-support-bindir-and-extend-libdir-to-non-bl.patch \
file://0009-Parallelize-submake-invocations.patch \
file://0010-std-thread_local-workaround-for-NULL-__dso_handle.patch \
\
file://rust-0.13.0-no-ldconfig.patch \
"