beta test

This commit is contained in:
Josh Stone 2018-09-05 16:13:10 -07:00
parent 7826701957
commit 9d2418db76
4 changed files with 7 additions and 120 deletions

View File

@ -1,36 +0,0 @@
From 8af0dbaf90a3ce7cdbc96552f31f8aec45cc3084 Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Tue, 14 Aug 2018 17:17:58 -0700
Subject: [PATCH] backtrace-sys: Use target_pointer_width for
BACKTRACE_ELF_SIZE
The former code used `target.contains("64")` to detect Elf64 targets,
but this is inaccurate in a few cases:
- `s390x-unknown-linux-gnu` is 64-bit
- `sparcv9-sun-solaris` is 64-bit
- `x86_64-unknown-linux-gnux32` is 32-bit
Instead the build script can use `CARGO_CFG_TARGET_POINTER_WIDTH` to
reliably detect 64-bit targets.
---
backtrace-sys/build.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/backtrace-sys/build.rs b/backtrace-sys/build.rs
index a423aade4116..10486d1f850c 100644
--- a/backtrace-sys/build.rs
+++ b/backtrace-sys/build.rs
@@ -40,7 +40,8 @@ fn main() {
build.flag("-fvisibility=hidden");
build.file("src/libbacktrace/elf.c");
- if target.contains("64") {
+ let pointer_width = env::var("CARGO_CFG_TARGET_POINTER_WIDTH").unwrap();
+ if pointer_width == "64" {
build.define("BACKTRACE_ELF_SIZE", "64");
} else {
build.define("BACKTRACE_ELF_SIZE", "32");
--
2.17.1

View File

@ -1,30 +0,0 @@
From 66a47182d10542b68773d8a1cb9230a4918a5068 Mon Sep 17 00:00:00 2001
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Date: Thu, 2 Aug 2018 08:49:36 +0200
Subject: [PATCH] rustbuild: fix local_rebuild
If we detect a local rebuild (e.g. bootstrap compiler is the same version as target compiler), we set stage to 1.
When trying to build e.g. UnstableBook, we use Mode::ToolBootstrap and stage is 1.
Just allow Mode::ToolBootstrap and stagge != 0 if we are in a local_rebuild
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
---
src/bootstrap/builder.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 724d3b741903..dc0b0aaf0bb3 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -777,7 +777,7 @@ impl<'a> Builder<'a> {
// compiler, but for tools we just use the precompiled libraries that
// we've downloaded
let use_snapshot = mode == Mode::ToolBootstrap;
- assert!(!use_snapshot || stage == 0);
+ assert!(!use_snapshot || stage == 0 || self.local_rebuild);
let maybe_sysroot = self.sysroot(compiler);
let sysroot = if use_snapshot {
--
2.17.1

View File

@ -1,37 +0,0 @@
From e0d8364dadd404a37bc344ef089926745cfdbe20 Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Tue, 14 Aug 2018 21:08:42 -0700
Subject: [PATCH] std: Use target_pointer_width for BACKTRACE_ELF_SIZE
The former code used `target.contains("64")` to detect Elf64 targets,
but this is inaccurate in a few cases:
- `s390x-unknown-linux-gnu` is 64-bit
- `sparcv9-sun-solaris` is 64-bit
- `x86_64-unknown-linux-gnux32` is 32-bit
Instead the `std` build script can use `CARGO_CFG_TARGET_POINTER_WIDTH`
to reliably detect 64-bit targets for libbacktrace.
Also update to backtrace-sys 0.1.24 for alexcrichton/backtrace-rs#122.
---
src/libstd/build.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/libstd/build.rs b/src/libstd/build.rs
index 26d93f97e69f..016e7adb4c91 100644
--- a/src/libstd/build.rs
+++ b/src/libstd/build.rs
@@ -104,7 +104,8 @@ fn build_libbacktrace(target: &str) -> Result<(), ()> {
} else {
build.file("../libbacktrace/elf.c");
- if target.contains("64") {
+ let pointer_width = env::var("CARGO_CFG_TARGET_POINTER_WIDTH").unwrap();
+ if pointer_width == "64" {
build.define("BACKTRACE_ELF_SIZE", "64");
} else {
build.define("BACKTRACE_ELF_SIZE", "32");
--
2.17.1

View File

@ -63,7 +63,7 @@
Name: rust
Version: %{rustc_version}
Release: 0.1.beta.7%{?dist}
Release: 0.1.beta.12%{?dist}
Summary: The Rust Programming Language
License: (ASL 2.0 or MIT) and (BSD and MIT)
# ^ written as: (rust itself) and (bundled libraries)
@ -80,19 +80,11 @@ Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
# https://github.com/rust-lang/rust/pull/52876
Patch1: rust-52876-const-endianess.patch
# https://github.com/alexcrichton/backtrace-rs/pull/122
# https://github.com/rust-lang/rust/pull/53377
Patch2: 0001-backtrace-sys-Use-target_pointer_width-for-BACKTRACE.patch
Patch3: 0001-std-Use-target_pointer_width-for-BACKTRACE_ELF_SIZE.patch
# https://github.com/rust-lang/rust/pull/53436
Patch4: 0001-std-stop-backtracing-when-the-frames-are-full.patch
Patch2: 0001-std-stop-backtracing-when-the-frames-are-full.patch
# https://github.com/rust-lang/rust/pull/53437
Patch5: 0001-Set-more-llvm-function-attributes-for-__rust_try.patch
# https://github.com/rust-lang/rust/pull/52969
Patch6: 0001-rustbuild-fix-local_rebuild.patch
Patch3: 0001-Set-more-llvm-function-attributes-for-__rust_try.patch
# Get the Rust triple for any arch.
%{lua: function rust_triple(arch)
@ -418,13 +410,8 @@ test -f '%{local_rust_root}/bin/rustc'
%setup -q -n %{rustc_package}
%patch1 -p1
pushd src/vendor/backtrace-sys
%patch2 -p2
popd
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%if "%{python}" == "python3"
sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure
@ -698,6 +685,9 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py*
%changelog
* Wed Sep 05 2018 Josh Stone <jistone@redhat.com> - 1.29.0-0.1.beta.12
- beta test
* Thu Aug 30 2018 Josh Stone <jistone@redhat.com> - 1.29.0-0.1.beta.7
- beta test