Test 1.14.0-beta.2

- Rewrite bootstrap logic to target specific arches.
- Bootstrap ppc64, ppc64le, s390x. (thanks to Sinny Kumari for testing!)
This commit is contained in:
Josh Stone 2016-11-17 22:21:09 -08:00
parent e11f49f736
commit d59c1edc2b
6 changed files with 102 additions and 147 deletions

8
.gitignore vendored
View File

@ -16,3 +16,11 @@
/rustc-1.12.1-armv7-unknown-linux-gnueabihf.tar.gz
/rustc-1.12.1-i686-unknown-linux-gnu.tar.gz
/rustc-1.12.1-x86_64-unknown-linux-gnu.tar.gz
/rustc-beta-src.tar.gz
/rustc-1.13.0-aarch64-unknown-linux-gnu.tar.gz
/rustc-1.13.0-armv7-unknown-linux-gnueabihf.tar.gz
/rustc-1.13.0-i686-unknown-linux-gnu.tar.gz
/rustc-1.13.0-powerpc64le-unknown-linux-gnu.tar.gz
/rustc-1.13.0-powerpc64-unknown-linux-gnu.tar.gz
/rustc-1.13.0-s390x-unknown-linux-gnu.tar.gz
/rustc-1.13.0-x86_64-unknown-linux-gnu.tar.gz

View File

@ -1,48 +0,0 @@
commit 3bc0272cab9fdcfc2ef4df9625ec3c9d5909db79 (from ecd2b1f6d689d5afbf5debe8afb3739337323852)
Merge: ecd2b1f6d689 8250bd0ac50b
Author: Alex Crichton <alex@alexcrichton.com>
Date: Thu Nov 10 11:22:53 2016 -0600
Merge pull request #26 from TimNN/arm-cc
powi only: don't override arm calling convention
diff --git a/lib/builtins/int_lib.h b/lib/builtins/int_lib.h
index 6cf17497d3a5..8dfe5672d131 100644
--- a/lib/builtins/int_lib.h
+++ b/lib/builtins/int_lib.h
@@ -32,7 +32,7 @@
#if __ARM_EABI__
# define ARM_EABI_FNALIAS(aeabi_name, name) \
void __aeabi_##aeabi_name() __attribute__((alias("__" #name)));
-# define COMPILER_RT_ABI
+# define COMPILER_RT_ABI __attribute__((pcs("aapcs")))
#else
# define ARM_EABI_FNALIAS(aeabi_name, name)
# define COMPILER_RT_ABI
diff --git a/lib/builtins/powidf2.c b/lib/builtins/powidf2.c
index ac13b172b043..0200e1eab0b5 100644
--- a/lib/builtins/powidf2.c
+++ b/lib/builtins/powidf2.c
@@ -16,7 +16,7 @@
/* Returns: a ^ b */
-COMPILER_RT_ABI double
+double
__powidf2(double a, si_int b)
{
const int recip = b < 0;
diff --git a/lib/builtins/powisf2.c b/lib/builtins/powisf2.c
index 0c400ec6dd6a..c834b9696954 100644
--- a/lib/builtins/powisf2.c
+++ b/lib/builtins/powisf2.c
@@ -16,7 +16,7 @@
/* Returns: a ^ b */
-COMPILER_RT_ABI float
+float
__powisf2(float a, si_int b)
{
const int recip = b < 0;

View File

@ -1,30 +0,0 @@
commit 1a4192804518199623fb88bf43bde69d6b0203cb (from a5dac7a2af3ee444817eb7bfbba3539be8c06cf1)
Merge: a5dac7a2af3e 4625642211b9
Author: bors <bors@rust-lang.org>
Date: Tue Oct 4 13:23:09 2016 -0700
Auto merge of #36933 - alexcrichton:less-neon-again, r=eddyb
rustc: Try again to disable NEON on armv7 linux
This is a follow-up to #35814 which apparently didn't disable it hard enough. It
looks like LLVM's default armv7 target enables NEON so we'd otherwise have to
pass `-neon`, but we're already enabling armv7 with `+v7` supposedly, so let's
try just telling LLVM that the armv7 target is arm and then enable features
selectively.
Closes #36913
diff --git a/src/librustc_back/target/armv7_unknown_linux_gnueabihf.rs b/src/librustc_back/target/armv7_unknown_linux_gnueabihf.rs
index 1abf8b0b69a2..a6d73ddb1835 100644
--- a/src/librustc_back/target/armv7_unknown_linux_gnueabihf.rs
+++ b/src/librustc_back/target/armv7_unknown_linux_gnueabihf.rs
@@ -24,7 +24,7 @@ pub fn target() -> TargetResult {
options: TargetOptions {
// Info about features at https://wiki.debian.org/ArmHardFloatPort
- features: "+v7,+vfp3,+d16,+thumb2".to_string(),
+ features: "+v7,+vfp3,+d16,+thumb2,-neon".to_string(),
cpu: "generic".to_string(),
max_atomic_width: 64,
.. base

146
rust.spec
View File

@ -1,12 +1,19 @@
# Only x86_64 and i686 are Tier 1 platforms at this time.
# https://forge.rust-lang.org/platform-support.html
%global rust_arches x86_64 i686 armv7hl aarch64 ppc64 ppc64le s390x
# The channel can be stable, beta, or nightly
%{!?channel: %global channel stable}
%{!?channel: %global channel beta}
# To bootstrap from scratch, set the channel and date from src/stage0.txt
# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24
# or nightly wants some beta-YYYY-MM-DD
%bcond_with bootstrap
%global bootstrap_channel 1.12.1
%global bootstrap_date 2016-10-20
%global bootstrap_channel 1.13.0
%global bootstrap_date 2016-11-08
# Only the specified arches will use bootstrap binaries.
#global bootstrap_arches %%{rust_arches}
%global bootstrap_arches ppc64 ppc64le s390x
# We generally don't want llvm-static present at all, since llvm-config will
# make us link statically. But we can opt in, e.g. to aid LLVM rebases.
@ -16,23 +23,14 @@
%bcond_with llvm_static
# Rust 1.12 metadata is now unallocated data (.rustc), and in theory it should
# be fine to strip this entirely, since we don't want to expose Rust's unstable
# ABI for linking. However, eu-strip was then clobbering .dynsym when it tried
# to remove the rust_metadata symbol referencing .rustc (rhbz1380961).
# So for unfixed elfutils, we'll leave .rustc alone and only strip debuginfo.
%if 0%{?fedora} < 25
%global _find_debuginfo_opts -g
%undefine _include_minidebuginfo
%endif
Name: rust
Version: 1.13.0
Release: 1%{?dist}
Version: 1.14.0
Release: 0.1.beta.2%{?dist}
Summary: The Rust Programming Language
License: (ASL 2.0 or MIT) and (BSD and ISC and MIT)
# ^ written as: (rust itself) and (bundled libraries)
URL: https://www.rust-lang.org
ExclusiveArch: %{rust_arches}
%if "%{channel}" == "stable"
%global rustc_package rustc-%{version}
@ -41,32 +39,54 @@ URL: https://www.rust-lang.org
%endif
Source0: https://static.rust-lang.org/dist/%{rustc_package}-src.tar.gz
%if %with bootstrap
%global bootstrap_base https://static.rust-lang.org/dist/%{bootstrap_date}/rustc-%{bootstrap_channel}
Source1: %{bootstrap_base}-x86_64-unknown-linux-gnu.tar.gz
Source2: %{bootstrap_base}-i686-unknown-linux-gnu.tar.gz
Source3: %{bootstrap_base}-armv7-unknown-linux-gnueabihf.tar.gz
Source4: %{bootstrap_base}-aarch64-unknown-linux-gnu.tar.gz
# Get the Rust triple for any arch.
%{lua: function rust_triple(arch)
local abi = "gnu"
if arch == "armv7hl" then
arch = "armv7"
abi = "gnueabihf"
elseif arch == "ppc64" then
arch = "powerpc64"
elseif arch == "ppc64le" then
arch = "powerpc64le"
end
return arch.."-unknown-linux-"..abi
end}
%global rust_triple %{lua: print(rust_triple(rpm.expand("%{_target_cpu}")))}
%if %defined bootstrap_arches
# For each bootstrap arch, add an additional binary Source.
# Also define bootstrap_source just for the current target.
%{lua: do
local bootstrap_arches = {}
for arch in string.gmatch(rpm.expand("%{bootstrap_arches}"), "%S+") do
table.insert(bootstrap_arches, arch)
end
local base = string.format("https://static.rust-lang.org/dist/%s/rustc-%s",
rpm.expand("%{bootstrap_date}"),
rpm.expand("%{bootstrap_channel}"))
local target_arch = rpm.expand("%{_target_cpu}")
for i, arch in ipairs(bootstrap_arches) do
print(string.format("Source%d: %s-%s.tar.gz\n",
i, base, rust_triple(arch)))
if arch == target_arch then
rpm.define("bootstrap_source "..i)
end
end
end}
%endif
# Only x86_64 and i686 are Tier 1 platforms at this time.
# https://doc.rust-lang.org/stable/book/getting-started.html#tier-1
ExclusiveArch: x86_64 i686 armv7hl aarch64
%ifarch armv7hl
%global rust_triple armv7-unknown-linux-gnueabihf
%ifarch %{bootstrap_arches}
%global bootstrap_root rustc-%{bootstrap_channel}-%{rust_triple}
%global local_rust_root %{_builddir}/%{bootstrap_root}/rustc
Provides: bundled(%{name}-bootstrap) = %{bootstrap_channel}
%else
%global rust_triple %{_target_cpu}-unknown-linux-gnu
BuildRequires: %{name} <= %{version}
BuildRequires: %{name} >= %{bootstrap_channel}
%global local_rust_root %{_prefix}
%endif
# We're going to override --libdir when configuring to get rustlib into a
# common path, but we'll properly relocate the shared libraries during install.
%global common_libdir %{_prefix}/lib
%global rustlibdir %{common_libdir}/rustlib
# merged for 1.14.0
Patch1: rust-pr36933-less-neon-again.patch
Patch2: rust-compiler-rt-pr26-arm-cc.patch
BuildRequires: make
BuildRequires: cmake
BuildRequires: gcc
@ -85,16 +105,6 @@ BuildRequires: libffi-devel
BuildConflicts: llvm-static
%endif
%if %without bootstrap
BuildRequires: %{name} <= %{version}
BuildRequires: %{name} >= %{bootstrap_channel}
%global local_rust_root %{_prefix}
%else
%global bootstrap_root rustc-%{bootstrap_channel}-%{rust_triple}
%global local_rust_root %{_builddir}/%{rustc_package}/%{bootstrap_root}/rustc
%endif
# make check needs "ps" for src/test/run-pass/wait-forked-but-failed-child.rs
BuildRequires: procps-ng
@ -121,6 +131,16 @@ Requires: gcc
%global __provides_exclude ^(%{_privatelibs})$
%global __requires_exclude ^(%{_privatelibs})$
# Rust 1.12 metadata is now unallocated data (.rustc), and in theory it should
# be fine to strip this entirely, since we don't want to expose Rust's unstable
# ABI for linking. However, eu-strip was then clobbering .dynsym when it tried
# to remove the rust_metadata symbol referencing .rustc (rhbz1380961).
# So for unfixed elfutils, we'll leave .rustc alone and only strip debuginfo.
%if 0%{?fedora} < 25
%global _find_debuginfo_opts -g
%undefine _include_minidebuginfo
%endif
%description
Rust is a systems programming language that runs blazingly fast, prevents
segfaults, and guarantees thread safety.
@ -159,15 +179,13 @@ its standard library.
%prep
%setup -q -n %{rustc_package}
%if %with bootstrap
find %{sources} -name '%{bootstrap_root}.tar.gz' -exec tar -xvzf '{}' ';'
%ifarch %{bootstrap_arches}
%setup -q -n %{bootstrap_root} -T -b %{bootstrap_source}
test -f '%{local_rust_root}/bin/rustc'
%endif
%patch1 -p1 -b .less-neon
%patch2 -p1 -d src/compiler-rt -b .arm-cc
%setup -q -n %{rustc_package}
# unbundle
rm -rf src/jemalloc/
@ -179,19 +197,12 @@ sed -e '/*\//q' src/libbacktrace/backtrace.h \
>src/libbacktrace/LICENSE-libbacktrace
# These tests assume that alloc_jemalloc is present
# https://github.com/rust-lang/rust/issues/35017
sed -i.jemalloc -e '1i // ignore-test jemalloc is disabled' \
src/test/compile-fail/allocator-dylib-is-system.rs \
src/test/compile-fail/allocator-rust-dylib-is-jemalloc.rs \
src/test/run-pass/allocator-default.rs
%if %without bootstrap
# The hardcoded stage0 "lib" is inappropriate when using Fedora's own rustc
# ... Or it was, but now we're transitioning to a common /usr/lib/rustlib/
if [ '%{_lib}' != lib -a -d '%{_libdir}/rustlib/%{rust_triple}' ]; then
sed -i.libdir -e '/^HLIB_RELATIVE/s/lib$/%{_lib}/' mk/main.mk
fi
%endif
%if %with llvm_static
# Static linking to distro LLVM needs to add -lffi
# https://github.com/rust-lang/rust/issues/34486
@ -203,7 +214,7 @@ sed -i.ffi -e '$a #[link(name = "ffi")] extern {}' \
%build
%ifarch aarch64 %{mips} %{power64}
%if %with bootstrap
%ifarch %{bootstrap_arches}
# Upstream binaries have a 4k-paged jemalloc, which breaks with Fedora 64k pages.
# See https://github.com/rust-lang/rust/issues/36994
# Fixed by https://github.com/rust-lang/rust/issues/37392
@ -213,10 +224,12 @@ export MALLOC_CONF=lg_dirty_mult:-1
%endif
# Use hardening ldflags.
export RUSTFLAGS="-Clink-args=-Wl,-z,relro,-z,now"
export RUSTFLAGS="-Clink-arg=-Wl,-z,relro,-z,now"
# Note, libdir is overridden so we'll have a common rustlib path,
# but shared libs will be fixed during install.
# We're going to override --libdir when configuring to get rustlib into a
# common path, but we'll properly relocate the shared libraries during install.
%global common_libdir %{_prefix}/lib
%global rustlibdir %{common_libdir}/rustlib
%configure --disable-option-checking \
--libdir=%{common_libdir} \
@ -319,6 +332,11 @@ make check-lite VERBOSE=1 -k || python2 src/etc/check-summary.py tmp/*.log || :
%changelog
* Thu Nov 17 2016 Josh Stone <jistone@redhat.com> - 1.14.0-0.1.beta.2
- Test 1.14.0-beta.2
- Rewrite bootstrap logic to target specific arches.
- Bootstrap ppc64, ppc64le, s390x. (thanks to Sinny Kumari for testing!)
* Thu Nov 10 2016 Josh Stone <jistone@redhat.com> - 1.13.0-1
- Update to 1.13.0.
- Use hardening flags for linking.

View File

@ -1,5 +1,4 @@
23290b9d78356223a29cf37913c3a1c6 rustc-1.13.0-src.tar.gz
199eb41add634e002fbc2b20a2b33e27 rustc-1.12.1-aarch64-unknown-linux-gnu.tar.gz
60a4a099b166481fe96c165b39441995 rustc-1.12.1-armv7-unknown-linux-gnueabihf.tar.gz
f1c1b3c6cd6195e4fbc386a7ab49e64d rustc-1.12.1-i686-unknown-linux-gnu.tar.gz
a03bdb0111e3b68a3626237d2ec7cb95 rustc-1.12.1-x86_64-unknown-linux-gnu.tar.gz
41a8ea5a71155ac0cadc60b23ebd65b0 rustc-beta-src.tar.gz
66d82b3e76e73622abae8330d330aa17 rustc-1.13.0-powerpc64le-unknown-linux-gnu.tar.gz
8af97776d60efc4d88f959d010d45c3d rustc-1.13.0-powerpc64-unknown-linux-gnu.tar.gz
4a9b1c356d6d3a3d41c5dea42692c0f8 rustc-1.13.0-s390x-unknown-linux-gnu.tar.gz

8
sources-bootstrap Normal file
View File

@ -0,0 +1,8 @@
41a8ea5a71155ac0cadc60b23ebd65b0 rustc-beta-src.tar.gz
450896dd2f830209a9d713cc315a3f7a rustc-1.13.0-aarch64-unknown-linux-gnu.tar.gz
8aac8fdae529ac6cb59ca1aa9bdaba18 rustc-1.13.0-armv7-unknown-linux-gnueabihf.tar.gz
86bde292c0e579c145ce8d197997af43 rustc-1.13.0-i686-unknown-linux-gnu.tar.gz
66d82b3e76e73622abae8330d330aa17 rustc-1.13.0-powerpc64le-unknown-linux-gnu.tar.gz
8af97776d60efc4d88f959d010d45c3d rustc-1.13.0-powerpc64-unknown-linux-gnu.tar.gz
4a9b1c356d6d3a3d41c5dea42692c0f8 rustc-1.13.0-s390x-unknown-linux-gnu.tar.gz
1400262e1529f94a12d2f5c77cc67782 rustc-1.13.0-x86_64-unknown-linux-gnu.tar.gz