import rust-1.58.1-1.el9

This commit is contained in:
CentOS Sources 2022-05-17 04:53:31 -04:00 committed by Stepan Oksanichenko
commit 26aaf75c38
7 changed files with 1577 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
SOURCES/rustc-1.58.1-src.tar.xz
SOURCES/wasi-libc-ad5133410f66b93a2381db5b542aad5e0964db96.tar.gz

2
.rust.metadata Normal file
View File

@ -0,0 +1,2 @@
783cb359829e7ea508deae659837f9bb360e46c8 SOURCES/rustc-1.58.1-src.tar.xz
b8865d1192852214d6d9b0a0957d4b36c16832aa SOURCES/wasi-libc-ad5133410f66b93a2381db5b542aad5e0964db96.tar.gz

View File

@ -0,0 +1,26 @@
From 9ac837c237568a6c1c5f0e979fcce208cd9c926a Mon Sep 17 00:00:00 2001
From: Ivan Mironov <mironov.ivan@gmail.com>
Date: Sun, 8 Dec 2019 17:23:08 +0500
Subject: [PATCH] Use lld provided by system for wasm
---
compiler/rustc_target/src/spec/wasm_base.rs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/compiler/rustc_target/src/spec/wasm_base.rs b/compiler/rustc_target/src/spec/wasm_base.rs
index 4c954a1e567c..15c4f1bda5eb 100644
--- a/compiler/rustc_target/src/spec/wasm_base.rs
+++ b/compiler/rustc_target/src/spec/wasm_base.rs
@@ -99,8 +99,7 @@ pub fn options() -> TargetOptions {
// arguments just yet
limit_rdylib_exports: false,
- // we use the LLD shipped with the Rust toolchain by default
- linker: Some("rust-lld".to_owned()),
+ linker: Some("lld".to_owned()),
lld_flavor: LldFlavor::Wasm,
linker_is_gnu: false,
--
2.31.1

View File

@ -0,0 +1,42 @@
--- rustc-1.56.0-src/Cargo.lock.orig 2021-10-18 02:52:36.000000000 -0700
+++ rustc-1.56.0-src/Cargo.lock 2021-10-19 18:00:47.999793566 -0700
@@ -1895,7 +1895,6 @@
dependencies = [
"cc",
"libc",
- "libssh2-sys",
"libz-sys",
"openssl-sys",
"pkg-config",
@@ -1918,20 +1917,6 @@
]
[[package]]
-name = "libssh2-sys"
-version = "0.2.19"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca46220853ba1c512fc82826d0834d87b06bcd3c2a42241b7de72f3d2fe17056"
-dependencies = [
- "cc",
- "libc",
- "libz-sys",
- "openssl-sys",
- "pkg-config",
- "vcpkg",
-]
-
-[[package]]
name = "libz-sys"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
--- rustc-1.56.0-src/vendor/git2/Cargo.toml.orig 2021-10-18 04:05:54.000000000 -0700
+++ rustc-1.56.0-src/vendor/git2/Cargo.toml 2021-10-19 17:57:37.960500359 -0700
@@ -52,7 +52,7 @@
version = "0.1.39"
[features]
-default = ["ssh", "https", "ssh_key_from_memory"]
+default = ["https"]
https = ["libgit2-sys/https", "openssl-sys", "openssl-probe"]
ssh = ["libgit2-sys/ssh"]
ssh_key_from_memory = ["libgit2-sys/ssh_key_from_memory"]

View File

@ -0,0 +1,66 @@
--- rustc-1.58.0-src/Cargo.lock.orig 2022-01-11 16:13:10.125323813 -0800
+++ rustc-1.58.0-src/Cargo.lock 2022-01-11 16:22:54.313011908 -0800
@@ -909,7 +909,6 @@
dependencies = [
"cc",
"libc",
- "libnghttp2-sys",
"libz-sys",
"openssl-sys",
"pkg-config",
@@ -1927,16 +1926,6 @@
checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a"
[[package]]
-name = "libnghttp2-sys"
-version = "0.1.4+1.41.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03624ec6df166e79e139a2310ca213283d6b3c30810c54844f307086d4488df1"
-dependencies = [
- "cc",
- "libc",
-]
-
-[[package]]
name = "libz-sys"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
--- rustc-1.58.0-src/src/tools/cargo/Cargo.toml.orig 2022-01-11 16:13:10.127323771 -0800
+++ rustc-1.58.0-src/src/tools/cargo/Cargo.toml 2022-01-11 16:14:50.721203730 -0800
@@ -22,7 +22,7 @@
cargo-util = { path = "crates/cargo-util", version = "0.1.1" }
crates-io = { path = "crates/crates-io", version = "0.33.0" }
crossbeam-utils = "0.8"
-curl = { version = "0.4.41", features = ["http2"] }
+curl = { version = "0.4.41", features = [] }
curl-sys = "0.4.50"
env_logger = "0.9.0"
pretty_env_logger = { version = "0.4", optional = true }
--- rustc-1.58.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2022-01-11 03:18:44.000000000 -0800
+++ rustc-1.58.0-src/src/tools/cargo/src/cargo/core/package.rs 2022-01-11 16:13:10.127323771 -0800
@@ -419,14 +419,8 @@
// Also note that pipelining is disabled as curl authors have indicated
// that it's buggy, and we've empirically seen that it's buggy with HTTP
// proxies.
- let mut multi = Multi::new();
- let multiplexing = config.http_config()?.multiplexing.unwrap_or(true);
- multi
- .pipelining(false, multiplexing)
- .with_context(|| "failed to enable multiplexing/pipelining in curl")?;
-
- // let's not flood crates.io with connections
- multi.set_max_host_connections(2)?;
+ let multi = Multi::new();
+ let multiplexing = false;
Ok(PackageSet {
packages: package_ids
@@ -655,7 +649,7 @@
macro_rules! try_old_curl {
($e:expr, $msg:expr) => {
let result = $e;
- if cfg!(target_os = "macos") {
+ if cfg!(any(target_os = "linux", target_os = "macos")) {
if let Err(e) = result {
warn!("ignoring libcurl {} error: {}", $msg, e);
}

View File

@ -0,0 +1,44 @@
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
index 638b2a7b5a9f..79d4ecf4cb91 100644
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
@@ -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);
- warn!("Linker does not support -no-pie command line option. Retrying without.");
+ info!("Linker does not support -no-pie command line option. Retrying without.");
for arg in cmd.take_args() {
if arg.to_string_lossy() != "-no-pie" {
cmd.arg(arg);
@@ -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);
- warn!(
+ info!(
"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,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.
+ 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) {
(CrateType::Executable, _, _) if sess.is_wasi_reactor() => LinkOutputKind::WasiReactorExe,
- (CrateType::Executable, false, RelocModel::Pic | RelocModel::Pie) => {
- LinkOutputKind::DynamicPicExe
- }
+ (CrateType::Executable, false, true) => LinkOutputKind::DynamicPicExe,
(CrateType::Executable, false, _) => LinkOutputKind::DynamicNoPicExe,
- (CrateType::Executable, true, RelocModel::Pic | RelocModel::Pie) => {
- LinkOutputKind::StaticPicExe
- }
+ (CrateType::Executable, true, true) => LinkOutputKind::StaticPicExe,
(CrateType::Executable, true, _) => LinkOutputKind::StaticNoPicExe,
(_, true, _) => LinkOutputKind::StaticDylib,
(_, false, _) => LinkOutputKind::DynamicDylib,

1395
SPECS/rust.spec Normal file

File diff suppressed because it is too large Load Diff