-Later:
+Long build time
+===============
+
+ * Seems to be fixed with 1.17.0 and rustbuild.
* Try to investigate the 1 hour vs 7 hour build time difference we saw between
git diff debian/1.13.0+dfsg1-2..debian/1.14.0+dfsg1-1 -- debian
<eddyb> infinity0: also try timing the entire compile-fail test run between stage1/bin/rustc and stage2/bin/rustc (the latter is what running tests uses by default)
<eddyb> infinity0: in the old thing [pre-rustbuild makefiles] it's... make check-stage1-cfail, I think
-Older backlog:
+Older backlog
+=============
* Use Compiler-rt package
* Improve the bootstrap (do the local build first on our systems, upload
--- /dev/null
+[build]
+cargo = "/usr/bin/cargo"
+
+[install]
+prefix = "/usr"
Ximin Luo <infinity0@debian.org>
Build-Depends: debhelper (>= 9),
dpkg-dev (>= 1.17.14),
- rustc (>= 1.15.0+dfsg) <!pkg.rustc.dlstage0>,
- rustc (<= 1.16.0++) <!pkg.rustc.dlstage0>,
+ rustc (>= 1.16.0+dfsg) <!pkg.rustc.dlstage0>,
+ rustc (<= 1.17.0++) <!pkg.rustc.dlstage0>,
+ cargo (>= 0.17.0) <!pkg.rustc.dlstage0>,
autotools-dev,
binutils (>= 2.26) | binutils-2.26,
cmake | cmake3,
antlr4 <!nocheck> | antlr <!nocheck>,
bison <!nocheck>,
flex <!nocheck>,
-# TODO: broken; see https://github.com/rust-lang/rust/issues/39838; re-enable when that is fixed
-# gdb <!nocheck>,
+ gdb <!nocheck>,
default-jdk-headless <!nocheck> | default-jdk <!nocheck>,
Build-Depends-Indep: libjs-jquery <!nodoc>,
pandoc (>= 1.9),
generic programming and meta-programming, in both static and dynamic
styles.
-Package: libstd-rust-1.16
+Package: libstd-rust-1.17
Section: libs
Architecture: any
Multi-Arch: same
Section: libdevel
Architecture: any
Multi-Arch: same
-Depends: ${misc:Depends}, libstd-rust-1.16 (= ${binary:Version})
+Depends: ${misc:Depends}, libstd-rust-1.17 (= ${binary:Version})
Description: Rust standard libraries - development files
Rust is a curly-brace, block-structured expression language. It
visually resembles the C language family, but differs significantly
Upstream-Name: rust
Source: http://www.rust-lang.org
Files-Excluded:
+ cargo
src/llvm
src/librustdoc/html/static/jquery-*.min.js
src/rt/hoedown/src/html_blocks.c
+++ /dev/null
-# "libstd" just seemed too generic
-libstd-rust-1.16 binary: package-name-doesnt-match-sonames
-
-# Rust doesn't use dev shlib symlinks nor any of the other shlib support stuff
-libstd-rust-1.16 binary: dev-pkg-without-shlib-symlink
-libstd-rust-1.16 binary: shlib-without-versioned-soname
-libstd-rust-1.16 binary: pkg-has-shlibs-control-file-but-no-actual-shared-libs
-libstd-rust-1.16 binary: package-must-activate-ldconfig-trigger
-
-# Libraries that use libc symbols (libterm, libstd, etc) *are* linked
-# to libc. Lintian gets upset that some Rust libraries don't need
-# libc, boo hoo.
-libstd-rust-1.16 binary: library-not-linked-against-libc
-
-# We need it for now
-binary-or-shlib-defines-rpath usr/lib/*/lib*so /usr/lib/rustlib/*lib
--- /dev/null
+# "libstd" just seemed too generic
+libstd-rust-1.17 binary: package-name-doesnt-match-sonames
+
+# Rust doesn't use dev shlib symlinks nor any of the other shlib support stuff
+libstd-rust-1.17 binary: dev-pkg-without-shlib-symlink
+libstd-rust-1.17 binary: shlib-without-versioned-soname
+libstd-rust-1.17 binary: pkg-has-shlibs-control-file-but-no-actual-shared-libs
+libstd-rust-1.17 binary: package-must-activate-ldconfig-trigger
+
+# Libraries that use libc symbols (libterm, libstd, etc) *are* linked
+# to libc. Lintian gets upset that some Rust libraries don't need
+# libc, boo hoo.
+libstd-rust-1.17 binary: library-not-linked-against-libc
+
+# We need it for now
+binary-or-shlib-defines-rpath usr/lib/*/lib*so /usr/lib/rustlib/*lib
Author: Angus Lees <gus@debian.org>
Forwarded: no
-Index: rust/src/librustc_trans/back/link.rs
-===================================================================
---- rust.orig/src/librustc_trans/back/link.rs
-+++ rust/src/librustc_trans/back/link.rs
-@@ -927,6 +927,13 @@ fn link_args(cmd: &mut Linker,
+--- a/src/librustc_trans/back/link.rs
++++ b/src/librustc_trans/back/link.rs
+@@ -993,6 +993,13 @@
cmd.args(&rpath::get_rpath_flags(&mut rpath_config));
}
+++ /dev/null
-Index: rustc.git/Makefile
-===================================================================
---- rustc.git.orig/Makefile
-+++ rustc.git/Makefile
-@@ -21,7 +21,7 @@ BOOTSTRAP := $(CFG_PYTHON) $(CFG_SRC_DIR
-
- all:
- $(Q)$(BOOTSTRAP) build $(BOOTSTRAP_ARGS)
-- $(Q)$(BOOTSTRAP) doc $(BOOTSTRAP_ARGS)
-+# $(Q)$(BOOTSTRAP) doc $(BOOTSTRAP_ARGS)
-
- help:
- $(Q)echo 'Welcome to the rustbuild build system!'
Forwarded: not-needed
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-Index: rust/src/librustc_llvm/build.rs
-===================================================================
---- rust.orig/src/librustc_llvm/build.rs
-+++ rust/src/librustc_llvm/build.rs
-@@ -158,55 +158,10 @@ fn main() {
+--- a/src/librustc_llvm/build.rs
++++ b/src/librustc_llvm/build.rs
+@@ -154,55 +154,10 @@
let (llvm_kind, llvm_link_arg) = detect_llvm_link(&llvm_config);
// LLVM ldflags
//
-Index: rust/src/etc/mklldeps.py
-===================================================================
---- rust.orig/src/etc/mklldeps.py
-+++ rust/src/etc/mklldeps.py
-@@ -56,38 +56,13 @@ def runErr(args):
-
- f.write("\n")
-
--args = [llvm_config, '--shared-mode']
--args.extend(components)
--llvm_shared, out = runErr(args)
--if llvm_shared:
-- llvm_shared = 'shared' in out
-+llvm_shared = True
-
- # LLVM libs
--args = [llvm_config, '--libs', '--system-libs']
--args.extend(components)
--out = run(args)
--for lib in out.strip().replace("\n", ' ').split(' '):
-- if len(lib) == 0:
-- continue
-- # in some cases we get extra spaces in between libs so ignore those
-- if len(lib) == 1 and lib == ' ':
-- continue
-- # not all libs strictly follow -lfoo, on Bitrig, there is -pthread
-- if lib[0:2] == '-l':
-- lib = lib.strip()[2:]
-- elif lib[0] == '-':
-- lib = lib.strip()[1:]
-- # If this actually points at a literal file then we're on MSVC which now
-- # prints full paths, so get just the name of the library and strip off the
-- # trailing ".lib"
-- elif os.path.exists(lib):
-- lib = os.path.basename(lib)[:-4]
-- elif lib[-4:] == '.lib':
-- lib = lib[:-4]
-- f.write("#[link(name = \"" + lib + "\"")
-- if not llvm_shared and 'LLVM' in lib:
-- f.write(", kind = \"static\"")
-- f.write(")]\n")
-+# Link in Debian full LLVM shared library.
-+# FIXME: not sure what to do in the cross-compiling case.
-+f.write("#[link(name = \"LLVM-3.9\")]\n")
-+
-
- # LLVM ldflags
- out = run([llvm_config, '--ldflags'])
+++ /dev/null
-Description: Dynamically link with Debian's LLVM
- Hard-code -lLLVM, instead of using llvm-config to figure out which components
- to link in. The latter doesn't work properly anyway for dynamic linking - see
- LLVM bug #3201. If/when this is fixed, then Rust upstream will probably fix
- their code to allow for this, and after that happens we can rm this patch.
- .
- TODO: not sure if we need extra tweaks for cross-compiling
-Author: Ximin Luo <infinity0@debian.org>
-Forwarded: not-needed
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/src/librustc_llvm/build.rs
-+++ b/src/librustc_llvm/build.rs
-@@ -157,55 +157,10 @@
-
- let (llvm_kind, llvm_link_arg) = detect_llvm_link(&llvm_config);
-
-- // Link in all LLVM libraries, if we're uwring the "wrong" llvm-config then
-- // we don't pick up system libs because unfortunately they're for the host
-- // of llvm-config, not the target that we're attempting to link.
-- let mut cmd = Command::new(&llvm_config);
-- cmd.arg("--libs");
--
-- if let Some(link_arg) = llvm_link_arg {
-- cmd.arg(link_arg);
-- }
--
-- if !is_crossed {
-- cmd.arg("--system-libs");
-- }
-- cmd.args(&components[..]);
--
-- for lib in output(&mut cmd).split_whitespace() {
-- let name = if lib.starts_with("-l") {
-- &lib[2..]
-- } else if lib.starts_with("-") {
-- &lib[1..]
-- } else if Path::new(lib).exists() {
-- // On MSVC llvm-config will print the full name to libraries, but
-- // we're only interested in the name part
-- let name = Path::new(lib).file_name().unwrap().to_str().unwrap();
-- name.trim_right_matches(".lib")
-- } else if lib.ends_with(".lib") {
-- // Some MSVC libraries just come up with `.lib` tacked on, so chop
-- // that off
-- lib.trim_right_matches(".lib")
-- } else {
-- continue;
-- };
--
-- // Don't need or want this library, but LLVM's CMake build system
-- // doesn't provide a way to disable it, so filter it here even though we
-- // may or may not have built it. We don't reference anything from this
-- // library and it otherwise may just pull in extra dependencies on
-- // libedit which we don't want
-- if name == "LLVMLineEditor" {
-- continue;
-- }
--
-- let kind = if name.starts_with("LLVM") {
-- llvm_kind
-- } else {
-- "dylib"
-- };
-- println!("cargo:rustc-link-lib={}={}", kind, name);
-- }
-+ // Link in all LLVM libraries
-+ // Link in Debian full LLVM shared library.
-+ // TODO: not sure what to do in the cross-compiling case.
-+ println!("cargo:rustc-link-lib={}={}", "dylib", "LLVM-3.9");
-
- // LLVM ldflags
- //
---- a/src/etc/mklldeps.py
-+++ b/src/etc/mklldeps.py
-@@ -56,38 +56,13 @@
-
- f.write("\n")
-
--args = [llvm_config, '--shared-mode']
--args.extend(components)
--llvm_shared, out = runErr(args)
--if llvm_shared:
-- llvm_shared = 'shared' in out
-+llvm_shared = True
-
- # LLVM libs
--args = [llvm_config, '--libs', '--system-libs']
--args.extend(components)
--out = run(args)
--for lib in out.strip().replace("\n", ' ').split(' '):
-- if len(lib) == 0:
-- continue
-- # in some cases we get extra spaces in between libs so ignore those
-- if len(lib) == 1 and lib == ' ':
-- continue
-- # not all libs strictly follow -lfoo, on Bitrig, there is -pthread
-- if lib[0:2] == '-l':
-- lib = lib.strip()[2:]
-- elif lib[0] == '-':
-- lib = lib.strip()[1:]
-- # If this actually points at a literal file then we're on MSVC which now
-- # prints full paths, so get just the name of the library and strip off the
-- # trailing ".lib"
-- elif os.path.exists(lib):
-- lib = os.path.basename(lib)[:-4]
-- elif lib[-4:] == '.lib':
-- lib = lib[:-4]
-- f.write("#[link(name = \"" + lib + "\"")
-- if not llvm_shared and 'LLVM' in lib:
-- f.write(", kind = \"static\"")
-- f.write(")]\n")
-+# Link in Debian full LLVM shared library.
-+# TODO: not sure what to do in the cross-compiling case.
-+f.write("#[link(name = \"LLVM-3.9\")]\n")
-+
-
- # LLVM ldflags
- out = run([llvm_config, '--ldflags'])
+++ /dev/null
-Description: Fill in mips Makefile rules
- Upstream is about to delete the Makefiles in the next version, so this will
- remain a Debian-specific patch.
-Author: Ximin Luo <infinity0@debian.org>
-Bug: https://github.com/rust-lang/rust/pull/38650
-Forwarded: not-needed
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/mk/cfg/mips-unknown-linux-gnu.mk
-+++ b/mk/cfg/mips-unknown-linux-gnu.mk
-@@ -18,7 +18,7 @@
- CFG_WINDOWSY_mips-unknown-linux-gnu :=
- CFG_UNIXY_mips-unknown-linux-gnu := 1
- CFG_LDPATH_mips-unknown-linux-gnu :=
--CFG_RUN_mips-unknown-linux-gnu=
--CFG_RUN_TARG_mips-unknown-linux-gnu=
-+CFG_RUN_mips-unknown-linux-gnu=$(2)
-+CFG_RUN_TARG_mips-unknown-linux-gnu=$(call CFG_RUN_mips-unknown-linux-gnu,,$(2))
- RUSTC_FLAGS_mips-unknown-linux-gnu :=
- CFG_GNU_TRIPLE_mips-unknown-linux-gnu := mips-unknown-linux-gnu
---- a/mk/cfg/mips64-unknown-linux-gnuabi64.mk
-+++ b/mk/cfg/mips64-unknown-linux-gnuabi64.mk
-@@ -1 +1,24 @@
--# rustbuild-only target
-+# mips64-unknown-linux-gnuabi64 configuration
-+CC_mips64-unknown-linux-gnuabi64=mips64-linux-gnuabi64-gcc
-+CXX_mips64-unknown-linux-gnuabi64=mips64-linux-gnuabi64-g++
-+CPP_mips64-unknown-linux-gnuabi64=mips64-linux-gnuabi64-gcc
-+AR_mips64-unknown-linux-gnuabi64=mips64-linux-gnuabi64-ar
-+CFG_LIB_NAME_mips64-unknown-linux-gnuabi64=lib$(1).so
-+CFG_STATIC_LIB_NAME_mips64-unknown-linux-gnuabi64=lib$(1).a
-+CFG_LIB_GLOB_mips64-unknown-linux-gnuabi64=lib$(1)-*.so
-+CFG_LIB_DSYM_GLOB_mips64-unknown-linux-gnuabi64=lib$(1)-*.dylib.dSYM
-+CFG_JEMALLOC_CFLAGS_mips64-unknown-linux-gnuabi64 := -mips64r2 -mabi=64 $(CFLAGS)
-+CFG_GCCISH_CFLAGS_mips64-unknown-linux-gnuabi64 := -Wall -g -fPIC -mips64r2 -mabi=64 $(CFLAGS)
-+CFG_GCCISH_CXXFLAGS_mips64-unknown-linux-gnuabi64 := -fno-rtti $(CXXFLAGS)
-+CFG_GCCISH_LINK_FLAGS_mips64-unknown-linux-gnuabi64 := -shared -fPIC -g -mips64r2
-+CFG_GCCISH_DEF_FLAG_mips64-unknown-linux-gnuabi64 := -Wl,--export-dynamic,--dynamic-list=
-+CFG_LLC_FLAGS_mips64-unknown-linux-gnuabi64 :=
-+CFG_INSTALL_NAME_mips64-unknown-linux-gnuabi64 =
-+CFG_EXE_SUFFIX_mips64-unknown-linux-gnuabi64 :=
-+CFG_WINDOWSY_mips64-unknown-linux-gnuabi64 :=
-+CFG_UNIXY_mips64-unknown-linux-gnuabi64 := 1
-+CFG_LDPATH_mips64-unknown-linux-gnuabi64 :=
-+CFG_RUN_mips64-unknown-linux-gnuabi64=$(2)
-+CFG_RUN_TARG_mips64-unknown-linux-gnuabi64=$(call CFG_RUN_mips64-unknown-linux-gnuabi64,,$(2))
-+RUSTC_FLAGS_mips64-unknown-linux-gnuabi64 :=
-+CFG_GNU_TRIPLE_mips64-unknown-linux-gnuabi64 := mips64-unknown-linux-gnuabi64
---- a/mk/cfg/mips64el-unknown-linux-gnuabi64.mk
-+++ b/mk/cfg/mips64el-unknown-linux-gnuabi64.mk
-@@ -1 +1,24 @@
--# rustbuild-only target
-+# mips64el-unknown-linux-gnuabi64 configuration
-+CC_mips64el-unknown-linux-gnuabi64=mips64el-linux-gnuabi64-gcc
-+CXX_mips64el-unknown-linux-gnuabi64=mips64el-linux-gnuabi64-g++
-+CPP_mips64el-unknown-linux-gnuabi64=mips64el-linux-gnuabi64-gcc
-+AR_mips64el-unknown-linux-gnuabi64=mips64el-linux-gnuabi64-ar
-+CFG_LIB_NAME_mips64el-unknown-linux-gnuabi64=lib$(1).so
-+CFG_STATIC_LIB_NAME_mips64el-unknown-linux-gnuabi64=lib$(1).a
-+CFG_LIB_GLOB_mips64el-unknown-linux-gnuabi64=lib$(1)-*.so
-+CFG_LIB_DSYM_GLOB_mips64el-unknown-linux-gnuabi64=lib$(1)-*.dylib.dSYM
-+CFG_JEMALLOC_CFLAGS_mips64el-unknown-linux-gnuabi64 := -mips64r2 -mabi=64 $(CFLAGS)
-+CFG_GCCISH_CFLAGS_mips64el-unknown-linux-gnuabi64 := -Wall -g -fPIC -mips64r2 -mabi=64 $(CFLAGS)
-+CFG_GCCISH_CXXFLAGS_mips64el-unknown-linux-gnuabi64 := -fno-rtti $(CXXFLAGS)
-+CFG_GCCISH_LINK_FLAGS_mips64el-unknown-linux-gnuabi64 := -shared -fPIC -g -mips64r2
-+CFG_GCCISH_DEF_FLAG_mips64el-unknown-linux-gnuabi64 := -Wl,--export-dynamic,--dynamic-list=
-+CFG_LLC_FLAGS_mips64el-unknown-linux-gnuabi64 :=
-+CFG_INSTALL_NAME_mips64el-unknown-linux-gnuabi64 =
-+CFG_EXE_SUFFIX_mips64el-unknown-linux-gnuabi64 :=
-+CFG_WINDOWSY_mips64el-unknown-linux-gnuabi64 :=
-+CFG_UNIXY_mips64el-unknown-linux-gnuabi64 := 1
-+CFG_LDPATH_mips64el-unknown-linux-gnuabi64 :=
-+CFG_RUN_mips64el-unknown-linux-gnuabi64=$(2)
-+CFG_RUN_TARG_mips64el-unknown-linux-gnuabi64=$(call CFG_RUN_mips64el-unknown-linux-gnuabi64,,$(2))
-+RUSTC_FLAGS_mips64el-unknown-linux-gnuabi64 :=
-+CFG_GNU_TRIPLE_mips64el-unknown-linux-gnuabi64 := mips64el-unknown-linux-gnuabi64
---- a/mk/cfg/mipsel-unknown-linux-gnu.mk
-+++ b/mk/cfg/mipsel-unknown-linux-gnu.mk
-@@ -1,7 +1,7 @@
- # mipsel-unknown-linux-gnu configuration
- CC_mipsel-unknown-linux-gnu=mipsel-linux-gnu-gcc
- CXX_mipsel-unknown-linux-gnu=mipsel-linux-gnu-g++
--CPP_mipsel-unknown-linux-gnu=mipsel-linux-gnu-gcc
-+CPP_mipsel-unknown-linux-gnu=mipsel-linux-gnu-gcc -E
- AR_mipsel-unknown-linux-gnu=mipsel-linux-gnu-ar
- CFG_LIB_NAME_mipsel-unknown-linux-gnu=lib$(1).so
- CFG_STATIC_LIB_NAME_mipsel-unknown-linux-gnu=lib$(1).a
-@@ -18,7 +18,7 @@
- CFG_WINDOWSY_mipsel-unknown-linux-gnu :=
- CFG_UNIXY_mipsel-unknown-linux-gnu := 1
- CFG_LDPATH_mipsel-unknown-linux-gnu :=
--CFG_RUN_mipsel-unknown-linux-gnu=
--CFG_RUN_TARG_mipsel-unknown-linux-gnu=
-+CFG_RUN_mipsel-unknown-linux-gnu=$(2)
-+CFG_RUN_TARG_mipsel-unknown-linux-gnu=$(call CFG_RUN_mipsel-unknown-linux-gnu,,$(2))
- RUSTC_FLAGS_mipsel-unknown-linux-gnu :=
- CFG_GNU_TRIPLE_mipsel-unknown-linux-gnu := mipsel-unknown-linux-gnu
+++ /dev/null
-Description: Fix configure architecture targets for Debian
- Rust upstream sometimes builds for multiple triplets depending on the CPU,
- since it could be valid for multiple triplets. We don't need to do this for
- Debian; each DEB_HOST_ARCH maps to a single triplet. This patch indirectly
- achieves this by setting CFG_{OS,CPU}TYPE to more specific values depending
- on what DEB_HOST_ARCH is, hopefully preventing a multiple build.
- .
- Tested on armhf, untested on armel due to missing build-deps.
-Author: Ximin Luo <infinity0@debian.org>
-Forwarded: not-needed
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/configure
-+++ b/configure
-@@ -514,8 +514,19 @@
- ;;
-
- armv7l | armv8l)
-- CFG_CPUTYPE=armv7
-- CFG_OSTYPE="${CFG_OSTYPE}eabihf"
-+ case $DEB_HOST_ARCH in
-+ armhf)
-+ CFG_CPUTYPE=armv7
-+ CFG_OSTYPE="${CFG_OSTYPE}eabihf"
-+ ;;
-+ armel)
-+ CFG_CPUTYPE=arm
-+ CFG_OSTYPE="${CFG_OSTYPE}eabi"
-+ ;;
-+ *)
-+ err "unknown DEB_HOST_ARCH $DEB_HOST_ARCH for armv7l/armv8l cpu"
-+ ;;
-+ esac
- ;;
-
- aarch64)
+++ /dev/null
-Description: Fix configure architecture targets for Debian
- Rust upstream sometimes builds for multiple triplets depending on the CPU,
- since it could be valid for multiple triplets. We don't need to do this for
- Debian; each DEB_HOST_ARCH maps to a single triplet. This patch indirectly
- achieves this by setting CFG_{OS,CPU}TYPE to more specific values depending
- on what DEB_HOST_ARCH is, hopefully preventing a multiple build.
- .
- Tested on armhf, untested on armel due to missing build-deps.
-Author: Ximin Luo <infinity0@debian.org>
-Forwarded: not-needed
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-Index: rustc.git/configure
-===================================================================
---- rustc.git.orig/configure
-+++ rustc.git/configure
-@@ -508,8 +508,19 @@ case $CFG_CPUTYPE in
- ;;
-
- armv7l)
-- CFG_CPUTYPE=armv7
-- CFG_OSTYPE="${CFG_OSTYPE}eabihf"
-+ case $DEB_HOST_ARCH in
-+ armhf)
-+ CFG_CPUTYPE=armv7
-+ CFG_OSTYPE="${CFG_OSTYPE}eabihf"
-+ ;;
-+ armel)
-+ CFG_CPUTYPE=arm
-+ CFG_OSTYPE="${CFG_OSTYPE}eabi"
-+ ;;
-+ *)
-+ err "unknown DEB_HOST_ARCH $DEB_HOST_ARCH for armv7l cpu"
-+ ;;
-+ esac
- ;;
-
- aarch64)
+++ /dev/null
-Description: TODO
- See https://lists.alioth.debian.org/pipermail/pkg-rust-maintainers/2017-February/000828.html
- for possible followups
-Author: Erwan Prioul <erwan@linux.vnet.ibm.com>
-Forwarded: TODO
-
-diff -Naur a/src/test/run-make/issue-24445/Makefile b/src/test/run-make/issue-24445/Makefile
---- a/src/test/run-make/issue-24445/Makefile 2017-02-17 10:21:17.092001151 +0000
-+++ b/src/test/run-make/issue-24445/Makefile 2017-02-21 13:07:36.719995153 +0000
-@@ -3,9 +3,9 @@
- ifeq ($(UNAME),Linux)
- all:
- $(RUSTC) foo.rs
-- $(CC) foo.c -lfoo -L $(TMPDIR) -Wl,--gc-sections -lpthread -o $(TMPDIR)/foo
-+ $(CC) foo.c -lfoo -L $(TMPDIR) -Wl,--gc-sections -lpthread -ldl -o $(TMPDIR)/foo
- $(call RUN,foo)
-- $(CC) foo.c -lfoo -L $(TMPDIR) -Wl,--gc-sections -lpthread -pie -fPIC -o $(TMPDIR)/foo
-+ $(CC) foo.c -lfoo -L $(TMPDIR) -Wl,--gc-sections -lpthread -ldl -pie -fPIC -o $(TMPDIR)/foo
- $(call RUN,foo)
- else
- all:
--- /dev/null
+Description: Raise LLVM min version for some tests
+ According to the comments at the top of the files being patched, they require
+ either LLVM 4.0 or Rust's patched LLVM. So just avoid them in Debian.
+Author: Ximin Luo <infinity0@debian.org>
+Forwarded: not-needed
+---
+diff --git a/src/test/codegen/mainsubprogram.rs b/src/test/codegen/mainsubprogram.rs
+index 657f4b662..59599f3b1 100644
+--- a/src/test/codegen/mainsubprogram.rs
++++ b/src/test/codegen/mainsubprogram.rs
+@@ -15,7 +15,7 @@
+ // ignore-tidy-linelength
+ // ignore-windows
+ // ignore-macos
+-// min-llvm-version 3.8
++// min-llvm-version 4.0
+
+ // compile-flags: -g -C no-prepopulate-passes
+
+diff --git a/src/test/codegen/mainsubprogramstart.rs b/src/test/codegen/mainsubprogramstart.rs
+index cd34a1670..6e600e954 100644
+--- a/src/test/codegen/mainsubprogramstart.rs
++++ b/src/test/codegen/mainsubprogramstart.rs
+@@ -15,7 +15,7 @@
+ // ignore-tidy-linelength
+ // ignore-windows
+ // ignore-macos
+-// min-llvm-version 3.8
++// min-llvm-version 4.0
+
+ // compile-flags: -g -C no-prepopulate-passes
+
-Index: rustc.git/src/librustdoc/html/render.rs
-===================================================================
---- rustc.git.orig/src/librustdoc/html/render.rs
-+++ rustc.git/src/librustdoc/html/render.rs
-@@ -656,8 +656,16 @@ fn write_shared(cx: &Context,
+--- a/src/librustdoc/html/render.rs
++++ b/src/librustdoc/html/render.rs
+@@ -656,8 +656,16 @@
// Add all the static files. These may already exist, but we just
// overwrite them anyway to make sure that they're fresh and up-to-date.
u-ignoretest-armhf_02.patch
u-ignoretest-armhf_03.patch
u-ignoretest-armhf_04.patch
-u-ignoretest-arm64-stdcall.patch
-#u-ignoretest-i386.patch
u-ignoretest-arm64.patch
u-detect-mips-cpu.patch
-u-ignoretest-powerpc.patch
-#u-destdir-support.diff
-u-arm-on-64bit-kernel.diff
+u-fix-weird-arm-logic.diff
+u-fix-debuginfo.patch
# Debian-specific patches, not suitable for upstream
+d-raise-min-llvm-version.patch
d-rust-gdb-paths
d-rust-lldb-paths
d-add-soname.patch
-d-dont-download-stage0.patch
-d-fix-configure-for-deb-arches.patch
+#d-dont-download-stage0.patch
d-dynamic-link-llvm.patch
d-use-system-jquery.patch
-d-fill-in-mips-mk-rules.patch
-d-missing-ref-dlsym-ppc64el.patch
-
-# This might be useful for 1.16 when mk/ is deleted; however we need to figure
-# out how to apply the equivalent patch in a different file, as Makefile is a
-# generated file. For 1.15 mk/ still applies and all-no-docs still exists
-#d-disable-doc-build-in-all.diff
gcc-4.8-aarch64-ice.diff
+++ /dev/null
-Description: Support armhf running on a 64-bit kernel
-Author: Matthias Klose <doko@debian.org>
-Applied-Upstream: commit:0a55c8e659f0fc540b740101f7a02ab28e300aa4
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-Index: rust/configure
-===================================================================
---- rust.orig/configure
-+++ rust/configure
-@@ -513,7 +513,7 @@ case $CFG_CPUTYPE in
- CFG_OSTYPE="${CFG_OSTYPE}eabihf"
- ;;
-
-- armv7l)
-+ armv7l | armv8l)
- CFG_CPUTYPE=armv7
- CFG_OSTYPE="${CFG_OSTYPE}eabihf"
- ;;
-Index: rust/src/bootstrap/bootstrap.py
-===================================================================
---- rust.orig/src/bootstrap/bootstrap.py
-+++ rust/src/bootstrap/bootstrap.py
-@@ -374,7 +374,7 @@ class RustBuild(object):
- cputype = 'i686'
- elif cputype in {'xscale', 'arm'}:
- cputype = 'arm'
-- elif cputype == 'armv7l':
-+ elif cputype in {'armv7l', 'armv8l'}:
- cputype = 'arm'
- ostype += 'eabihf'
- elif cputype == 'aarch64':
+++ /dev/null
-diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index 04d01759a..90f3ae956 100644
---- a/src/bootstrap/compile.rs
-+++ b/src/bootstrap/compile.rs
-@@ -187,7 +187,7 @@ pub fn rustc<'a>(build: &'a Build, target: &str, compiler: &Compiler<'a>) {
- cargo.env("CFG_RELEASE", &build.release)
- .env("CFG_RELEASE_CHANNEL", &build.config.channel)
- .env("CFG_VERSION", &build.version)
-- .env("CFG_PREFIX", build.config.prefix.clone().unwrap_or(String::new()))
-+ .env("CFG_PREFIX", build.config.prefix.clone().unwrap_or(PathBuf::new()))
- .env("CFG_LIBDIR_RELATIVE", "lib");
-
- // If we're not building a compiler with debugging information then remove
-diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 1f67b52db..e90d7ed24 100644
---- a/src/bootstrap/config.rs
-+++ b/src/bootstrap/config.rs
-@@ -85,10 +85,10 @@ pub struct Config {
- pub quiet_tests: bool,
- // Fallback musl-root for all targets
- pub musl_root: Option<PathBuf>,
-- pub prefix: Option<String>,
-- pub docdir: Option<String>,
-- pub libdir: Option<String>,
-- pub mandir: Option<String>,
-+ pub prefix: Option<PathBuf>,
-+ pub docdir: Option<PathBuf>,
-+ pub libdir: Option<PathBuf>,
-+ pub mandir: Option<PathBuf>,
- pub codegen_tests: bool,
- pub nodejs: Option<PathBuf>,
- pub gdb: Option<PathBuf>,
-@@ -114,6 +114,7 @@ pub struct Target {
- #[derive(RustcDecodable, Default)]
- struct TomlConfig {
- build: Option<Build>,
-+ install: Option<Install>,
- llvm: Option<Llvm>,
- rust: Option<Rust>,
- target: Option<HashMap<String, TomlTarget>>,
-@@ -136,6 +137,15 @@ struct Build {
- python: Option<String>,
- }
-
-+/// TOML representation of various global install decisions.
-+#[derive(RustcDecodable, Default, Clone)]
-+struct Install {
-+ prefix: Option<String>,
-+ mandir: Option<String>,
-+ docdir: Option<String>,
-+ libdir: Option<String>,
-+}
-+
- /// TOML representation of how the LLVM build is configured.
- #[derive(RustcDecodable, Default)]
- struct Llvm {
-@@ -260,6 +270,13 @@ impl Config {
- set(&mut config.submodules, build.submodules);
- set(&mut config.vendor, build.vendor);
-
-+ if let Some(ref install) = toml.install {
-+ config.prefix = install.prefix.clone().map(PathBuf::from);
-+ config.mandir = install.mandir.clone().map(PathBuf::from);
-+ config.docdir = install.docdir.clone().map(PathBuf::from);
-+ config.libdir = install.libdir.clone().map(PathBuf::from);
-+ }
-+
- if let Some(ref llvm) = toml.llvm {
- match llvm.ccache {
- Some(StringOrBool::String(ref s)) => {
-@@ -277,6 +294,7 @@ impl Config {
- set(&mut config.llvm_version_check, llvm.version_check);
- set(&mut config.llvm_static_stdcpp, llvm.static_libstdcpp);
- }
-+
- if let Some(ref rust) = toml.rust {
- set(&mut config.rust_debug_assertions, rust.debug_assertions);
- set(&mut config.rust_debuginfo, rust.debuginfo);
-@@ -443,16 +461,16 @@ impl Config {
- self.channel = value.to_string();
- }
- "CFG_PREFIX" => {
-- self.prefix = Some(value.to_string());
-+ self.prefix = Some(PathBuf::from(value));
- }
- "CFG_DOCDIR" => {
-- self.docdir = Some(value.to_string());
-+ self.docdir = Some(PathBuf::from(value));
- }
- "CFG_LIBDIR" => {
-- self.libdir = Some(value.to_string());
-+ self.libdir = Some(PathBuf::from(value));
- }
- "CFG_MANDIR" => {
-- self.mandir = Some(value.to_string());
-+ self.mandir = Some(PathBuf::from(value));
- }
- "CFG_LLVM_ROOT" if value.len() > 0 => {
- let target = self.target_config.entry(self.build.clone())
-diff --git a/src/bootstrap/config.toml.example b/src/bootstrap/config.toml.example
-index 22542f873..b22d68ea2 100644
---- a/src/bootstrap/config.toml.example
-+++ b/src/bootstrap/config.toml.example
-@@ -72,6 +72,9 @@
- # specified, use this rustc binary instead as the stage0 snapshot compiler.
- #rustc = "/path/to/bin/rustc"
-
-+# Instead of installing installing to /usr/local, install to this path instead.
-+#prefix = "/path/to/install"
-+
- # Flag to specify whether any documentation is built. If false, rustdoc and
- # friends will still be compiled but they will not be used to generate any
- # documentation.
-diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
-index 9bc5a7c00..efc460f35 100644
---- a/src/bootstrap/install.rs
-+++ b/src/bootstrap/install.rs
-@@ -13,9 +13,9 @@
- //! This module is responsible for installing the standard library,
- //! compiler, and documentation.
-
-+use std::env;
- use std::fs;
--use std::borrow::Cow;
--use std::path::Path;
-+use std::path::{Path, PathBuf, Component};
- use std::process::Command;
-
- use Build;
-@@ -23,23 +23,35 @@ use dist::{package_vers, sanitize_sh, tmpdir};
-
- /// Installs everything.
- pub fn install(build: &Build, stage: u32, host: &str) {
-- let prefix = build.config.prefix.as_ref().clone().map(|x| Path::new(x))
-- .unwrap_or(Path::new("/usr/local"));
-- let docdir = build.config.docdir.as_ref().clone().map(|x| Cow::Borrowed(Path::new(x)))
-- .unwrap_or(Cow::Owned(prefix.join("share/doc/rust")));
-- let libdir = build.config.libdir.as_ref().clone().map(|x| Cow::Borrowed(Path::new(x)))
-- .unwrap_or(Cow::Owned(prefix.join("lib")));
-- let mandir = build.config.mandir.as_ref().clone().map(|x| Cow::Borrowed(Path::new(x)))
-- .unwrap_or(Cow::Owned(prefix.join("share/man")));
-+ let prefix_default = PathBuf::from("/usr/local");
-+ let docdir_default = PathBuf::from("share/doc/rust");
-+ let mandir_default = PathBuf::from("share/man");
-+ let libdir_default = PathBuf::from("lib");
-+ let prefix = build.config.prefix.as_ref().unwrap_or(&prefix_default);
-+ let docdir = build.config.docdir.as_ref().unwrap_or(&docdir_default);
-+ let libdir = build.config.libdir.as_ref().unwrap_or(&libdir_default);
-+ let mandir = build.config.mandir.as_ref().unwrap_or(&mandir_default);
-+
-+ let docdir = prefix.join(docdir);
-+ let libdir = prefix.join(libdir);
-+ let mandir = prefix.join(mandir);
-+
-+ let destdir = env::var_os("DESTDIR").map(PathBuf::from);
-+
-+ let prefix = add_destdir(&prefix, &destdir);
-+ let docdir = add_destdir(&docdir, &destdir);
-+ let libdir = add_destdir(&libdir, &destdir);
-+ let mandir = add_destdir(&mandir, &destdir);
-+
- let empty_dir = build.out.join("tmp/empty_dir");
- t!(fs::create_dir_all(&empty_dir));
- if build.config.docs {
-- install_sh(&build, "docs", "rust-docs", stage, host, prefix,
-+ install_sh(&build, "docs", "rust-docs", stage, host, &prefix,
- &docdir, &libdir, &mandir, &empty_dir);
- }
-- install_sh(&build, "std", "rust-std", stage, host, prefix,
-+ install_sh(&build, "std", "rust-std", stage, host, &prefix,
- &docdir, &libdir, &mandir, &empty_dir);
-- install_sh(&build, "rustc", "rustc", stage, host, prefix,
-+ install_sh(&build, "rustc", "rustc", stage, host, &prefix,
- &docdir, &libdir, &mandir, &empty_dir);
- t!(fs::remove_dir_all(&empty_dir));
- }
-@@ -59,3 +71,17 @@ fn install_sh(build: &Build, package: &str, name: &str, stage: u32, host: &str,
- .arg("--disable-ldconfig");
- build.run(&mut cmd);
- }
-+
-+fn add_destdir(path: &Path, destdir: &Option<PathBuf>) -> PathBuf {
-+ let mut ret = match *destdir {
-+ Some(ref dest) => dest.clone(),
-+ None => return path.to_path_buf(),
-+ };
-+ for part in path.components() {
-+ match part {
-+ Component::Normal(s) => ret.push(s),
-+ _ => {}
-+ }
-+ }
-+ return ret
-+}
Bug: https://github.com/rust-lang/rust/pull/38650
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-Index: rust/configure
-===================================================================
---- rust.orig/configure
-+++ rust/configure
-@@ -388,6 +388,7 @@ msg "inspecting environment"
-
- CFG_OSTYPE=$(uname -s)
- CFG_CPUTYPE=$(uname -m)
-+ENDIAN=$(printf '\1' | od -dAn)
-
- if [ $CFG_OSTYPE = Darwin -a $CFG_CPUTYPE = i386 ]
- then
-@@ -549,6 +550,17 @@ case $CFG_CPUTYPE in
- if [ "$ENDIAN" -eq 1 ]; then
- CFG_CPUTYPE="${CFG_CPUTYPE}el"
- elif [ "$ENDIAN" -ne 256 ]; then
-+ err "unknown endianness: $ENDIAN (expecting 1 for little or 256 for big)"
-+ fi
-+ ;;
-+
-+ mips | mips64)
-+ if [ "$CFG_CPUTYPE" = "mips64" ]; then
-+ CFG_OSTYPE="${CFG_OSTYPE}abi64"
-+ fi
-+ if [ "$ENDIAN" -eq 1 ]; then
-+ CFG_CPUTYPE="${CFG_CPUTYPE}el"
-+ elif [ "$ENDIAN" -ne 256 ]; then
- err "unknown endianness: $ENDIAN (expecting 1 for little or 256 for big)"
- fi
- ;;
-Index: rust/src/test/run-pass/conditional-compile-arch.rs
-===================================================================
---- rust.orig/src/test/run-pass/conditional-compile-arch.rs
-+++ rust/src/test/run-pass/conditional-compile-arch.rs
-@@ -28,6 +28,12 @@ pub fn main() { }
+--- a/src/test/run-pass/conditional-compile-arch.rs
++++ b/src/test/run-pass/conditional-compile-arch.rs
+@@ -28,6 +28,12 @@
#[cfg(target_arch = "mips64")]
pub fn main() { }
--- /dev/null
+Description: Fix some debuginfo tests
+Author: Kai Noda <nodakai@gmail.com>
+Bug: https://github.com/rust-lang/rust/issues/40557
+---
+diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
+index 1ec0838d4..51ab38b1a 100644
+--- a/src/tools/compiletest/src/runtest.rs
++++ b/src/tools/compiletest/src/runtest.rs
+@@ -645,6 +645,9 @@ actual:\n\
+ script_str.push_str(&format!("file {}\n",
+ exe_file.to_str().unwrap()
+ .replace(r"\", r"\\")));
++ if self.config.gdb_native_rust {
++ script_str.push_str("set language rust\n");
++ }
+
+ // Add line breakpoints
+ for line in &breakpoint_lines {
--- /dev/null
+Description: Fix weird logic around ARM CPU detection
+Author: Ximin Luo <infinity0@debian.org>
+Forwarded: TODO
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/bootstrap/bootstrap.py
++++ b/src/bootstrap/bootstrap.py
+@@ -465,12 +465,12 @@
+ cputype = 'i686'
+ elif cputype in {'xscale', 'arm'}:
+ cputype = 'arm'
+- elif cputype in {'armv6l', 'armv7l', 'armv8l'}:
+- cputype = 'arm'
+- ostype += 'eabihf'
+- elif cputype == 'armv7l':
++ elif cputype in {'armv7l', 'armv8l'}:
+ cputype = 'armv7'
+ ostype += 'eabihf'
++ elif cputype == 'armv6l':
++ cputype = 'arm'
++ ostype += 'eabihf'
+ elif cputype == 'aarch64':
+ cputype = 'aarch64'
+ elif cputype == 'arm64':
+++ /dev/null
-Description: Ignore failing stdcall test on arm64
- Disable test that fails on Debian; "stdcall" is a win32 calling convention and
- not supposed to work here anyway.
-Author: Ximin Luo <infinity0@debian.org>
-Bug: https://github.com/rust-lang/rust/issues/36348
-Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=837533
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-Index: rust/src/test/debuginfo/type-names.rs
-===================================================================
---- rust.orig/src/test/debuginfo/type-names.rs
-+++ rust/src/test/debuginfo/type-names.rs
-@@ -363,7 +363,7 @@ fn main() {
- let rust_fn_with_return_value = (rust_fn_with_return_value, 0_usize);
- let extern_c_fn_with_return_value = (extern_c_fn_with_return_value, 0_usize);
- let unsafe_fn_with_return_value = (unsafe_fn_with_return_value, 0_usize);
-- let extern_stdcall_fn_with_return_value = (extern_stdcall_fn_with_return_value, 0_usize);
-+// let extern_stdcall_fn_with_return_value = (extern_stdcall_fn_with_return_value, 0_usize);
-
- let generic_function_int = (generic_function::<isize>, 0_usize);
- let generic_function_struct3 = (generic_function::<mod1::mod2::Struct3>, 0_usize);
-Index: rust/src/test/run-pass-valgrind/down-with-thread-dtors.rs
-===================================================================
---- rust.orig/src/test/run-pass-valgrind/down-with-thread-dtors.rs
-+++ rust/src/test/run-pass-valgrind/down-with-thread-dtors.rs
+--- a/src/test/run-pass-valgrind/down-with-thread-dtors.rs
++++ b/src/test/run-pass-valgrind/down-with-thread-dtors.rs
@@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
Bug: https://github.com/rust-lang/rust/issues/40260
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-Index: rustc.git/src/doc/reference.md
-===================================================================
---- rustc.git.orig/src/doc/reference.md
-+++ rustc.git/src/doc/reference.md
-@@ -1133,7 +1133,7 @@ bodies defined in Rust code _can be call
+--- a/src/doc/reference/src/items.md
++++ b/src/doc/reference/src/items.md
+@@ -407,7 +407,7 @@
in the same way as any other Rust function, except that they have the `extern`
modifier.
--```
-+```{.ignore}
+-```rust
++```rust,ignore
// Declares an extern fn, the ABI defaults to "C"
extern fn new_i32() -> i32 { 0 }
+// ignore-arm
+
+ use std::fmt;
use std::mem;
- #[repr(packed)]
+++ /dev/null
-Index: rustc.git/src/test/run-make/no-duplicate-libs/main.rs
-===================================================================
---- rustc.git.orig/src/test/run-make/no-duplicate-libs/main.rs
-+++ rustc.git/src/test/run-make/no-duplicate-libs/main.rs
-@@ -8,6 +8,8 @@
- // option. This file may not be copied, modified, or distributed
- // except according to those terms.
-
-+// ignore-test
-+
- #[link(name = "foo")]
- #[link(name = "bar")]
- #[link(name = "foo")]
-Index: rustc.git/src/test/run-make/no-duplicate-libs/Makefile
-===================================================================
---- rustc.git.orig/src/test/run-make/no-duplicate-libs/Makefile
-+++ rustc.git/src/test/run-make/no-duplicate-libs/Makefile
-@@ -5,8 +5,8 @@ ifdef IS_MSVC
- all:
- else
- all:
-- $(RUSTC) foo.rs
-- $(RUSTC) bar.rs
-- $(RUSTC) main.rs
-- $(call RUN,main)
-+# $(RUSTC) foo.rs
-+# $(RUSTC) bar.rs
-+# $(RUSTC) main.rs
-+# $(call RUN,main)
- endif
+++ /dev/null
-Description: Ignore ASM tests on powerpc
-Author: Erwan Prioul <erwan@linux.vnet.ibm.com>
-Applied-Upstream: commit:1572bf104dbf65d58bd6b889fa46229c9b92d6f9
-
-Index: rust/src/test/compile-fail/asm-bad-clobber.rs
-===================================================================
---- rust.orig/src/test/compile-fail/asm-bad-clobber.rs
-+++ rust/src/test/compile-fail/asm-bad-clobber.rs
-@@ -13,6 +13,7 @@
- // ignore-aarch64
- // ignore-s390x
- // ignore-emscripten
-+// ignore-powerpc
-
- #![feature(asm, rustc_attrs)]
-
-Index: rust/src/test/compile-fail/asm-in-bad-modifier.rs
-===================================================================
---- rust.orig/src/test/compile-fail/asm-in-bad-modifier.rs
-+++ rust/src/test/compile-fail/asm-in-bad-modifier.rs
-@@ -10,6 +10,7 @@
-
- // ignore-s390x
- // ignore-emscripten
-+// ignore-powerpc
-
- #![feature(asm)]
-
-Index: rust/src/test/compile-fail/asm-out-assign-imm.rs
-===================================================================
---- rust.orig/src/test/compile-fail/asm-out-assign-imm.rs
-+++ rust/src/test/compile-fail/asm-out-assign-imm.rs
-@@ -10,6 +10,7 @@
-
- // ignore-s390x
- // ignore-emscripten
-+// ignore-powerpc
-
- #![feature(asm)]
-
-Index: rust/src/test/compile-fail/asm-out-no-modifier.rs
-===================================================================
---- rust.orig/src/test/compile-fail/asm-out-no-modifier.rs
-+++ rust/src/test/compile-fail/asm-out-no-modifier.rs
-@@ -10,6 +10,7 @@
-
- // ignore-s390x
- // ignore-emscripten
-+// ignore-powerpc
-
- #![feature(asm)]
-
-Index: rust/src/test/compile-fail/asm-out-read-uninit.rs
-===================================================================
---- rust.orig/src/test/compile-fail/asm-out-read-uninit.rs
-+++ rust/src/test/compile-fail/asm-out-read-uninit.rs
-@@ -10,6 +10,7 @@
-
- // ignore-s390x
- // ignore-emscripten
-+// ignore-powerpc
-
- #![feature(asm)]
-
-Index: rust/src/test/compile-fail/asm-misplaced-option.rs
-===================================================================
---- rust.orig/src/test/compile-fail/asm-misplaced-option.rs
-+++ rust/src/test/compile-fail/asm-misplaced-option.rs
-@@ -13,6 +13,7 @@
- // ignore-aarch64
- // ignore-s390x
- // ignore-emscripten
-+// ignore-powerpc
-
- #![feature(asm, rustc_attrs)]
-
-Index: rust/src/bootstrap/bootstrap.py
-===================================================================
---- rust.orig/src/bootstrap/bootstrap.py
-+++ rust/src/bootstrap/bootstrap.py
-@@ -72,7 +72,7 @@ def download(path, url, probably_big, ve
+--- a/src/bootstrap/bootstrap.py
++++ b/src/bootstrap/bootstrap.py
+@@ -84,7 +84,7 @@
option = "-#"
else:
option = "-s"
-- run(["curl", option, "--retry", "3", "-Sf", "-o", path, url], verbose=verbose)
-+ run(["curl", option, "-R", "--retry", "3", "-Sf", "-o", path, url], verbose=verbose)
+- run(["curl", option, "--retry", "3", "-Sf", "-o", path, url],
++ run(["curl", option, "-R", "--retry", "3", "-Sf", "-o", path, url],
+ verbose=verbose,
+ exception=exception)
-
- def verify(path, sha_path, verbose):
# These are the normal build flags
DEB_CONFIGURE_FLAGS = \
+ --build=$(DEB_BUILD_RUST_TYPE) \
--host=$(DEB_HOST_RUST_TYPE) \
--target=$(DEB_TARGET_RUST_TYPE) \
--disable-manage-submodules \
- --disable-rustbuild \
--release-channel=$(RELEASE_CHANNEL) \
- --prefix=/usr
+ --prefix=/usr \
+ --enable-vendor --disable-locked-deps \
+ --enable-llvm-link-shared
# Use system LLVM (comment out to use vendored LLVM)
OLD_LLVM_VERSION = 3.8
DEB_CONFIGURE_FLAGS += --llvm-root=/usr/lib/llvm-3.9
+RUSTBUILD = ./x.py
+RUSTBUILD_FLAGS = -v
# Below we detect how we're supposed to bootstrap the stage0 compiler. See
# README.Debian for more details of the cases described below.
%:
dh $@ --parallel
+.PHONY: build
+build:
+ dh $@ --parallel
+
# Note: SHELL is not set by dash, but the configure script wants to use it
override_dh_auto_configure:
# fail the build if we have any instances of OLD_LLVM_VERSION in debian, except for debian/changelog
! grep --color=always -i 'll...$(OLD_LLVM_VERSION)' --exclude=changelog -R debian
$(PRECONFIGURE_CHECK)
+ cp debian/config.toml src/bootstrap/config.toml
+ mkdir cargo # otherwise "install" fails, it's more strict than really needed
SHELL=/bin/sh PATH="$$PWD/debian/bin:$$PATH" DEB_HOST_ARCH="$(DEB_HOST_ARCH)" \
./configure $(DEB_CONFIGURE_FLAGS)
override_dh_auto_clean:
- set -e; \
- if [ -f Makefile ]; then \
- $(MAKE) clean-all; \
- $(RM) Makefile config.stamp config.mk; \
- fi
+ $(RM) -rf ./build ./tmp ./.cargo src/etc/__pycache__/ config.stamp config.mk Makefile
$(RM) src/rt/hoedown/src/html_blocks.c # clean up after building this ourselves
- $(RM) src/bootstrap/bootstrap.pyc
+ $(RM) src/bootstrap/bootstrap.pyc src/bootstrap/config.toml
# upstream bundles this in the source, but in Debian we rebuild everything yo
generate-sources:
$(MAKE) -C src/rt/hoedown src/html_blocks.c
override_dh_auto_build-arch: generate-sources
- dh_auto_build -- all VERBOSE=1
+ $(RUSTBUILD) build $(RUSTBUILD_FLAGS)
# note: this is only for buildds that want to do a separate arch:all build;
# there is no point running this yourself "to save time" since it implicitly
# depends on build-arch anyways.
override_dh_auto_build-indep: generate-sources
ifneq (,$(BUILD_DOCS))
- dh_auto_build -- docs VERBOSE=1
+ $(RUSTBUILD) doc $(RUSTBUILD_FLAGS)
+endif
+
+override_dh_auto_test-arch:
+ifeq (, $(filter nocheck,$(DEB_BUILD_OPTIONS)))
+# Use non-parallel $(MAKE) here instead of dh_auto_test, otherwise the upstream
+# Makefile will try to run N instances of the testrunner each of which will run
+# N instances of rustc (there is also parallel logic in libtest.rs already).
+ if RUST_BACKTRACE=1 $(RUSTBUILD) test $(RUSTBUILD_FLAGS); then \
+ : ; \
+ elif [ $(DEB_DISTRIBUTION) != "experimental" ]; then \
+ false; \
+ else \
+ echo "====================================================="; \
+ echo "WARNING: Ignoring test failures in the rust testsuite"; \
+ echo "====================================================="; \
+ fi
endif
+# No tests are applicable when only building arch:all packages.
+# More specifically: when we do an arch-all build, some crates are not built.
+# This makes some arch-dependent tests fail, so don't run them here.
+override_dh_auto_test-indep:
+ true
+
override_dh_auto_install:
- dh_auto_install --destdir=$(DEB_DESTDIR)
+ DESTDIR=$(DEB_DESTDIR) $(RUSTBUILD) dist $(RUSTBUILD_FLAGS) --install
mkdir -p $(DEB_DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/
mv $(DEB_DESTDIR)/usr/lib/lib*.so $(DEB_DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/
override_dh_compress:
dh_compress -X.woff
-override_dh_auto_test-arch:
-ifeq (, $(filter nocheck,$(DEB_BUILD_OPTIONS)))
-# Use non-parallel $(MAKE) here instead of dh_auto_test, otherwise the upstream
-# Makefile will try to run N instances of the testrunner each of which will run
-# N instances of rustc (there is also parallel logic in libtest.rs already).
- if RUST_BACKTRACE=1 $(MAKE) VERBOSE=1 check; then \
- : ; \
- elif [ $(DEB_DISTRIBUTION) = "unstable" ]; then \
- false; \
- else \
- echo "====================================================="; \
- echo "WARNING: Ignoring test failures in the rust testsuite"; \
- echo "====================================================="; \
- fi
-endif
-
-# No tests are applicable when only building arch:all packages.
-# More specifically: when we do an arch-all build, some crates are not built.
-# This makes some arch-dependent tests fail, so don't run them here.
-override_dh_auto_test-indep:
- true
-
override_dh_makeshlibs:
dh_makeshlibs -V
sed -i -e "s|libstd-rust-${ORIG_R}|libstd-rust-$NEW|g" libstd-rust-$NEW.lintian-overrides
}
-update 1.15 1.16
+update 1.16 1.17