Update to 1.69.0.
Resolves: rhbz#2191741
This commit is contained in:
parent
6f2fca565a
commit
d2ebf73bdc
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@ SOURCES/wasi-libc-wasi-sdk-17.tar.gz
|
|||||||
/rustc-1.67.1-src.tar.xz
|
/rustc-1.67.1-src.tar.xz
|
||||||
/wasi-libc-1dfe5c302d1c5ab621f7abf04620fae92700fd22.tar.gz
|
/wasi-libc-1dfe5c302d1c5ab621f7abf04620fae92700fd22.tar.gz
|
||||||
/rustc-1.68.2-src.tar.xz
|
/rustc-1.68.2-src.tar.xz
|
||||||
|
/rustc-1.69.0-src.tar.xz
|
||||||
|
254
0001-debuginfo-split-method-declaration-and-definition.patch
Normal file
254
0001-debuginfo-split-method-declaration-and-definition.patch
Normal file
@ -0,0 +1,254 @@
|
|||||||
|
From 1476ebe761884e0cfc92f3f16809011663eb33f0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Josh Stone <jistone@redhat.com>
|
||||||
|
Date: Wed, 3 May 2023 15:52:31 -0700
|
||||||
|
Subject: [PATCH] debuginfo: split method declaration and definition
|
||||||
|
|
||||||
|
When we're adding a method to a type DIE, we only want a DW_AT_declaration
|
||||||
|
there, because LLVM LTO can't unify type definitions when a child DIE is a
|
||||||
|
full subprogram definition. Now the subprogram definition gets added at the
|
||||||
|
CU level with a specification link back to the abstract declaration.
|
||||||
|
|
||||||
|
(cherry picked from commit 10b69dde3fd15334ea2382d2dc9e9a261de1afaf)
|
||||||
|
---
|
||||||
|
.../rustc_codegen_llvm/src/debuginfo/mod.rs | 86 +++++++++++--------
|
||||||
|
compiler/rustc_codegen_llvm/src/llvm/ffi.rs | 15 ++++
|
||||||
|
.../rustc_llvm/llvm-wrapper/RustWrapper.cpp | 22 +++++
|
||||||
|
.../issue-109934-lto-debuginfo/Makefile | 12 +++
|
||||||
|
.../issue-109934-lto-debuginfo/lib.rs | 9 ++
|
||||||
|
5 files changed, 110 insertions(+), 34 deletions(-)
|
||||||
|
create mode 100644 tests/run-make-fulldeps/issue-109934-lto-debuginfo/Makefile
|
||||||
|
create mode 100644 tests/run-make-fulldeps/issue-109934-lto-debuginfo/lib.rs
|
||||||
|
|
||||||
|
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs b/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs
|
||||||
|
index 5392534cfcb7..11426b150b6c 100644
|
||||||
|
--- a/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs
|
||||||
|
+++ b/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs
|
||||||
|
@@ -322,7 +322,7 @@ fn dbg_scope_fn(
|
||||||
|
let tcx = self.tcx;
|
||||||
|
|
||||||
|
let def_id = instance.def_id();
|
||||||
|
- let containing_scope = get_containing_scope(self, instance);
|
||||||
|
+ let (containing_scope, is_method) = get_containing_scope(self, instance);
|
||||||
|
let span = tcx.def_span(def_id);
|
||||||
|
let loc = self.lookup_debug_loc(span.lo());
|
||||||
|
let file_metadata = file_metadata(self, &loc.file);
|
||||||
|
@@ -378,8 +378,29 @@ fn dbg_scope_fn(
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- unsafe {
|
||||||
|
- return llvm::LLVMRustDIBuilderCreateFunction(
|
||||||
|
+ // When we're adding a method to a type DIE, we only want a DW_AT_declaration there, because
|
||||||
|
+ // LLVM LTO can't unify type definitions when a child DIE is a full subprogram definition.
|
||||||
|
+ // When we use this `decl` below, the subprogram definition gets created at the CU level
|
||||||
|
+ // with a DW_AT_specification pointing back to the type's declaration.
|
||||||
|
+ let decl = is_method.then(|| unsafe {
|
||||||
|
+ llvm::LLVMRustDIBuilderCreateMethod(
|
||||||
|
+ DIB(self),
|
||||||
|
+ containing_scope,
|
||||||
|
+ name.as_ptr().cast(),
|
||||||
|
+ name.len(),
|
||||||
|
+ linkage_name.as_ptr().cast(),
|
||||||
|
+ linkage_name.len(),
|
||||||
|
+ file_metadata,
|
||||||
|
+ loc.line,
|
||||||
|
+ function_type_metadata,
|
||||||
|
+ flags,
|
||||||
|
+ spflags & !DISPFlags::SPFlagDefinition,
|
||||||
|
+ template_parameters,
|
||||||
|
+ )
|
||||||
|
+ });
|
||||||
|
+
|
||||||
|
+ return unsafe {
|
||||||
|
+ llvm::LLVMRustDIBuilderCreateFunction(
|
||||||
|
DIB(self),
|
||||||
|
containing_scope,
|
||||||
|
name.as_ptr().cast(),
|
||||||
|
@@ -394,9 +415,9 @@ fn dbg_scope_fn(
|
||||||
|
spflags,
|
||||||
|
maybe_definition_llfn,
|
||||||
|
template_parameters,
|
||||||
|
- None,
|
||||||
|
- );
|
||||||
|
- }
|
||||||
|
+ decl,
|
||||||
|
+ )
|
||||||
|
+ };
|
||||||
|
|
||||||
|
fn get_function_signature<'ll, 'tcx>(
|
||||||
|
cx: &CodegenCx<'ll, 'tcx>,
|
||||||
|
@@ -495,14 +516,16 @@ fn get_parameter_names(cx: &CodegenCx<'_, '_>, generics: &ty::Generics) -> Vec<S
|
||||||
|
names
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /// Returns a scope, plus `true` if that's a type scope for "class" methods,
|
||||||
|
+ /// otherwise `false` for plain namespace scopes.
|
||||||
|
fn get_containing_scope<'ll, 'tcx>(
|
||||||
|
cx: &CodegenCx<'ll, 'tcx>,
|
||||||
|
instance: Instance<'tcx>,
|
||||||
|
- ) -> &'ll DIScope {
|
||||||
|
+ ) -> (&'ll DIScope, bool) {
|
||||||
|
// First, let's see if this is a method within an inherent impl. Because
|
||||||
|
// if yes, we want to make the result subroutine DIE a child of the
|
||||||
|
// subroutine's self-type.
|
||||||
|
- let self_type = cx.tcx.impl_of_method(instance.def_id()).and_then(|impl_def_id| {
|
||||||
|
+ if let Some(impl_def_id) = cx.tcx.impl_of_method(instance.def_id()) {
|
||||||
|
// If the method does *not* belong to a trait, proceed
|
||||||
|
if cx.tcx.trait_id_of_impl(impl_def_id).is_none() {
|
||||||
|
let impl_self_ty = cx.tcx.subst_and_normalize_erasing_regions(
|
||||||
|
@@ -513,39 +536,34 @@ fn get_containing_scope<'ll, 'tcx>(
|
||||||
|
|
||||||
|
// Only "class" methods are generally understood by LLVM,
|
||||||
|
// so avoid methods on other types (e.g., `<*mut T>::null`).
|
||||||
|
- match impl_self_ty.kind() {
|
||||||
|
- ty::Adt(def, ..) if !def.is_box() => {
|
||||||
|
- // Again, only create type information if full debuginfo is enabled
|
||||||
|
- if cx.sess().opts.debuginfo == DebugInfo::Full
|
||||||
|
- && !impl_self_ty.needs_subst()
|
||||||
|
- {
|
||||||
|
- Some(type_di_node(cx, impl_self_ty))
|
||||||
|
- } else {
|
||||||
|
- Some(namespace::item_namespace(cx, def.did()))
|
||||||
|
- }
|
||||||
|
+ if let ty::Adt(def, ..) = impl_self_ty.kind() && !def.is_box() {
|
||||||
|
+ // Again, only create type information if full debuginfo is enabled
|
||||||
|
+ if cx.sess().opts.debuginfo == DebugInfo::Full
|
||||||
|
+ && !impl_self_ty.needs_subst()
|
||||||
|
+ {
|
||||||
|
+ return (type_di_node(cx, impl_self_ty), true);
|
||||||
|
+ } else {
|
||||||
|
+ return (namespace::item_namespace(cx, def.did()), false);
|
||||||
|
}
|
||||||
|
- _ => None,
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// For trait method impls we still use the "parallel namespace"
|
||||||
|
// strategy
|
||||||
|
- None
|
||||||
|
}
|
||||||
|
- });
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- self_type.unwrap_or_else(|| {
|
||||||
|
- namespace::item_namespace(
|
||||||
|
- cx,
|
||||||
|
- DefId {
|
||||||
|
- krate: instance.def_id().krate,
|
||||||
|
- index: cx
|
||||||
|
- .tcx
|
||||||
|
- .def_key(instance.def_id())
|
||||||
|
- .parent
|
||||||
|
- .expect("get_containing_scope: missing parent?"),
|
||||||
|
- },
|
||||||
|
- )
|
||||||
|
- })
|
||||||
|
+ let scope = namespace::item_namespace(
|
||||||
|
+ cx,
|
||||||
|
+ DefId {
|
||||||
|
+ krate: instance.def_id().krate,
|
||||||
|
+ index: cx
|
||||||
|
+ .tcx
|
||||||
|
+ .def_key(instance.def_id())
|
||||||
|
+ .parent
|
||||||
|
+ .expect("get_containing_scope: missing parent?"),
|
||||||
|
+ },
|
||||||
|
+ );
|
||||||
|
+ (scope, false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
|
||||||
|
index 253c2ca7c768..9dd6db1929fc 100644
|
||||||
|
--- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
|
||||||
|
+++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
|
||||||
|
@@ -1968,6 +1968,21 @@ pub fn LLVMRustDIBuilderCreateFunction<'a>(
|
||||||
|
Decl: Option<&'a DIDescriptor>,
|
||||||
|
) -> &'a DISubprogram;
|
||||||
|
|
||||||
|
+ pub fn LLVMRustDIBuilderCreateMethod<'a>(
|
||||||
|
+ Builder: &DIBuilder<'a>,
|
||||||
|
+ Scope: &'a DIDescriptor,
|
||||||
|
+ Name: *const c_char,
|
||||||
|
+ NameLen: size_t,
|
||||||
|
+ LinkageName: *const c_char,
|
||||||
|
+ LinkageNameLen: size_t,
|
||||||
|
+ File: &'a DIFile,
|
||||||
|
+ LineNo: c_uint,
|
||||||
|
+ Ty: &'a DIType,
|
||||||
|
+ Flags: DIFlags,
|
||||||
|
+ SPFlags: DISPFlags,
|
||||||
|
+ TParam: &'a DIArray,
|
||||||
|
+ ) -> &'a DISubprogram;
|
||||||
|
+
|
||||||
|
pub fn LLVMRustDIBuilderCreateBasicType<'a>(
|
||||||
|
Builder: &DIBuilder<'a>,
|
||||||
|
Name: *const c_char,
|
||||||
|
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
|
||||||
|
index e3493caaaf74..c4a97af1f0f4 100644
|
||||||
|
--- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
|
||||||
|
+++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
|
||||||
|
@@ -841,6 +841,28 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateFunction(
|
||||||
|
return wrap(Sub);
|
||||||
|
}
|
||||||
|
|
||||||
|
+extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateMethod(
|
||||||
|
+ LLVMRustDIBuilderRef Builder, LLVMMetadataRef Scope,
|
||||||
|
+ const char *Name, size_t NameLen,
|
||||||
|
+ const char *LinkageName, size_t LinkageNameLen,
|
||||||
|
+ LLVMMetadataRef File, unsigned LineNo,
|
||||||
|
+ LLVMMetadataRef Ty, LLVMRustDIFlags Flags,
|
||||||
|
+ LLVMRustDISPFlags SPFlags, LLVMMetadataRef TParam) {
|
||||||
|
+ DITemplateParameterArray TParams =
|
||||||
|
+ DITemplateParameterArray(unwrap<MDTuple>(TParam));
|
||||||
|
+ DISubprogram::DISPFlags llvmSPFlags = fromRust(SPFlags);
|
||||||
|
+ DINode::DIFlags llvmFlags = fromRust(Flags);
|
||||||
|
+ DISubprogram *Sub = Builder->createMethod(
|
||||||
|
+ unwrapDI<DIScope>(Scope),
|
||||||
|
+ StringRef(Name, NameLen),
|
||||||
|
+ StringRef(LinkageName, LinkageNameLen),
|
||||||
|
+ unwrapDI<DIFile>(File), LineNo,
|
||||||
|
+ unwrapDI<DISubroutineType>(Ty),
|
||||||
|
+ 0, 0, nullptr, // VTable params aren't used
|
||||||
|
+ llvmFlags, llvmSPFlags, TParams);
|
||||||
|
+ return wrap(Sub);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateBasicType(
|
||||||
|
LLVMRustDIBuilderRef Builder, const char *Name, size_t NameLen,
|
||||||
|
uint64_t SizeInBits, unsigned Encoding) {
|
||||||
|
diff --git a/tests/run-make-fulldeps/issue-109934-lto-debuginfo/Makefile b/tests/run-make-fulldeps/issue-109934-lto-debuginfo/Makefile
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..3b7a99d3dbc6
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/run-make-fulldeps/issue-109934-lto-debuginfo/Makefile
|
||||||
|
@@ -0,0 +1,12 @@
|
||||||
|
+# ignore-cross-compile
|
||||||
|
+include ../tools.mk
|
||||||
|
+
|
||||||
|
+# With the upgrade to LLVM 16, this was getting:
|
||||||
|
+#
|
||||||
|
+# error: Cannot represent a difference across sections
|
||||||
|
+#
|
||||||
|
+# The error stemmed from DI function definitions under type scopes, fixed by
|
||||||
|
+# only declaring in type scope and defining the subprogram elsewhere.
|
||||||
|
+
|
||||||
|
+all:
|
||||||
|
+ $(RUSTC) lib.rs --test -C lto=fat -C debuginfo=2 -C incremental=$(TMPDIR)/inc-fat
|
||||||
|
diff --git a/tests/run-make-fulldeps/issue-109934-lto-debuginfo/lib.rs b/tests/run-make-fulldeps/issue-109934-lto-debuginfo/lib.rs
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..c405928bd182
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/run-make-fulldeps/issue-109934-lto-debuginfo/lib.rs
|
||||||
|
@@ -0,0 +1,9 @@
|
||||||
|
+extern crate alloc;
|
||||||
|
+
|
||||||
|
+#[cfg(test)]
|
||||||
|
+mod tests {
|
||||||
|
+ #[test]
|
||||||
|
+ fn something_alloc() {
|
||||||
|
+ assert_eq!(Vec::<u32>::new(), Vec::<u32>::new());
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
--
|
||||||
|
2.40.1
|
||||||
|
|
95
rust.spec
95
rust.spec
@ -8,9 +8,9 @@
|
|||||||
# To bootstrap from scratch, set the channel and date from src/stage0.json
|
# 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
|
# e.g. 1.59.0 wants rustc: 1.58.0-2022-01-13
|
||||||
# or nightly wants some beta-YYYY-MM-DD
|
# or nightly wants some beta-YYYY-MM-DD
|
||||||
%global bootstrap_version 1.67.1
|
%global bootstrap_version 1.68.2
|
||||||
%global bootstrap_channel 1.67.1
|
%global bootstrap_channel 1.68.2
|
||||||
%global bootstrap_date 2023-02-09
|
%global bootstrap_date 2023-03-28
|
||||||
|
|
||||||
# Only the specified arches will use bootstrap binaries.
|
# Only the specified arches will use bootstrap binaries.
|
||||||
# NOTE: Those binaries used to be uploaded with every new release, but that was
|
# NOTE: Those binaries used to be uploaded with every new release, but that was
|
||||||
@ -49,9 +49,9 @@
|
|||||||
%bcond_with llvm_static
|
%bcond_with llvm_static
|
||||||
|
|
||||||
# We can also choose to just use Rust's bundled LLVM, in case the system LLVM
|
# We can also choose to just use Rust's bundled LLVM, in case the system LLVM
|
||||||
# is insufficient. Rust currently requires LLVM 12.0+.
|
# is insufficient. Rust currently requires LLVM 14.0+.
|
||||||
%global min_llvm_version 13.0.0
|
%global min_llvm_version 14.0.0
|
||||||
%global bundled_llvm_version 15.0.6
|
%global bundled_llvm_version 15.0.7
|
||||||
%bcond_with bundled_llvm
|
%bcond_with bundled_llvm
|
||||||
|
|
||||||
# Requires stable libgit2 1.5, and not the next minor soname change.
|
# Requires stable libgit2 1.5, and not the next minor soname change.
|
||||||
@ -88,7 +88,7 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: rust
|
Name: rust
|
||||||
Version: 1.68.2
|
Version: 1.69.0
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: The Rust Programming Language
|
Summary: The Rust Programming Language
|
||||||
License: (ASL 2.0 or MIT) and (BSD and MIT)
|
License: (ASL 2.0 or MIT) and (BSD and MIT)
|
||||||
@ -111,6 +111,9 @@ Patch1: 0001-Use-lld-provided-by-system-for-wasm.patch
|
|||||||
# Set a substitute-path in rust-gdb for standard library sources.
|
# Set a substitute-path in rust-gdb for standard library sources.
|
||||||
Patch2: rustc-1.61.0-rust-gdb-substitute-path.patch
|
Patch2: rustc-1.61.0-rust-gdb-substitute-path.patch
|
||||||
|
|
||||||
|
# https://github.com/rust-lang/rust/pull/111167
|
||||||
|
Patch3: 0001-debuginfo-split-method-declaration-and-definition.patch
|
||||||
|
|
||||||
### RHEL-specific patches below ###
|
### RHEL-specific patches below ###
|
||||||
|
|
||||||
# Simple rpm macros for rust-toolset (as opposed to full rust-packaging)
|
# Simple rpm macros for rust-toolset (as opposed to full rust-packaging)
|
||||||
@ -121,7 +124,7 @@ Patch100: rustc-1.65.0-disable-libssh2.patch
|
|||||||
|
|
||||||
# libcurl on RHEL7 doesn't have http2, but since cargo requests it, curl-sys
|
# libcurl on RHEL7 doesn't have http2, but since cargo requests it, curl-sys
|
||||||
# will try to build it statically -- instead we turn off the feature.
|
# will try to build it statically -- instead we turn off the feature.
|
||||||
Patch101: rustc-1.68.0-disable-http2.patch
|
Patch101: rustc-1.69.0-disable-http2.patch
|
||||||
|
|
||||||
# kernel rh1410097 causes too-small stacks for PIE.
|
# kernel rh1410097 causes too-small stacks for PIE.
|
||||||
# (affects RHEL6 kernels when building for RHEL7)
|
# (affects RHEL6 kernels when building for RHEL7)
|
||||||
@ -144,7 +147,14 @@ Patch102: rustc-1.65.0-no-default-pie.patch
|
|||||||
return arch.."-unknown-linux-"..abi
|
return arch.."-unknown-linux-"..abi
|
||||||
end}
|
end}
|
||||||
|
|
||||||
|
# Get the environment form of a Rust triple
|
||||||
|
%{lua: function rust_triple_env(triple)
|
||||||
|
local sub = string.gsub(triple, "-", "_")
|
||||||
|
return string.upper(sub)
|
||||||
|
end}
|
||||||
|
|
||||||
%global rust_triple %{lua: print(rust_triple(rpm.expand("%{_target_cpu}")))}
|
%global rust_triple %{lua: print(rust_triple(rpm.expand("%{_target_cpu}")))}
|
||||||
|
%global rust_triple_env %{lua: print(rust_triple_env(rpm.expand("%{rust_triple}")))}
|
||||||
|
|
||||||
%if %defined bootstrap_arches
|
%if %defined bootstrap_arches
|
||||||
# For each bootstrap arch, add an additional binary Source.
|
# For each bootstrap arch, add an additional binary Source.
|
||||||
@ -220,7 +230,7 @@ Provides: bundled(llvm) = %{bundled_llvm_version}
|
|||||||
%else
|
%else
|
||||||
BuildRequires: cmake >= 2.8.11
|
BuildRequires: cmake >= 2.8.11
|
||||||
%if 0%{?epel} == 7
|
%if 0%{?epel} == 7
|
||||||
%global llvm llvm13
|
%global llvm llvm14
|
||||||
%endif
|
%endif
|
||||||
%if %defined llvm
|
%if %defined llvm
|
||||||
%global llvm_root %{_libdir}/%{llvm}
|
%global llvm_root %{_libdir}/%{llvm}
|
||||||
@ -257,7 +267,7 @@ Requires: %{name}-std-static%{?_isa} = %{version}-%{release}
|
|||||||
Requires: /usr/bin/cc
|
Requires: /usr/bin/cc
|
||||||
|
|
||||||
%if 0%{?epel} == 7
|
%if 0%{?epel} == 7
|
||||||
%global devtoolset_name devtoolset-9
|
%global devtoolset_name devtoolset-11
|
||||||
BuildRequires: %{devtoolset_name}-binutils
|
BuildRequires: %{devtoolset_name}-binutils
|
||||||
BuildRequires: %{devtoolset_name}-gcc
|
BuildRequires: %{devtoolset_name}-gcc
|
||||||
BuildRequires: %{devtoolset_name}-gcc-c++
|
BuildRequires: %{devtoolset_name}-gcc-c++
|
||||||
@ -322,6 +332,10 @@ find '%{buildroot}%{rustlibdir}'/wasm*/lib -type f -regex '.*\\.\\(a\\|rlib\\)'
|
|||||||
%{nil}
|
%{nil}
|
||||||
%endif
|
%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
|
%description
|
||||||
Rust is a systems programming language that runs blazingly fast, prevents
|
Rust is a systems programming language that runs blazingly fast, prevents
|
||||||
segfaults, and guarantees thread safety.
|
segfaults, and guarantees thread safety.
|
||||||
@ -537,20 +551,6 @@ This package includes source files for the Rust standard library. It may be
|
|||||||
useful as a reference for code completion tools in various editors.
|
useful as a reference for code completion tools in various editors.
|
||||||
|
|
||||||
|
|
||||||
%package analysis
|
|
||||||
Summary: Compiler analysis data for the Rust standard library
|
|
||||||
%if 0%{?rhel} && 0%{?rhel} < 8
|
|
||||||
Requires: %{name}-std-static%{?_isa} = %{version}-%{release}
|
|
||||||
%else
|
|
||||||
Recommends: %{name}-std-static%{?_isa} = %{version}-%{release}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%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.
|
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?rhel}
|
%if 0%{?rhel}
|
||||||
|
|
||||||
%package toolset
|
%package toolset
|
||||||
@ -586,20 +586,21 @@ test -f '%{local_rust_root}/bin/rustc'
|
|||||||
|
|
||||||
%setup -q -n %{rustc_package}
|
%setup -q -n %{rustc_package}
|
||||||
|
|
||||||
%patch1 -p1
|
%patch -P1 -p1
|
||||||
%patch2 -p1
|
%patch -P2 -p1
|
||||||
|
%patch -P3 -p1
|
||||||
|
|
||||||
%if %with disabled_libssh2
|
%if %with disabled_libssh2
|
||||||
%patch100 -p1
|
%patch -P100 -p1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %without curl_http2
|
%if %without curl_http2
|
||||||
%patch101 -p1
|
%patch -P101 -p1
|
||||||
rm -rf vendor/libnghttp2-sys/
|
rm -rf vendor/libnghttp2-sys/
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?rhel} && 0%{?rhel} < 8
|
%if 0%{?rhel} && 0%{?rhel} < 8
|
||||||
%patch102 -p1
|
%patch -P102 -p1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Use our explicit python3 first
|
# Use our explicit python3 first
|
||||||
@ -663,9 +664,26 @@ find -name '*.rs' -type f -perm /111 -exec chmod -v -x '{}' '+'
|
|||||||
%global build_rustflags %{nil}
|
%global build_rustflags %{nil}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# These are similar to __cflags_arch_* in /usr/lib/rpm/redhat/macros
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} >= 9
|
||||||
|
%ifarch x86_64
|
||||||
|
%global rust_target_cpu %[0%{?rhel} >= 10 ? "x86-64-v3" : ""]
|
||||||
|
%global rust_target_cpu %[0%{?rhel} == 9 ? "x86-64-v2" : "%{rust_target_cpu}"]
|
||||||
|
%endif
|
||||||
|
%ifarch s390x
|
||||||
|
%global rust_target_cpu %[0%{?rhel} >= 9 ? "z14" : "zEC12"]
|
||||||
|
%endif
|
||||||
|
%ifarch ppc64le
|
||||||
|
%global rust_target_cpu %[0%{?rhel} >= 9 ? "pwr9" : "pwr8"]
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
# Set up shared environment variables for build/install/check
|
# Set up shared environment variables for build/install/check
|
||||||
%global rust_env %{?rustflags:RUSTFLAGS="%{rustflags}"}
|
%global rust_env %{?rustflags:RUSTFLAGS="%{rustflags}"}
|
||||||
%if 0%{?cmake_path:1}
|
%if "%{?rust_target_cpu}" != ""
|
||||||
|
%global rust_env %{?rust_env} CARGO_TARGET_%{rust_triple_env}_RUSTFLAGS=-Ctarget-cpu=%{rust_target_cpu}
|
||||||
|
%endif
|
||||||
|
%if %defined cmake_path
|
||||||
%global rust_env %{?rust_env} PATH="%{cmake_path}:$PATH"
|
%global rust_env %{?rust_env} PATH="%{cmake_path}:$PATH"
|
||||||
%endif
|
%endif
|
||||||
%if %without disabled_libssh2
|
%if %without disabled_libssh2
|
||||||
@ -674,7 +692,6 @@ find -name '*.rs' -type f -perm /111 -exec chmod -v -x '{}' '+'
|
|||||||
%endif
|
%endif
|
||||||
%global export_rust_env %{?rust_env:export %{rust_env}}
|
%global export_rust_env %{?rust_env:export %{rust_env}}
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{export_rust_env}
|
%{export_rust_env}
|
||||||
|
|
||||||
@ -760,7 +777,7 @@ end}
|
|||||||
--set build.install-stage=2 \
|
--set build.install-stage=2 \
|
||||||
--set build.test-stage=2 \
|
--set build.test-stage=2 \
|
||||||
--enable-extended \
|
--enable-extended \
|
||||||
--tools=analysis,cargo,clippy,rls,rust-analyzer,rustfmt,src \
|
--tools=cargo,clippy,rls,rust-analyzer,rustfmt,src \
|
||||||
--enable-vendor \
|
--enable-vendor \
|
||||||
--enable-verbose-tests \
|
--enable-verbose-tests \
|
||||||
--dist-compression-formats=gz \
|
--dist-compression-formats=gz \
|
||||||
@ -775,6 +792,9 @@ for triple in %{?mingw_targets} %{?wasm_targets}; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if 0%{?rhel} && 0%{?rhel} <= 9
|
||||||
|
%{?set_build_flags}
|
||||||
|
%endif
|
||||||
%{export_rust_env}
|
%{export_rust_env}
|
||||||
|
|
||||||
DESTDIR=%{buildroot} %{__python3} ./x.py install
|
DESTDIR=%{buildroot} %{__python3} ./x.py install
|
||||||
@ -862,6 +882,9 @@ rm -f %{buildroot}%{rustlibdir}/%{rust_triple}/bin/rust-ll*
|
|||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if 0%{?rhel} && 0%{?rhel} <= 9
|
||||||
|
%{?set_build_flags}
|
||||||
|
%endif
|
||||||
%{export_rust_env}
|
%{export_rust_env}
|
||||||
|
|
||||||
# Sanity-check the installed binaries, debuginfo-stripped and all.
|
# Sanity-check the installed binaries, debuginfo-stripped and all.
|
||||||
@ -1038,10 +1061,6 @@ end}
|
|||||||
%{rustlibdir}/src
|
%{rustlibdir}/src
|
||||||
|
|
||||||
|
|
||||||
%files analysis
|
|
||||||
%{rustlibdir}/%{rust_triple}/analysis/
|
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?rhel}
|
%if 0%{?rhel}
|
||||||
%files toolset
|
%files toolset
|
||||||
%{rpmmacrodir}/macros.rust-toolset
|
%{rpmmacrodir}/macros.rust-toolset
|
||||||
@ -1049,6 +1068,10 @@ end}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri May 26 2023 Josh Stone <jistone@redhat.com> - 1.69.0-1
|
||||||
|
- Update to 1.69.0.
|
||||||
|
- Obsolete rust-analysis.
|
||||||
|
|
||||||
* Fri May 19 2023 Josh Stone <jistone@redhat.com> - 1.68.2-1
|
* Fri May 19 2023 Josh Stone <jistone@redhat.com> - 1.68.2-1
|
||||||
- Update to 1.68.2.
|
- Update to 1.68.2.
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- rustc-beta-src/Cargo.lock.orig 2023-03-03 17:26:41.309081970 -0800
|
--- rustc-beta-src/Cargo.lock.orig 2023-03-23 17:10:30.810989345 -0700
|
||||||
+++ rustc-beta-src/Cargo.lock 2023-03-03 17:26:41.311081929 -0800
|
+++ rustc-beta-src/Cargo.lock 2023-03-23 17:10:30.812989303 -0700
|
||||||
@@ -1152,7 +1152,6 @@
|
@@ -1142,7 +1142,6 @@
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"libc",
|
"libc",
|
||||||
@ -8,7 +8,7 @@
|
|||||||
"libz-sys",
|
"libz-sys",
|
||||||
"openssl-sys",
|
"openssl-sys",
|
||||||
"pkg-config",
|
"pkg-config",
|
||||||
@@ -2399,16 +2398,6 @@
|
@@ -2375,16 +2374,6 @@
|
||||||
checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a"
|
checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -25,20 +25,20 @@
|
|||||||
name = "libz-sys"
|
name = "libz-sys"
|
||||||
version = "1.1.3"
|
version = "1.1.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
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.orig 2023-03-23 17:10:30.812989303 -0700
|
||||||
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-03-03 17:27:32.999013773 -0800
|
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-03-23 17:11:26.242836664 -0700
|
||||||
@@ -21,7 +21,7 @@
|
@@ -23,7 +23,7 @@
|
||||||
cargo-platform = { path = "crates/cargo-platform", version = "0.1.2" }
|
|
||||||
cargo-util = { path = "crates/cargo-util", version = "0.2.3" }
|
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 = ["http2"] }
|
||||||
+curl = { version = "0.4.44", features = [] }
|
+curl = { version = "0.4.44", features = [] }
|
||||||
curl-sys = "0.4.59"
|
curl-sys = "0.4.59"
|
||||||
env_logger = "0.10.0"
|
env_logger = "0.10.0"
|
||||||
pretty_env_logger = { version = "0.4", optional = true }
|
filetime = "0.2.9"
|
||||||
--- 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.orig 2023-03-19 00:20:55.000000000 -0700
|
||||||
+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2023-03-03 17:26:41.311081929 -0800
|
+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2023-03-23 17:10:30.812989303 -0700
|
||||||
@@ -402,16 +402,9 @@
|
@@ -401,16 +401,9 @@
|
||||||
sources: SourceMap<'cfg>,
|
sources: SourceMap<'cfg>,
|
||||||
config: &'cfg Config,
|
config: &'cfg Config,
|
||||||
) -> CargoResult<PackageSet<'cfg>> {
|
) -> CargoResult<PackageSet<'cfg>> {
|
||||||
@ -58,8 +58,8 @@
|
|||||||
|
|
||||||
Ok(PackageSet {
|
Ok(PackageSet {
|
||||||
packages: package_ids
|
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.orig 2023-03-19 00:20:55.000000000 -0700
|
||||||
+++ 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 2023-03-23 17:10:30.813989282 -0700
|
||||||
@@ -220,16 +220,8 @@
|
@@ -220,16 +220,8 @@
|
||||||
}
|
}
|
||||||
self.fetch_started = true;
|
self.fetch_started = true;
|
||||||
@ -79,8 +79,8 @@
|
|||||||
|
|
||||||
self.config
|
self.config
|
||||||
.shell()
|
.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.orig 2023-03-19 00:20:55.000000000 -0700
|
||||||
+++ 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 2023-03-23 17:10:30.813989282 -0700
|
||||||
@@ -116,7 +116,7 @@
|
@@ -116,7 +116,7 @@
|
||||||
macro_rules! try_old_curl {
|
macro_rules! try_old_curl {
|
||||||
($e:expr, $msg:expr) => {
|
($e:expr, $msg:expr) => {
|
2
sources
2
sources
@ -1,2 +1,2 @@
|
|||||||
SHA512 (rustc-1.68.2-src.tar.xz) = 8b085d0351e19100e9abc24b10c44a0939a1d35ba23421da4ece345d7373f7dbad1dc6a2ae153c1259404dd96b41e2682e711cf2b0b63fd03a196760cddbcdd3
|
SHA512 (rustc-1.69.0-src.tar.xz) = 724398fc208ec18adbd8ba81a445e23d1001b746990f36b869126be8a45f1cdfa75f5b9cbdd0abbab506f91a56d3736ab247677699ebd69525245558cfc01a60
|
||||||
SHA512 (wasi-libc-1dfe5c302d1c5ab621f7abf04620fae92700fd22.tar.gz) = 6f813bc7822746c161932de6b84fb965111400a1a38c25dd0981209d588b9ccafe1a5923349110c536f1b7cda707dfa2d0be42c92b2fa6fd89c957eda27bda27
|
SHA512 (wasi-libc-1dfe5c302d1c5ab621f7abf04620fae92700fd22.tar.gz) = 6f813bc7822746c161932de6b84fb965111400a1a38c25dd0981209d588b9ccafe1a5923349110c536f1b7cda707dfa2d0be42c92b2fa6fd89c957eda27bda27
|
||||||
|
Loading…
Reference in New Issue
Block a user