diff --git a/0004-rustc-1.68.0-disable-http2.patch b/0004-rustc-1.69.0-disable-http2.patch similarity index 74% rename from 0004-rustc-1.68.0-disable-http2.patch rename to 0004-rustc-1.69.0-disable-http2.patch index 09c433930cef8da13808eacdc40e3aee0acc59dc..09e7930e2e77a1d3b56e5023f2e0ef9884097562 100644 --- a/0004-rustc-1.68.0-disable-http2.patch +++ b/0004-rustc-1.69.0-disable-http2.patch @@ -1,6 +1,6 @@ ---- rustc-beta-src/Cargo.lock.orig 2023-03-03 17:26:41.309081970 -0800 -+++ rustc-beta-src/Cargo.lock 2023-03-03 17:26:41.311081929 -0800 -@@ -1152,7 +1152,6 @@ +--- rustc-beta-src/Cargo.lock.orig 2023-03-23 17:10:30.810989345 -0700 ++++ rustc-beta-src/Cargo.lock 2023-03-23 17:10:30.812989303 -0700 +@@ -1142,7 +1142,6 @@ dependencies = [ "cc", "libc", @@ -8,7 +8,7 @@ "libz-sys", "openssl-sys", "pkg-config", -@@ -2399,16 +2398,6 @@ +@@ -2375,16 +2374,6 @@ checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" [[package]] @@ -25,20 +25,20 @@ name = "libz-sys" version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" ---- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2023-03-03 17:26:41.311081929 -0800 -+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-03-03 17:27:32.999013773 -0800 -@@ -21,7 +21,7 @@ - cargo-platform = { path = "crates/cargo-platform", version = "0.1.2" } +--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2023-03-23 17:10:30.812989303 -0700 ++++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-03-23 17:11:26.242836664 -0700 +@@ -23,7 +23,7 @@ cargo-util = { path = "crates/cargo-util", version = "0.2.3" } - crates-io = { path = "crates/crates-io", version = "0.35.1" } + clap = "4.1.3" + crates-io = { path = "crates/crates-io", version = "0.36.0" } -curl = { version = "0.4.44", features = ["http2"] } +curl = { version = "0.4.44", features = [] } curl-sys = "0.4.59" env_logger = "0.10.0" - pretty_env_logger = { version = "0.4", optional = true } ---- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig 2023-02-26 19:02:38.000000000 -0800 -+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2023-03-03 17:26:41.311081929 -0800 -@@ -402,16 +402,9 @@ + filetime = "0.2.9" +--- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig 2023-03-19 00:20:55.000000000 -0700 ++++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2023-03-23 17:10:30.812989303 -0700 +@@ -401,16 +401,9 @@ sources: SourceMap<'cfg>, config: &'cfg Config, ) -> CargoResult> { @@ -58,8 +58,8 @@ Ok(PackageSet { packages: package_ids ---- rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs.orig 2023-02-26 19:02:38.000000000 -0800 -+++ rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs 2023-03-03 17:26:41.311081929 -0800 +--- rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs.orig 2023-03-19 00:20:55.000000000 -0700 ++++ rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs 2023-03-23 17:10:30.813989282 -0700 @@ -220,16 +220,8 @@ } self.fetch_started = true; @@ -79,8 +79,8 @@ self.config .shell() ---- rustc-beta-src/src/tools/cargo/src/cargo/util/network.rs.orig 2023-02-26 19:02:38.000000000 -0800 -+++ rustc-beta-src/src/tools/cargo/src/cargo/util/network.rs 2023-03-03 17:29:54.808076261 -0800 +--- rustc-beta-src/src/tools/cargo/src/cargo/util/network.rs.orig 2023-03-19 00:20:55.000000000 -0700 ++++ rustc-beta-src/src/tools/cargo/src/cargo/util/network.rs 2023-03-23 17:10:30.813989282 -0700 @@ -116,7 +116,7 @@ macro_rules! try_old_curl { ($e:expr, $msg:expr) => { diff --git a/0005-adjust-makefile-for-llvm16.patch b/0005-adjust-makefile-for-llvm16.patch deleted file mode 100644 index 3fce536392bd15ef4622e12c025b67d9e160e4ef..0000000000000000000000000000000000000000 --- a/0005-adjust-makefile-for-llvm16.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 7e43796197679151eb7c2d6ef590bd67fc1c6df8 Mon Sep 17 00:00:00 2001 -From: Mike Hommey -Date: Tue, 10 Jan 2023 09:09:14 +0900 -Subject: [PATCH] Adjust Makefile for LLVM trunk (16) as of 2023-01-05 - -https://github.com/llvm/llvm-project/commit/d227c3b68cf5c236902c9ff4fdf8b719c9a3dd26 -added __GCC_HAVE_SYNC_COMPARE_AND_SWAP macros. ---- - Makefile | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/Makefile b/Makefile -index 46229f93..27f6760f 100644 ---- a/Makefile -+++ b/Makefile -@@ -668,6 +668,7 @@ check-symbols: startup_files libc - @# TODO: Undefine __FLOAT128__ for now since it's not in clang 8.0. - @# TODO: Filter out __FLT16_* for now, as not all versions of clang have these. - @# TODO: Filter out __NO_MATH_ERRNO_ and a few __*WIDTH__ that are new to clang 14. -+ @# TODO: Filter out __GCC_HAVE_SYNC_COMPARE_AND_SWAP_* that are new to clang 16. - @# TODO: clang defined __FLT_EVAL_METHOD__ until clang 15, so we force-undefine it - @# for older versions. - @# TODO: Undefine __wasm_mutable_globals__ and __wasm_sign_ext__, that are new to -@@ -700,6 +701,7 @@ check-symbols: startup_files libc - | sed -e 's/__GNUC_VA_LIST $$/__GNUC_VA_LIST 1/' \ - | grep -v '^#define __FLT16_' \ - | grep -v '^#define __\(BOOL\|INT_\(LEAST\|FAST\)\(8\|16\|32\|64\)\|INT\|LONG\|LLONG\|SHRT\)_WIDTH__' \ -+ | grep -v '^#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_\(1\|2\|4\|8\)' \ - > "$(SYSROOT_SHARE)/predefined-macros.txt" - - # Check that the computed metadata matches the expected metadata. diff --git a/rust.spec b/rust.spec index 898ea7068f29e062b426cd7f496374a37b9b9cf2..46f781c95bad1f3e38b195cb376527055e8a351a 100644 --- a/rust.spec +++ b/rust.spec @@ -1,8 +1,8 @@ -%define anolis_release 3 +%define anolis_release 1 %global rust_arches x86_64 aarch64 %global channel stable -%global bootstrap_version 1.67.1 -%global bootstrap_date 2023-02-09 +%global bootstrap_version 1.68.2 +%global bootstrap_date 2023-03-28 %global __ranlib %{_bindir}/ranlib %global _privatelibs lib(.*-[[:xdigit:]]{16}*|rustc.*)[.]so.* %global __provides_exclude ^(%{_privatelibs})$ @@ -21,7 +21,7 @@ %global wasm_targets wasm32-unknown-unknown wasm32-wasi %endif -%global wasi_libc_source wasi-libc-wasi-sdk-19 +%global wasi_libc_source wasi-libc-1dfe5c302d1c5ab621f7abf04620fae92700fd22 %global wasi_libc_dir %{_builddir}/%{wasi_libc_source} %bcond_with bootstrap @@ -38,11 +38,11 @@ %global libssh2_version 1.6.0 %if %{without bootstrap} -%bcond_without llvm_has_filecheck +%bcond_with llvm_has_filecheck %endif Name: rust -Version: 1.68.2 +Version: 1.69.0 Release: %{anolis_release}%{?dist} Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) @@ -59,8 +59,7 @@ Source104: bootstrap Patch0001: 0001-Use-lld-provided-by-system-for-wasm.patch Patch0002: 0002-rustc-1.61.0-rust-gdb-substitute-path.patch Patch0003: 0003-rustc-1.65.0-disable-libssh2.patch -Patch0004: 0004-rustc-1.68.0-disable-http2.patch -Patch0005: 0005-adjust-makefile-for-llvm16.patch +Patch0004: 0004-rustc-1.69.0-disable-http2.patch ExclusiveArch: %{rust_arches} @@ -71,7 +70,7 @@ end} %global rust_triple %{lua: print(rust_triple(rpm.expand("%{_target_cpu}")))} BuildRequires: make gcc gcc-c++ autoconf automake gdb clang lld -BuildRequires: glibc-static llvm-devel +BuildRequires: glibc-static llvm15-devel BuildRequires: ncurses-devel curl-devel pkgconfig(libcurl) procps-ng BuildRequires: pkgconfig(liblzma) pkgconfig(openssl) pkgconfig(zlib) BuildRequires: python3 python3-rpm-macros procps-ng gdb @@ -91,14 +90,14 @@ BuildRequires: cmake3 >= 3.13.4 ninja-build Provides: bundled(%{name}-bootstrap) = %{bootstrap_version} Provides: bundled(llvm) = 15.0.6 %else -%global llvm_root %{_prefix} +%global llvm_root %{_libdir}/llvm15 %global local_rust_root %{_prefix} BuildRequires: cargo >= %{bootstrap_version} cmake >= 2.8.11 BuildRequires: (%{name} >= %{bootstrap_version} with %{name} <= %{version}) %endif %if %{with static} -BuildRequires: llvm-static libffi-devel +BuildRequires: llvm15-static libffi-devel %endif Requires: %{name}-std-static = %{EVR} /usr/bin/cc @@ -117,6 +116,10 @@ find '%{buildroot}%{rustlibdir}'/wasm*/lib -type f -regex '.*\\.\\(a\\|rlib\\)' %{nil} %endif +# This component was removed as of Rust 1.69.0. +# https://github.com/rust-lang/rust/pull/101841 +Obsoletes: %{name}-analysis < 1.69.0 + %description Rust is blazingly fast and memory-efficient: with no runtime or garbage collector, it can power performance-critical services, run on embedded devices, and easily @@ -193,15 +196,6 @@ BuildArch: noarch This package includes source files for the Rust standard library. It may be useful as a reference for code completion tools in various editors. -%package analysis -Summary: Compiler analysis data for the Rust standard library -Recommends: %{name}-std-static = %{EVR} - -%description analysis -This package contains analysis data files produced with rustc's -Zsave-analysis -feature for the Rust standard library. The RLS (Rust Language Server) uses this -data to provide information about the Rust standard library. - %package toolset Summary: Rust Toolset Requires: rust = %{EVR} cargo = %{EVR} @@ -277,7 +271,6 @@ test -f '%{local_rust_root}/bin/rustc' %if %{with wasm} %setup -q -n %{wasi_libc_source} -T -b 1 -%patch0005 -p1 %endif %setup -q -n rustc-%{version}-src @@ -383,7 +376,7 @@ fi --set rust.codegen-units-std=1 --set build.build-stage=2 \ --set build.doc-stage=2 --set build.install-stage=2 \ --set build.test-stage=2 --enable-extended \ - --tools=analysis,cargo,clippy,rls,rust-analyzer,rustfmt,src \ + --tools=cargo,clippy,rls,rust-analyzer,rustfmt,src \ --enable-vendor --enable-verbose-tests --dist-compression-formats=gz \ --disable-rpath --release-channel=%{channel}\ --release-description="Anolis %{anolis_ver} %{EVR}" @@ -533,9 +526,6 @@ done %dir %{rustlibdir} %{rustlibdir}/src -%files analysis -%{rustlibdir}/%{rust_triple}/analysis/ - %files toolset %{rpmmacrodir}/macros.rust-toolset @@ -580,6 +570,11 @@ done %doc src/tools/rust-analyzer/README.md %changelog +* Fri Apr 21 2023 Funda Wang - 1.69.0-1 +- New version 1.69.0 +- Build with llvm15 until llvm issue#61932 solved + (https://github.com/llvm/llvm-project/issues/61932) + * Tue Apr 18 2023 happy_orange - 1.68.2-3 - optimise spec file diff --git a/rustc-1.68.2-src.tar.xz b/rustc-1.69.0-src.tar.xz similarity index 80% rename from rustc-1.68.2-src.tar.xz rename to rustc-1.69.0-src.tar.xz index 0820ac571d1033de2ec830e5d7b7e228bcd73f3f..db6d9e32cf0a293e199f4b8502ea254878b06394 100644 Binary files a/rustc-1.68.2-src.tar.xz and b/rustc-1.69.0-src.tar.xz differ diff --git a/wasi-libc-1dfe5c302d1c5ab621f7abf04620fae92700fd22.tar.gz b/wasi-libc-1dfe5c302d1c5ab621f7abf04620fae92700fd22.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..6b8cab08c7be93a5940fce76052c42d31ffda101 Binary files /dev/null and b/wasi-libc-1dfe5c302d1c5ab621f7abf04620fae92700fd22.tar.gz differ diff --git a/wasi-libc-wasi-sdk-19.tar.gz b/wasi-libc-wasi-sdk-19.tar.gz deleted file mode 100644 index c419d8259ce1697a402e91c9bb4700b0981ee2c1..0000000000000000000000000000000000000000 Binary files a/wasi-libc-wasi-sdk-19.tar.gz and /dev/null differ