diff --git a/.gitignore b/.gitignore index 79513a6..8c72c59 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/rustc-1.64.0-src.tar.xz +SOURCES/rustc-1.63.0-src.tar.xz SOURCES/wasi-libc-9886d3d6200fcc3726329966860fc058707406cd.tar.gz diff --git a/.rust.metadata b/.rust.metadata index d1d92bc..8a3fcf1 100644 --- a/.rust.metadata +++ b/.rust.metadata @@ -1,2 +1,2 @@ -83391c9ba7e69158036afb15fcfd8d24198e98ce SOURCES/rustc-1.64.0-src.tar.xz +5ed1642e20caea5d5b0f39a03bf4cd334d152f23 SOURCES/rustc-1.63.0-src.tar.xz 22625595caa645e86282b79b5564abb40250d244 SOURCES/wasi-libc-9886d3d6200fcc3726329966860fc058707406cd.tar.gz diff --git a/SOURCES/0001-rustc_transmute-fix-big-endian-discriminants.patch b/SOURCES/0001-rustc_transmute-fix-big-endian-discriminants.patch deleted file mode 100644 index 372852d..0000000 --- a/SOURCES/0001-rustc_transmute-fix-big-endian-discriminants.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 2946828fcb8e2e68a16839dfcf4319bf119f8acd Mon Sep 17 00:00:00 2001 -From: Josh Stone -Date: Tue, 20 Sep 2022 13:03:43 -0700 -Subject: [PATCH] rustc_transmute: fix big-endian discriminants - -(cherry picked from commit a72666ed56ec5f1b6d254c7020cf86143edc6dbd) ---- - compiler/rustc_transmute/src/layout/tree.rs | 22 +++++++++++++++------ - 1 file changed, 16 insertions(+), 6 deletions(-) - -diff --git a/compiler/rustc_transmute/src/layout/tree.rs b/compiler/rustc_transmute/src/layout/tree.rs -index 70b3ba02b05b..e4fcde35ed37 100644 ---- a/compiler/rustc_transmute/src/layout/tree.rs -+++ b/compiler/rustc_transmute/src/layout/tree.rs -@@ -402,7 +402,7 @@ fn from_repr_c_variant( - .unwrap(); - tracing::trace!(?discr_layout, "computed discriminant layout"); - variant_layout = variant_layout.extend(discr_layout).unwrap().0; -- tree = tree.then(Self::from_disr(discr, tcx, layout_summary.discriminant_size)); -+ tree = tree.then(Self::from_discr(discr, tcx, layout_summary.discriminant_size)); - } - - // Next come fields. -@@ -442,11 +442,21 @@ fn from_repr_c_variant( - Ok(tree) - } - -- pub fn from_disr(discr: Discr<'tcx>, tcx: TyCtxt<'tcx>, size: usize) -> Self { -- // FIXME(@jswrenn): I'm certain this is missing needed endian nuance. -- let bytes = discr.val.to_ne_bytes(); -- let bytes = &bytes[..size]; -- Self::Seq(bytes.into_iter().copied().map(|b| Self::from_bits(b)).collect()) -+ pub fn from_discr(discr: Discr<'tcx>, tcx: TyCtxt<'tcx>, size: usize) -> Self { -+ use rustc_target::abi::Endian; -+ -+ let bytes: [u8; 16]; -+ let bytes = match tcx.data_layout.endian { -+ Endian::Little => { -+ bytes = discr.val.to_le_bytes(); -+ &bytes[..size] -+ } -+ Endian::Big => { -+ bytes = discr.val.to_be_bytes(); -+ &bytes[bytes.len() - size..] -+ } -+ }; -+ Self::Seq(bytes.iter().map(|&b| Self::from_bits(b)).collect()) - } - } - --- -2.37.3 - diff --git a/SOURCES/rustc-1.64.0-no-default-pie.patch b/SOURCES/rustc-1.58.0-no-default-pie.patch similarity index 90% rename from SOURCES/rustc-1.64.0-no-default-pie.patch rename to SOURCES/rustc-1.58.0-no-default-pie.patch index c9dd827..67fb0c6 100644 --- a/SOURCES/rustc-1.64.0-no-default-pie.patch +++ b/SOURCES/rustc-1.58.0-no-default-pie.patch @@ -1,8 +1,8 @@ diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs -index 63207803e327..f5757760c409 100644 +index 638b2a7b5a9f..79d4ecf4cb91 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs -@@ -741,7 +741,7 @@ fn link_natively<'a>( +@@ -763,7 +763,7 @@ fn link_natively<'a, B: ArchiveBuilder<'a>>( && cmd.get_args().iter().any(|e| e.to_string_lossy() == "-no-pie") { info!("linker output: {:?}", out); @@ -11,7 +11,7 @@ index 63207803e327..f5757760c409 100644 for arg in cmd.take_args() { if arg.to_string_lossy() != "-no-pie" { cmd.arg(arg); -@@ -760,7 +760,7 @@ fn link_natively<'a>( +@@ -782,7 +782,7 @@ fn link_natively<'a, B: ArchiveBuilder<'a>>( && cmd.get_args().iter().any(|e| e.to_string_lossy() == "-static-pie") { info!("linker output: {:?}", out); @@ -20,13 +20,12 @@ index 63207803e327..f5757760c409 100644 "Linker does not support -static-pie command line option. Retrying with -static instead." ); // Mirror `add_(pre,post)_link_objects` to replace CRT objects. -@@ -1507,15 +1507,15 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +@@ -1507,15 +1507,14 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { } fn link_output_kind(sess: &Session, crate_type: CrateType) -> LinkOutputKind { - let kind = match (crate_type, sess.crt_static(Some(crate_type)), sess.relocation_model()) { + // Only use PIE if explicitly specified. -+ #[cfg_attr(not(bootstrap), allow(rustc::bad_opt_access))] + let explicit_pic = + matches!(sess.opts.cg.relocation_model, Some(RelocModel::Pic | RelocModel::Pie)); + let kind = match (crate_type, sess.crt_static(Some(crate_type)), explicit_pic) { diff --git a/SPECS/rust.spec b/SPECS/rust.spec index 5240075..bd1e8cd 100644 --- a/SPECS/rust.spec +++ b/SPECS/rust.spec @@ -8,9 +8,9 @@ # To bootstrap from scratch, set the channel and date from src/stage0.json # e.g. 1.59.0 wants rustc: 1.58.0-2022-01-13 # or nightly wants some beta-YYYY-MM-DD -%global bootstrap_version 1.63.0 -%global bootstrap_channel 1.63.0 -%global bootstrap_date 2022-08-11 +%global bootstrap_version 1.62.0 +%global bootstrap_channel 1.62.0 +%global bootstrap_date 2022-06-30 # Only the specified arches will use bootstrap binaries. # NOTE: Those binaries used to be uploaded with every new release, but that was @@ -50,7 +50,7 @@ # We can also choose to just use Rust's bundled LLVM, in case the system LLVM # is insufficient. Rust currently requires LLVM 12.0+. %global min_llvm_version 12.0.0 -%global bundled_llvm_version 14.0.6 +%global bundled_llvm_version 14.0.5 %bcond_with bundled_llvm # Requires stable libgit2 1.4, and not the next minor soname change. @@ -87,7 +87,7 @@ %endif Name: rust -Version: 1.64.0 +Version: 1.63.0 Release: 1%{?dist} Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) @@ -110,9 +110,6 @@ Patch1: 0001-Use-lld-provided-by-system-for-wasm.patch # Set a substitute-path in rust-gdb for standard library sources. Patch2: rustc-1.61.0-rust-gdb-substitute-path.patch -# https://github.com/rust-lang/rust/pull/102076 -Patch3: 0001-rustc_transmute-fix-big-endian-discriminants.patch - ### RHEL-specific patches below ### # Simple rpm macros for rust-toolset (as opposed to full rust-packaging) @@ -127,7 +124,7 @@ Patch101: rustc-1.63.0-disable-http2.patch # kernel rh1410097 causes too-small stacks for PIE. # (affects RHEL6 kernels when building for RHEL7) -Patch102: rustc-1.64.0-no-default-pie.patch +Patch102: rustc-1.58.0-no-default-pie.patch # Get the Rust triple for any arch. @@ -494,7 +491,7 @@ A tool for formatting Rust code according to style guidelines. %package -n rls -Summary: Rust Language Server for IDE integration (deprecated) +Summary: Rust Language Server for IDE integration %if %with bundled_libgit2 Provides: bundled(libgit2) = %{bundled_libgit2_version} %endif @@ -509,17 +506,8 @@ Provides: rls-preview = %{version}-%{release} %description -n rls The Rust Language Server provides a server that runs in the background, providing IDEs, editors, and other tools with information about Rust programs. -RLS is being deprecated in favor of rust-analyzer, and may be removed in the future. -https://blog.rust-lang.org/2022/07/01/RLS-deprecation.html - - -%package analyzer -Summary: Rust implementation of the Language Server Protocol - -%description analyzer -rust-analyzer is an implementation of Language Server Protocol for the Rust -programming language. It provides features like completion and goto definition -for many code editors, including VS Code, Emacs and Vim. +It supports functionality such as 'goto definition', symbol search, +reformatting, and code completion, and enables renaming and refactorings. %package -n clippy @@ -591,7 +579,6 @@ test -f '%{local_rust_root}/bin/rustc' %patch1 -p1 %patch2 -p1 -%patch3 -p1 %if %with disabled_libssh2 %patch100 -p1 @@ -754,7 +741,7 @@ end} %{enable_debuginfo} \ --set rust.codegen-units-std=1 \ --enable-extended \ - --tools=analysis,cargo,clippy,rls,rust-analyzer,rustfmt,src \ + --tools=analysis,cargo,clippy,rls,rustfmt,src \ --enable-vendor \ --enable-verbose-tests \ --dist-compression-formats=gz \ @@ -794,15 +781,15 @@ find %{buildroot}%{_libdir} -maxdepth 1 -type f -name '*.so' \ # The libdir libraries are identical to those under rustlib/. It's easier on # library loading if we keep them in libdir, but we do need them in rustlib/ # to support dynamic linking for compiler plugins, so we'll symlink. -find %{buildroot}%{rustlibdir}/%{rust_triple}/lib/ -maxdepth 1 -type f -name '*.so' | -while read lib; do - lib2="%{buildroot}%{_libdir}/${lib##*/}" - if [ -f "$lib2" ]; then - # make sure they're actually identical! - cmp "$lib" "$lib2" - ln -v -f -r -s -T "$lib2" "$lib" - fi -done +(cd "%{buildroot}%{rustlibdir}/%{rust_triple}/lib" && + find ../../../../%{_lib} -maxdepth 1 -name '*.so' | + while read lib; do + if [ -f "${lib##*/}" ]; then + # make sure they're actually identical! + cmp "$lib" "${lib##*/}" + ln -v -f -s -t . "$lib" + fi + done) # Remove installer artifacts (manifests, uninstall scripts, etc.) find %{buildroot}%{rustlibdir} -maxdepth 1 -type f -exec rm -v '{}' '+' @@ -881,8 +868,6 @@ rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/" env RLS_TEST_WAIT_FOR_AGES=1 \ %{__python3} ./x.py test --no-fail-fast --stage 2 rls || : -%{__python3} ./x.py test --no-fail-fast --stage 2 rust-analyzer || : - %{__python3} ./x.py test --no-fail-fast --stage 2 rustfmt || : @@ -895,7 +880,6 @@ env RLS_TEST_WAIT_FOR_AGES=1 \ %{_bindir}/rustc %{_bindir}/rustdoc %{_libdir}/*.so -%{_libexecdir}/rust-analyzer-proc-macro-srv %{_mandir}/man1/rustc.1* %{_mandir}/man1/rustdoc.1* %dir %{rustlibdir} @@ -1030,12 +1014,6 @@ end} %license src/tools/rls/LICENSE-{APACHE,MIT} -%files analyzer -%{_bindir}/rust-analyzer -%doc src/tools/rust-analyzer/README.md -%license src/tools/rust-analyzer/LICENSE-{APACHE,MIT} - - %files -n clippy %{_bindir}/cargo-clippy %{_bindir}/clippy-driver @@ -1059,10 +1037,6 @@ end} %changelog -* Thu Sep 22 2022 Josh Stone - 1.64.0-1 -- Update to 1.64.0. -- Add rust-analyzer. - * Wed Sep 07 2022 Josh Stone - 1.63.0-1 - Update to 1.63.0.