Accepting request 680376 from devel:languages:rust
OBS-URL: https://build.opensuse.org/request/show/680376 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rust?expand=0&rev=34
This commit is contained in:
commit
bfba188fdf
@ -17,6 +17,9 @@
|
||||
</conditions>
|
||||
<hardware>
|
||||
<processors>2</processors>
|
||||
<physicalmemory>
|
||||
<size unit="G">4</size>
|
||||
</physicalmemory>
|
||||
<disk>
|
||||
<size unit="G">15</size>
|
||||
</disk>
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1f493cfb40566a61765eb91e4613503350378803ac9b962c710e80e01a781aa9
|
||||
size 114223904
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4974df85c0b82d2cf461717e3f82e9c4144861e32142bf70649c8afa989863e5
|
||||
size 121114868
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:77fd3bf5f499b30bded11b0bf8cb2d2963774c417fb7d312c36fd3eebeb3ac9a
|
||||
size 122390768
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a462e0fb8ef048d54c341ffd1ba64b139b240bd92d3094ebd484f2cf84015f81
|
||||
size 143689500
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1c50ddbcdc2479b8447fba950db51c446aef0287ca80226f1ea026495c72b411
|
||||
size 118698168
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ad4f95f65d3e3dc4509e3e358194e454e4382a8a8e51c6f317e19948db63b5aa
|
||||
size 121569444
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d0a2706a79df49e71ae2dcd87009066cc3fa0c4c8f101986d95a42235815c5f3
|
||||
size 124025168
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fc08025864a5e70e5c92bc16239992f044dbd1932ca7455ccfdf662075e97931
|
||||
size 145148116
|
3
rust-1.32.0-aarch64-unknown-linux-gnu.tar.xz
Normal file
3
rust-1.32.0-aarch64-unknown-linux-gnu.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a530cfc8aadd2cec3b8c63dfb46c940ad8b4b18131641a3da1601ec380619f11
|
||||
size 116136352
|
3
rust-1.32.0-arm-unknown-linux-gnueabihf.tar.xz
Normal file
3
rust-1.32.0-arm-unknown-linux-gnueabihf.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:456ea506cd920d3470ee935e239b1be2101abf21ec6547133fce8b0f80ee0448
|
||||
size 117758664
|
3
rust-1.32.0-armv7-unknown-linux-gnueabihf.tar.xz
Normal file
3
rust-1.32.0-armv7-unknown-linux-gnueabihf.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2e823316c841fe8459f49337fa0ca164df7b8a651e7b8fc4d3375c94766ac228
|
||||
size 119183916
|
3
rust-1.32.0-i686-unknown-linux-gnu.tar.xz
Normal file
3
rust-1.32.0-i686-unknown-linux-gnu.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:29c015ef1aa37f770e823fe7f000892448f9b5f2ca9ec381b6ad7b7a965b6054
|
||||
size 146763596
|
3
rust-1.32.0-powerpc64-unknown-linux-gnu.tar.xz
Normal file
3
rust-1.32.0-powerpc64-unknown-linux-gnu.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:237665793c41d794d339d383010d477e8d99025c407bf956a3c52ea51b90814b
|
||||
size 120518816
|
3
rust-1.32.0-powerpc64le-unknown-linux-gnu.tar.xz
Normal file
3
rust-1.32.0-powerpc64le-unknown-linux-gnu.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:93a85671ac11446bbedef67941591b06b3151b866df12c3a71d5940068d40bd0
|
||||
size 124278796
|
3
rust-1.32.0-s390x-unknown-linux-gnu.tar.xz
Normal file
3
rust-1.32.0-s390x-unknown-linux-gnu.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2ca4b078f3a1c23221f726668a26682651f515fdd8ba57827c87ea41b811006e
|
||||
size 128857448
|
3
rust-1.32.0-x86_64-unknown-linux-gnu.tar.xz
Normal file
3
rust-1.32.0-x86_64-unknown-linux-gnu.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e7ee1fc3c6e2d2dec4bfdc0b38ecc3a80828655bdf6bb44d97c7a9ea76134f86
|
||||
size 147868652
|
216
rust.changes
216
rust.changes
@ -1,3 +1,219 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 1 06:57:58 UTC 2019 - Luke Jones <jones_ld@protonmail.com>
|
||||
|
||||
- Bump minimum LLVM to 7.0
|
||||
- Add conditions to build SLE versions with bundled libgit2 and
|
||||
libssh2
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 28 17:08:08 UTC 2019 - Federico Mena Quintero <federico@suse.com>
|
||||
|
||||
- Use cmake3, not cmake, in SLE-12 SP2 and earlier. The stock cmake
|
||||
package there was 2.x, and building llvm requires cmake 3.5.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 27 21:39:35 UTC 2019 - jones_ld@protonmail.com
|
||||
|
||||
- Use same version bootstrap as package source
|
||||
- Fixes to build with correct LLVM for SLE and Leap releases
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 27 02:38:54 UTC 2019 - Luke Jones <jones_ld@protonmail.com>
|
||||
|
||||
- Move export vars directly to where used.
|
||||
- Change codegen units to 2 for Arm and x86 builds in attempt to
|
||||
reduce memory use by LLVM.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 27 02:12:17 UTC 2019 - Federico Mena Quintero <federico@suse.com>
|
||||
|
||||
- Put each exported environment variable in a separate line so the
|
||||
specfile will work on SLE SP0/SP1/SP2.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 24 09:40:06 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Avoid bash-specific syntax in "test" call.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 24 01:52:06 UTC 2019 - Luke Jones <jones_ld@protonmail.com>
|
||||
|
||||
- Fix bootstrap conditionals
|
||||
- Fix bundled_llvm conditionals
|
||||
- Don't build stage0 if compiler used to build package is the
|
||||
same version as package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Feb 23 01:58:47 UTC 2019 - Luke Jones <jones_ld@protonmail.com>
|
||||
|
||||
- Ensure install environment is the same as build environment to
|
||||
prevent building everything twice (second time without correct
|
||||
flags).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 17 21:22:11 UTC 2019 - Luke Jones <jones_ld@protonmail.com>
|
||||
|
||||
- Update to version 1.32.0
|
||||
- Language
|
||||
+ 2018 edition
|
||||
- You can now use the `?` operator in macro definitions. The `?`
|
||||
operator allows you to specify zero or one repetitions similar to the `*` and
|
||||
`+` operators.
|
||||
- Module paths with no leading keyword like `super`, `self`, or `crate`, will
|
||||
now always resolve to the item (`enum`, `struct`, etc.) available in the
|
||||
module if present, before resolving to a external crate or an item the prelude.
|
||||
E.g.
|
||||
enum Color { Red, Green, Blue }
|
||||
use Color::*;
|
||||
+ All editions
|
||||
- You can now match against `PhantomData<T>` types.
|
||||
- You can now match against literals in macros with the `literal`
|
||||
specifier. This will match against a literal of any type.
|
||||
E.g. `1`, `'A'`, `"Hello World"`
|
||||
- Self can now be used as a constructor and pattern for unit and tuple structs. E.g.
|
||||
struct Point(i32, i32);
|
||||
|
||||
impl Point {
|
||||
pub fn new(x: i32, y: i32) -> Self {
|
||||
Self(x, y)
|
||||
}
|
||||
|
||||
pub fn is_origin(&self) -> bool {
|
||||
match self {
|
||||
Self(0, 0) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
- Self can also now be used in type definitions. E.g.
|
||||
enum List<T>
|
||||
where
|
||||
Self: PartialOrd<Self> // can write `Self` instead of `List<T>`
|
||||
{
|
||||
Nil,
|
||||
Cons(T, Box<Self>) // likewise here
|
||||
}
|
||||
- You can now mark traits with `#[must_use]`. This provides a warning if
|
||||
a `impl Trait` or `dyn Trait` is returned and unused in the program.
|
||||
- Compiler
|
||||
+ The default allocator has changed from jemalloc to the default allocator on
|
||||
your system. The compiler itself on Linux & macOS will still use
|
||||
jemalloc, but programs compiled with it will use the system allocator.
|
||||
+ Added the `aarch64-pc-windows-msvc` target.
|
||||
- Libraries
|
||||
+ `PathBuf` now implements `FromStr`.
|
||||
- `Box<[T]>` now implements `FromIterator<T>`.
|
||||
- The `dbg!` macro has been stabilized. This macro enables you to
|
||||
easily debug expressions in your rust program. E.g.
|
||||
let a = 2;
|
||||
let b = dbg!(a * 2) + 1;
|
||||
// ^-- prints: [src/main.rs:4] a * 2 = 4
|
||||
assert_eq!(b, 5);
|
||||
+ The following APIs are now `const` functions and can be used in a
|
||||
`const` context.
|
||||
- `Cell::as_ptr`
|
||||
- `UnsafeCell::get`
|
||||
- `char::is_ascii`
|
||||
- `iter::empty`
|
||||
- `ManuallyDrop::new`
|
||||
- `ManuallyDrop::into_inner`
|
||||
- `RangeInclusive::start`
|
||||
- `RangeInclusive::end`
|
||||
- `NonNull::as_ptr`
|
||||
- `slice::as_ptr`
|
||||
- `str::as_ptr`
|
||||
- `Duration::as_secs`
|
||||
- `Duration::subsec_millis`
|
||||
- `Duration::subsec_micros`
|
||||
- `Duration::subsec_nanos`
|
||||
- `CStr::as_ptr`
|
||||
- `Ipv4Addr::is_unspecified`
|
||||
- `Ipv6Addr::new`
|
||||
- `Ipv6Addr::octets`
|
||||
- Stabilized APIs
|
||||
+ `i8::to_be_bytes`
|
||||
+ `i8::to_le_bytes`
|
||||
+ `i8::to_ne_bytes`
|
||||
+ `i8::from_be_bytes`
|
||||
+ `i8::from_le_bytes`
|
||||
+ `i8::from_ne_bytes`
|
||||
+ `i16::to_be_bytes`
|
||||
+ `i16::to_le_bytes`
|
||||
+ `i16::to_ne_bytes`
|
||||
+ `i16::from_be_bytes`
|
||||
+ `i16::from_le_bytes`
|
||||
+ `i16::from_ne_bytes`
|
||||
+ `i32::to_be_bytes`
|
||||
+ `i32::to_le_bytes`
|
||||
+ `i32::to_ne_bytes`
|
||||
+ `i32::from_be_bytes`
|
||||
+ `i32::from_le_bytes`
|
||||
+ `i32::from_ne_bytes`
|
||||
+ `i64::to_be_bytes`
|
||||
+ `i64::to_le_bytes`
|
||||
+ `i64::to_ne_bytes`
|
||||
+ `i64::from_be_bytes`
|
||||
+ `i64::from_le_bytes`
|
||||
+ `i64::from_ne_bytes`
|
||||
+ `i128::to_be_bytes`
|
||||
+ `i128::to_le_bytes`
|
||||
+ `i128::to_ne_bytes`
|
||||
+ `i128::from_be_bytes`
|
||||
+ `i128::from_le_bytes`
|
||||
+ `i128::from_ne_bytes`
|
||||
+ `isize::to_be_bytes`
|
||||
+ `isize::to_le_bytes`
|
||||
+ `isize::to_ne_bytes`
|
||||
+ `isize::from_be_bytes`
|
||||
+ `isize::from_le_bytes`
|
||||
+ `isize::from_ne_bytes`
|
||||
+ `u8::to_be_bytes`
|
||||
+ `u8::to_le_bytes`
|
||||
+ `u8::to_ne_bytes`
|
||||
+ `u8::from_be_bytes`
|
||||
+ `u8::from_le_bytes`
|
||||
+ `u8::from_ne_bytes`
|
||||
+ `u16::to_be_bytes`
|
||||
+ `u16::to_le_bytes`
|
||||
+ `u16::to_ne_bytes`
|
||||
+ `u16::from_be_bytes`
|
||||
+ `u16::from_le_bytes`
|
||||
+ `u16::from_ne_bytes`
|
||||
+ `u32::to_be_bytes`
|
||||
+ `u32::to_le_bytes`
|
||||
+ `u32::to_ne_bytes`
|
||||
+ `u32::from_be_bytes`
|
||||
+ `u32::from_le_bytes`
|
||||
+ `u32::from_ne_bytes`
|
||||
+ `u64::to_be_bytes`
|
||||
+ `u64::to_le_bytes`
|
||||
+ `u64::to_ne_bytes`
|
||||
+ `u64::from_be_bytes`
|
||||
+ `u64::from_le_bytes`
|
||||
+ `u64::from_ne_bytes`
|
||||
+ `u128::to_be_bytes`
|
||||
+ `u128::to_le_bytes`
|
||||
+ `u128::to_ne_bytes`
|
||||
+ `u128::from_be_bytes`
|
||||
+ `u128::from_le_bytes`
|
||||
+ `u128::from_ne_bytes`
|
||||
+ `usize::to_be_bytes`
|
||||
+ `usize::to_le_bytes`
|
||||
+ `usize::to_ne_bytes`
|
||||
+ `usize::from_be_bytes`
|
||||
+ `usize::from_le_bytes`
|
||||
+ `usize::from_ne_bytes`
|
||||
- Cargo
|
||||
+ You can now run `cargo c` as an alias for `cargo check`.][cargo/6218]
|
||||
+ Usernames are now allowed in alt registry URLs.][cargo/6242]
|
||||
- Misc
|
||||
+ `libproc_macro` has been added to the `rust-src` distribution.
|
||||
- Compatibility Notes
|
||||
+ The argument types for AVX's
|
||||
`_mm256_stream_si256`, `_mm256_stream_pd`, `_mm256_stream_ps` have
|
||||
been changed from `*const` to `*mut` as the previous implementation
|
||||
was unsound.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 5 10:51:54 UTC 2019 - Luke Jones <jones_ld@protonmail.com>
|
||||
|
||||
|
142
rust.spec
142
rust.spec
@ -2,7 +2,7 @@
|
||||
# spec file for package rust
|
||||
#
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2018 Luke Jones, jones_ld@protonmail.com
|
||||
# Copyright (c) 2019 Luke Jones, jones_ld@protonmail.com
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -13,11 +13,11 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%global prev_rust 1.30.1
|
||||
%global prev_rust 1.32.0
|
||||
# some sub-packages are versioned independantly
|
||||
%global rustfmt_version 1.0.0
|
||||
%global rls_version 1.31.6
|
||||
@ -47,29 +47,44 @@
|
||||
%global rust_triple %{rust_arch}-unknown-linux-%{abi}
|
||||
# All sources and bootstraps are fetched form here
|
||||
%global dl_url https://static.rust-lang.org/dist
|
||||
|
||||
# Rust doesn't function well when put in /usr/lib64
|
||||
%global common_libdir %{_prefix}/lib
|
||||
%global rustlibdir %{common_libdir}/rustlib
|
||||
|
||||
# Will build with distro LLVM by default, but the following
|
||||
# versions do not have a version new enough, >= 6.0
|
||||
# add --without bundled_llvm option, i.e. enable bundled_llvm by default
|
||||
# Leap 15.0, SLE 15
|
||||
%if 0%{?sle_version} == 150000
|
||||
%bcond_without bundled_llvm
|
||||
%endif
|
||||
# Leap 42 to 42.3, SLE12 SP1 to SLE12 SP3
|
||||
%if 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 120400
|
||||
%bcond_without bundled_llvm
|
||||
%endif
|
||||
|
||||
# enable the --with-rust_bootstrap flag
|
||||
%bcond_with rust_bootstrap
|
||||
|
||||
# Debuginfo can exhaust memory on these architecture workers
|
||||
%ifarch %{arm} %{ix86}
|
||||
%define codegen_units --set rust.codegen-units=2
|
||||
%define debug_info --disable-debuginfo --disable-debuginfo-only-std --disable-debuginfo-tools --disable-debuginfo-lines
|
||||
%else
|
||||
%define codegen_units --set rust.codegen-units=0
|
||||
%define debug_info --enable-debuginfo --disable-debuginfo-only-std --enable-debuginfo-tools --disable-debuginfo-lines
|
||||
%endif
|
||||
# Use hardening ldflags.
|
||||
%global rustflags -Clink-arg=-Wl,-z,relro,-z,now
|
||||
# We occasionally need to bootstrap builds due to breakage etc. Rust only guarantees
|
||||
# v-1 will build v
|
||||
# %bcond_with rust_bootstrap
|
||||
# Temporarily set the bootstrap flag in the spec so rings will build without intervention
|
||||
%bcond_with rust_bootstrap
|
||||
# Distro LLVM should be sufficient, this also cuts compile times byu almost half
|
||||
%if 0%{?suse_version} <= 1315
|
||||
%bcond_without bundled_llvm
|
||||
%else
|
||||
%bcond_with bundled_llvm
|
||||
%endif
|
||||
|
||||
Name: rust
|
||||
Version: 1.31.1
|
||||
Version: 1.32.0
|
||||
Release: 0
|
||||
Summary: A systems programming language
|
||||
License: MIT OR Apache-2.0
|
||||
Group: Development/Languages/Rust
|
||||
URL: https://www.rust-lang.org
|
||||
Url: https://www.rust-lang.org
|
||||
Source0: %{dl_url}/rustc-%{version}-src.tar.xz
|
||||
Source99: %{name}-rpmlintrc
|
||||
Source100: %{dl_url}/rust-%{prev_rust}-x86_64-unknown-linux-gnu.tar.xz
|
||||
@ -82,7 +97,14 @@ Source106: %{dl_url}/rust-%{prev_rust}-powerpc64le-unknown-linux-gnu.tar.xz
|
||||
Source107: %{dl_url}/rust-%{prev_rust}-s390x-unknown-linux-gnu.tar.xz
|
||||
# PATCH-FIX-OPENSUSE: edit src/librustc_llvm/build.rs to ignore GCC incompatible flag
|
||||
Patch0: ignore-Wstring-conversion.patch
|
||||
# Leap 42 to 42.3, SLE12 SP1, SP2
|
||||
%if 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 120200
|
||||
# In these distros cmake is 2.x, so we need cmake3 for building llvm.
|
||||
BuildRequires: cmake3
|
||||
%else
|
||||
# cmake got upgraded to 3.5 in SLE-12 SP2
|
||||
BuildRequires: cmake
|
||||
%endif
|
||||
BuildRequires: curl
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
@ -91,8 +113,13 @@ BuildRequires: pkgconfig
|
||||
BuildRequires: procps
|
||||
BuildRequires: python3-base
|
||||
BuildRequires: pkgconfig(libcurl)
|
||||
# The following requires must mirror:
|
||||
# LIBGIT2_SYS_USE_PKG_CONFIG &&
|
||||
# LIBSSH2_SYS_USE_PKG_CONFIG
|
||||
%if !%with rust_bootstrap || 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 120400
|
||||
BuildRequires: pkgconfig(libgit2) >= 0.23
|
||||
BuildRequires: pkgconfig(libssh2) >= 1.4.3
|
||||
%endif
|
||||
BuildRequires: pkgconfig(openssl)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
# The compiler is not generally useful without the std library installed
|
||||
@ -108,11 +135,11 @@ ExclusiveArch: x86_64 %{arm} aarch64 ppc64 ppc64le s390x %{ix86}
|
||||
%ifarch %{ix86}
|
||||
ExclusiveArch: i686
|
||||
%endif
|
||||
%if %{without bundled_llvm}
|
||||
# LLVM gives incorrect C++ flags for GCC
|
||||
BuildRequires: llvm-devel >= 5.0
|
||||
# Real LLVM minimum version should be 7.x, but rust has a fallback mode
|
||||
%if !%with bundled_llvm
|
||||
BuildRequires: llvm-devel >= 7.0
|
||||
%endif
|
||||
%if %{without rust_bootstrap}
|
||||
%if !%with rust_bootstrap
|
||||
# We will now package cargo using the version number of rustc since
|
||||
# it is being built from rust sources. Old cargo packages have a 0.x number
|
||||
BuildRequires: cargo <= %{version}
|
||||
@ -325,7 +352,7 @@ rm -rf src/tools/clang
|
||||
rm -rf src/tools/lld
|
||||
rm -rf src/tools/lldb
|
||||
|
||||
%if %without bundled_llvm
|
||||
%if !%with bundled_llvm
|
||||
rm -rf src/llvm/
|
||||
%endif
|
||||
|
||||
@ -336,11 +363,10 @@ sed -e '/*\//q' src/libbacktrace/backtrace.h \
|
||||
# The configure macro will modify some autoconf-related files, which upsets
|
||||
# cargo when it tries to verify checksums in those files. If we just truncate
|
||||
# that file list, cargo won't have anything to complain about.
|
||||
find src/vendor -name .cargo-checksum.json \
|
||||
find vendor -name .cargo-checksum.json \
|
||||
-exec sed -i.uncheck -e 's/"files":{[^}]*}/"files":{ }/' '{}' '+'
|
||||
|
||||
# Fix rpmlint error "This script uses 'env' as an interpreter"
|
||||
sed -i '1s|#!%{_bindir}/env python|#!%{_bindir}/python3|' src/jemalloc/scripts/gen_travis.py
|
||||
sed -i '1s|#!%{_bindir}/env python|#!%{_bindir}/python3|' src/libcore/unicode/unicode.py
|
||||
find src/libcompiler_builtins/compiler-rt/lib/ -name '*.py' \
|
||||
-exec sed -i -e '1s|#!%{_bindir}/env python|#!%{_bindir}/python3|' '{}' '+'
|
||||
@ -353,52 +379,72 @@ sed -i '1s|^|#!/bin/bash\n|' src/liblibc/ci/emscripten-entry.sh
|
||||
sed -i '1s|^|#!/bin/bash\n|' src/stdsimd/ci/run-docker.sh
|
||||
|
||||
%build
|
||||
# This should eventually migrate to distro policy
|
||||
# Enable optimization, debuginfo, and link hardening.
|
||||
export RUSTFLAGS="%{rustflags}"
|
||||
# Cargo use system libs
|
||||
export LIBGIT2_SYS_USE_PKG_CONFIG=1
|
||||
export LIBSSH2_SYS_USE_PKG_CONFIG=1
|
||||
|
||||
# Debuginfo can exhaust memory on these architecture workers
|
||||
%ifarch %{arm} %{ix86}
|
||||
%define codegen_units --set codegen-units=4
|
||||
%define debug_info --disable-debuginfo --enable-debuginfo-only-std --disable-debuginfo-tools --disable-debuginfo-lines
|
||||
%else
|
||||
%define debug_info --enable-debuginfo --disable-debuginfo-only-std --enable-debuginfo-tools --disable-debuginfo-lines
|
||||
%endif
|
||||
|
||||
%configure \
|
||||
--disable-option-checking \
|
||||
--build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple} \
|
||||
--enable-local-rust \
|
||||
--local-rust-root=%{rust_root} \
|
||||
--libdir=%{common_libdir} \
|
||||
--docdir=%{_docdir}/%{name} \
|
||||
%{!?with_bundled_llvm: --llvm-root=%{_prefix} --enable-llvm-link-shared} \
|
||||
%{!?with_bundled_llvm: --llvm-root=%{_prefix} --enable-llvm-link-shared --set llvm.link-jobs=1} \
|
||||
--disable-codegen-tests \
|
||||
--enable-optimize \
|
||||
--enable-docs \
|
||||
--enable-verbose-tests \
|
||||
--disable-jemalloc \
|
||||
--disable-rpath \
|
||||
%{debug_info} \
|
||||
%{codegen_units} \
|
||||
--enable-extended \
|
||||
--enable-vendor \
|
||||
--release-channel="stable"
|
||||
|
||||
export CPPFLAGS="%{optflags}" # eliminate complain from RPMlint
|
||||
# Sometimes we may be rebuilding with the same compiler,
|
||||
# setting local-rebuild will skip stage0 build, reducing build time
|
||||
if [ $(%{rust_root}/bin/rustc --version | sed -En 's/rustc ([0-9].[0-9][0-9].[0-9]).*/\1/p') = '%{version}' ]; then
|
||||
sed -i -e "s|#local-rebuild = false|local-rebuild = true|" config.toml;
|
||||
fi
|
||||
|
||||
# We need less codegen units for these arches since the workers are running out of memory
|
||||
# This means we must apply a minimum of 2 CPUs to a worker in constraints.
|
||||
%ifarch %{arm} %{ix86}
|
||||
sed -i -e "s|#codegen-units = 1|codegen-units = 2|" config.toml
|
||||
# BEGIN EXPORTS
|
||||
# Keep all the "export VARIABLE" together here, so they can be
|
||||
# cut&pasted to the %install section below. And please keep them
|
||||
# in sync!
|
||||
# If the environments between build and install and different,
|
||||
# everything will be rebuilt during installation!
|
||||
export RUSTFLAGS="%{rustflags}"
|
||||
# Cargo use system libs if not bootstrapping
|
||||
# restircted only to libgit due to version changes causing with cargo rpm deps
|
||||
%if !%with rust_bootstrap || 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 120400
|
||||
export LIBGIT2_SYS_USE_PKG_CONFIG=1
|
||||
export LIBSSH2_SYS_USE_PKG_CONFIG=1
|
||||
%endif
|
||||
# eliminate complain from RPMlint
|
||||
export CPPFLAGS="%{optflags}"
|
||||
# END EXPORTS
|
||||
|
||||
./x.py build
|
||||
./x.py doc
|
||||
./x.py build -v
|
||||
./x.py doc -v
|
||||
|
||||
%install
|
||||
DESTDIR=%{buildroot} python3 ./x.py install
|
||||
DESTDIR=%{buildroot} python3 ./x.py install src
|
||||
# BEGIN EXPORTS
|
||||
# Keep all the "export VARIABLE" together here, so they can be
|
||||
# cut&pasted to the %install section below. And please keep them
|
||||
# in sync!
|
||||
# If the environments between build and install and different,
|
||||
# everything will be rebuilt during installation!
|
||||
export RUSTFLAGS="%{rustflags}"
|
||||
# Cargo use system libs if not bootstrapping
|
||||
# restircted only to libgit due to version changes causing with cargo rpm deps
|
||||
%if !%with rust_bootstrap || 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 120400
|
||||
export LIBGIT2_SYS_USE_PKG_CONFIG=1
|
||||
export LIBSSH2_SYS_USE_PKG_CONFIG=1
|
||||
%endif
|
||||
# eliminate complain from RPMlint
|
||||
export CPPFLAGS="%{optflags}"
|
||||
# END EXPORTS
|
||||
|
||||
DESTDIR=%{buildroot} ./x.py install
|
||||
DESTDIR=%{buildroot} ./x.py install src
|
||||
|
||||
# Remove executable permission from HTML documentation
|
||||
# to prevent RPMLINT errors.
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b38f6a1b5e12619f242e44ea494d177c72fd1f80160386b2e69b69446685fcfa
|
||||
size 96915864
|
3
rustc-1.32.0-src.tar.xz
Normal file
3
rustc-1.32.0-src.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d617a7dc39daaafa8256320991005fc376c8ef2080593918301b24466d0067af
|
||||
size 99602696
|
Loading…
Reference in New Issue
Block a user