c8-stream-rhel8
imports/c8-stream-rhel8/rust-1.66.1-1.module+el8.8.0+17810+1556a031
commit
c42ed7409f
@ -0,0 +1,2 @@
|
|||||||
|
SOURCES/rustc-1.66.1-src.tar.xz
|
||||||
|
SOURCES/wasi-libc-wasi-sdk-17.tar.gz
|
@ -0,0 +1,2 @@
|
|||||||
|
a8cc02cc11a942bddf67f1cfdcdd2bd867296f8e SOURCES/rustc-1.66.1-src.tar.xz
|
||||||
|
1f4561760c6c7e9f9f30c8cf0d156b8d551e04e2 SOURCES/wasi-libc-wasi-sdk-17.tar.gz
|
@ -0,0 +1,34 @@
|
|||||||
|
From 98ae83daae67e9e7663b8345eced1de8c667271f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dan Gohman <dev@sunfishcode.online>
|
||||||
|
Date: Thu, 8 Dec 2022 10:35:46 -0800
|
||||||
|
Subject: [PATCH] Mangle "main" as "__main_void" on wasm32-wasi
|
||||||
|
|
||||||
|
On wasm, the age-old C trick of having a main function which can either have
|
||||||
|
no arguments or argc+argv doesn't work, because wasm requires caller and
|
||||||
|
callee signatures to match. WASI's current strategy is to have compilers
|
||||||
|
mangle main's name to indicate which signature they're using. Rust uses the
|
||||||
|
no-argument form, which should be mangled as `__main_void`.
|
||||||
|
|
||||||
|
This is needed on wasm32-wasi as of #105395.
|
||||||
|
---
|
||||||
|
compiler/rustc_target/src/spec/wasm32_wasi.rs | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/compiler/rustc_target/src/spec/wasm32_wasi.rs b/compiler/rustc_target/src/spec/wasm32_wasi.rs
|
||||||
|
index 6f0bbf0672d4..a0476d542e64 100644
|
||||||
|
--- a/compiler/rustc_target/src/spec/wasm32_wasi.rs
|
||||||
|
+++ b/compiler/rustc_target/src/spec/wasm32_wasi.rs
|
||||||
|
@@ -104,6 +104,10 @@ pub fn target() -> Target {
|
||||||
|
// `args::args()` makes the WASI API calls itself.
|
||||||
|
options.main_needs_argc_argv = false;
|
||||||
|
|
||||||
|
+ // And, WASI mangles the name of "main" to distinguish between different
|
||||||
|
+ // signatures.
|
||||||
|
+ options.entry_name = "__main_void".into();
|
||||||
|
+
|
||||||
|
Target {
|
||||||
|
llvm_target: "wasm32-wasi".into(),
|
||||||
|
pointer_width: 32,
|
||||||
|
--
|
||||||
|
2.38.1
|
||||||
|
|
@ -0,0 +1,26 @@
|
|||||||
|
From 37cb177eb53145103ae72b67562884782dde01c3 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 528a84a8b37c..353d742161d1 100644
|
||||||
|
--- a/compiler/rustc_target/src/spec/wasm_base.rs
|
||||||
|
+++ b/compiler/rustc_target/src/spec/wasm_base.rs
|
||||||
|
@@ -89,8 +89,7 @@ macro_rules! args {
|
||||||
|
// arguments just yet
|
||||||
|
limit_rdylib_exports: false,
|
||||||
|
|
||||||
|
- // we use the LLD shipped with the Rust toolchain by default
|
||||||
|
- linker: Some("rust-lld".into()),
|
||||||
|
+ linker: Some("lld".into()),
|
||||||
|
linker_flavor: LinkerFlavor::WasmLld(Cc::No),
|
||||||
|
|
||||||
|
pre_link_args,
|
||||||
|
--
|
||||||
|
2.38.1
|
||||||
|
|
@ -0,0 +1,185 @@
|
|||||||
|
From 2bdbc5fbf7f84c62f8c7b1007f3b6fd6d3da06f6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Josh Stone <jistone@redhat.com>
|
||||||
|
Date: Fri, 14 Oct 2022 16:11:28 -0700
|
||||||
|
Subject: [PATCH] compiletest: set the dylib path when gathering target cfg
|
||||||
|
|
||||||
|
If the compiler is built with `rpath = false`, then it won't find its
|
||||||
|
own libraries unless the library search path is set. We already do that
|
||||||
|
while running the actual compiletests, but #100260 added another rustc
|
||||||
|
command for getting the target cfg.
|
||||||
|
|
||||||
|
Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
|
||||||
|
thread 'main' panicked at 'error: failed to get cfg info from "[...]/build/x86_64-unknown-linux-gnu/stage1/bin/rustc"
|
||||||
|
--- stdout
|
||||||
|
|
||||||
|
--- stderr
|
||||||
|
[...]/build/x86_64-unknown-linux-gnu/stage1/bin/rustc: error while loading shared libraries: librustc_driver-a2a76dc626cd02d2.so: cannot open shared object file: No such file or directory
|
||||||
|
', src/tools/compiletest/src/common.rs:476:13
|
||||||
|
|
||||||
|
Now the library path is set here as well, so it works without rpath.
|
||||||
|
|
||||||
|
(cherry picked from commit f8a0cc2ca8a644ddb63867526711ba17cb7508c8)
|
||||||
|
---
|
||||||
|
src/tools/compiletest/src/common.rs | 20 +++++++++++---------
|
||||||
|
src/tools/compiletest/src/runtest.rs | 27 +++------------------------
|
||||||
|
src/tools/compiletest/src/util.rs | 23 +++++++++++++++++++++++
|
||||||
|
3 files changed, 37 insertions(+), 33 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs
|
||||||
|
index 0260f6848386..9a432f11f82f 100644
|
||||||
|
--- a/src/tools/compiletest/src/common.rs
|
||||||
|
+++ b/src/tools/compiletest/src/common.rs
|
||||||
|
@@ -2,11 +2,12 @@
|
||||||
|
|
||||||
|
use std::ffi::OsString;
|
||||||
|
use std::fmt;
|
||||||
|
+use std::iter;
|
||||||
|
use std::path::{Path, PathBuf};
|
||||||
|
use std::process::Command;
|
||||||
|
use std::str::FromStr;
|
||||||
|
|
||||||
|
-use crate::util::PathBufExt;
|
||||||
|
+use crate::util::{add_dylib_path, PathBufExt};
|
||||||
|
use lazycell::LazyCell;
|
||||||
|
use test::ColorConfig;
|
||||||
|
|
||||||
|
@@ -385,8 +386,7 @@ pub fn run_enabled(&self) -> bool {
|
||||||
|
}
|
||||||
|
|
||||||
|
fn target_cfg(&self) -> &TargetCfg {
|
||||||
|
- self.target_cfg
|
||||||
|
- .borrow_with(|| TargetCfg::new(&self.rustc_path, &self.target, &self.target_rustcflags))
|
||||||
|
+ self.target_cfg.borrow_with(|| TargetCfg::new(self))
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn matches_arch(&self, arch: &str) -> bool {
|
||||||
|
@@ -457,21 +457,23 @@ pub enum Endian {
|
||||||
|
}
|
||||||
|
|
||||||
|
impl TargetCfg {
|
||||||
|
- fn new(rustc_path: &Path, target: &str, target_rustcflags: &Vec<String>) -> TargetCfg {
|
||||||
|
- let output = match Command::new(rustc_path)
|
||||||
|
+ fn new(config: &Config) -> TargetCfg {
|
||||||
|
+ let mut command = Command::new(&config.rustc_path);
|
||||||
|
+ add_dylib_path(&mut command, iter::once(&config.compile_lib_path));
|
||||||
|
+ let output = match command
|
||||||
|
.arg("--print=cfg")
|
||||||
|
.arg("--target")
|
||||||
|
- .arg(target)
|
||||||
|
- .args(target_rustcflags)
|
||||||
|
+ .arg(&config.target)
|
||||||
|
+ .args(&config.target_rustcflags)
|
||||||
|
.output()
|
||||||
|
{
|
||||||
|
Ok(output) => output,
|
||||||
|
- Err(e) => panic!("error: failed to get cfg info from {:?}: {e}", rustc_path),
|
||||||
|
+ Err(e) => panic!("error: failed to get cfg info from {:?}: {e}", config.rustc_path),
|
||||||
|
};
|
||||||
|
if !output.status.success() {
|
||||||
|
panic!(
|
||||||
|
"error: failed to get cfg info from {:?}\n--- stdout\n{}\n--- stderr\n{}",
|
||||||
|
- rustc_path,
|
||||||
|
+ config.rustc_path,
|
||||||
|
String::from_utf8(output.stdout).unwrap(),
|
||||||
|
String::from_utf8(output.stderr).unwrap(),
|
||||||
|
);
|
||||||
|
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
|
||||||
|
index 8af5f1da694b..f8903f754f09 100644
|
||||||
|
--- a/src/tools/compiletest/src/runtest.rs
|
||||||
|
+++ b/src/tools/compiletest/src/runtest.rs
|
||||||
|
@@ -13,7 +13,7 @@
|
||||||
|
use crate::header::TestProps;
|
||||||
|
use crate::json;
|
||||||
|
use crate::read2::read2_abbreviated;
|
||||||
|
-use crate::util::{logv, PathBufExt};
|
||||||
|
+use crate::util::{add_dylib_path, dylib_env_var, logv, PathBufExt};
|
||||||
|
use crate::ColorConfig;
|
||||||
|
use regex::{Captures, Regex};
|
||||||
|
use rustfix::{apply_suggestions, get_suggestions_from_json, Filter};
|
||||||
|
@@ -26,6 +26,7 @@
|
||||||
|
use std::hash::{Hash, Hasher};
|
||||||
|
use std::io::prelude::*;
|
||||||
|
use std::io::{self, BufReader};
|
||||||
|
+use std::iter;
|
||||||
|
use std::path::{Path, PathBuf};
|
||||||
|
use std::process::{Child, Command, ExitStatus, Output, Stdio};
|
||||||
|
use std::str;
|
||||||
|
@@ -72,19 +73,6 @@ fn disable_error_reporting<F: FnOnce() -> R, R>(f: F) -> R {
|
||||||
|
f()
|
||||||
|
}
|
||||||
|
|
||||||
|
-/// The name of the environment variable that holds dynamic library locations.
|
||||||
|
-pub fn dylib_env_var() -> &'static str {
|
||||||
|
- if cfg!(windows) {
|
||||||
|
- "PATH"
|
||||||
|
- } else if cfg!(target_os = "macos") {
|
||||||
|
- "DYLD_LIBRARY_PATH"
|
||||||
|
- } else if cfg!(target_os = "haiku") {
|
||||||
|
- "LIBRARY_PATH"
|
||||||
|
- } else {
|
||||||
|
- "LD_LIBRARY_PATH"
|
||||||
|
- }
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
/// The platform-specific library name
|
||||||
|
pub fn get_lib_name(lib: &str, dylib: bool) -> String {
|
||||||
|
// In some casess (e.g. MUSL), we build a static
|
||||||
|
@@ -1811,16 +1799,7 @@ fn compose_and_run(
|
||||||
|
|
||||||
|
// Need to be sure to put both the lib_path and the aux path in the dylib
|
||||||
|
// search path for the child.
|
||||||
|
- let mut path =
|
||||||
|
- env::split_paths(&env::var_os(dylib_env_var()).unwrap_or_default()).collect::<Vec<_>>();
|
||||||
|
- if let Some(p) = aux_path {
|
||||||
|
- path.insert(0, PathBuf::from(p))
|
||||||
|
- }
|
||||||
|
- path.insert(0, PathBuf::from(lib_path));
|
||||||
|
-
|
||||||
|
- // Add the new dylib search path var
|
||||||
|
- let newpath = env::join_paths(&path).unwrap();
|
||||||
|
- command.env(dylib_env_var(), newpath);
|
||||||
|
+ add_dylib_path(&mut command, iter::once(lib_path).chain(aux_path));
|
||||||
|
|
||||||
|
let mut child = disable_error_reporting(|| command.spawn())
|
||||||
|
.unwrap_or_else(|_| panic!("failed to exec `{:?}`", &command));
|
||||||
|
diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
|
||||||
|
index e5ff0906be8a..ec36f1e4fb72 100644
|
||||||
|
--- a/src/tools/compiletest/src/util.rs
|
||||||
|
+++ b/src/tools/compiletest/src/util.rs
|
||||||
|
@@ -2,6 +2,7 @@
|
||||||
|
use std::env;
|
||||||
|
use std::ffi::OsStr;
|
||||||
|
use std::path::PathBuf;
|
||||||
|
+use std::process::Command;
|
||||||
|
|
||||||
|
use tracing::*;
|
||||||
|
|
||||||
|
@@ -111,3 +112,25 @@ fn with_extra_extension<S: AsRef<OsStr>>(&self, extension: S) -> PathBuf {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+/// The name of the environment variable that holds dynamic library locations.
|
||||||
|
+pub fn dylib_env_var() -> &'static str {
|
||||||
|
+ if cfg!(windows) {
|
||||||
|
+ "PATH"
|
||||||
|
+ } else if cfg!(target_os = "macos") {
|
||||||
|
+ "DYLD_LIBRARY_PATH"
|
||||||
|
+ } else if cfg!(target_os = "haiku") {
|
||||||
|
+ "LIBRARY_PATH"
|
||||||
|
+ } else {
|
||||||
|
+ "LD_LIBRARY_PATH"
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/// Adds a list of lookup paths to `cmd`'s dynamic library lookup path.
|
||||||
|
+/// If the dylib_path_var is already set for this cmd, the old value will be overwritten!
|
||||||
|
+pub fn add_dylib_path(cmd: &mut Command, paths: impl Iterator<Item = impl Into<PathBuf>>) {
|
||||||
|
+ let path_env = env::var_os(dylib_env_var());
|
||||||
|
+ let old_paths = path_env.as_ref().map(env::split_paths);
|
||||||
|
+ let new_paths = paths.map(Into::into).chain(old_paths.into_iter().flatten());
|
||||||
|
+ cmd.env(dylib_env_var(), env::join_paths(new_paths).unwrap());
|
||||||
|
+}
|
||||||
|
--
|
||||||
|
2.38.1
|
||||||
|
|
@ -0,0 +1,51 @@
|
|||||||
|
# Explicitly use bindir tools, in case others are in the PATH,
|
||||||
|
# like the rustup shims in a user's ~/.cargo/bin/.
|
||||||
|
#
|
||||||
|
# Since cargo 1.31, install only uses $CARGO_HOME/config, ignoring $PWD.
|
||||||
|
# https://github.com/rust-lang/cargo/issues/6397
|
||||||
|
# But we can set CARGO_HOME locally, which is a good idea anyway to make sure
|
||||||
|
# it never writes to ~/.cargo during rpmbuild.
|
||||||
|
%__cargo %{_bindir}/env CARGO_HOME=.cargo %{_bindir}/cargo
|
||||||
|
%__rustc %{_bindir}/rustc
|
||||||
|
%__rustdoc %{_bindir}/rustdoc
|
||||||
|
|
||||||
|
# Enable optimization, debuginfo, and link hardening.
|
||||||
|
%__global_rustflags -Copt-level=3 -Cdebuginfo=2 -Clink-arg=-Wl,-z,relro,-z,now
|
||||||
|
|
||||||
|
%__global_rustflags_toml [%{lua:
|
||||||
|
for arg in string.gmatch(rpm.expand("%{__global_rustflags}"), "%S+") do
|
||||||
|
print('"' .. arg .. '", ')
|
||||||
|
end}]
|
||||||
|
|
||||||
|
%cargo_prep(V:) (\
|
||||||
|
%{__mkdir} -p .cargo \
|
||||||
|
cat > .cargo/config << EOF \
|
||||||
|
[build]\
|
||||||
|
rustc = "%{__rustc}"\
|
||||||
|
rustdoc = "%{__rustdoc}"\
|
||||||
|
rustflags = %{__global_rustflags_toml}\
|
||||||
|
\
|
||||||
|
[install]\
|
||||||
|
root = "%{buildroot}%{_prefix}"\
|
||||||
|
\
|
||||||
|
[term]\
|
||||||
|
verbose = true\
|
||||||
|
EOF\
|
||||||
|
%if 0%{-V:1}\
|
||||||
|
%{__tar} -xoaf %{S:%{-V*}}\
|
||||||
|
cat >> .cargo/config << EOF \
|
||||||
|
\
|
||||||
|
[source.crates-io]\
|
||||||
|
replace-with = "vendored-sources"\
|
||||||
|
\
|
||||||
|
[source.vendored-sources]\
|
||||||
|
directory = "./vendor"\
|
||||||
|
EOF\
|
||||||
|
%endif\
|
||||||
|
)
|
||||||
|
|
||||||
|
%cargo_build %__cargo build --release %{?_smp_mflags}
|
||||||
|
|
||||||
|
%cargo_test %__cargo test --release %{?_smp_mflags} --no-fail-fast
|
||||||
|
|
||||||
|
%cargo_install %__cargo install --no-track --path .
|
@ -0,0 +1,18 @@
|
|||||||
|
--- rustc-1.61.0-src/src/etc/rust-gdb.orig 2022-05-17 18:29:36.000000000 -0700
|
||||||
|
+++ rustc-1.61.0-src/src/etc/rust-gdb 2022-05-18 11:18:13.732709661 -0700
|
||||||
|
@@ -14,6 +14,9 @@ fi
|
||||||
|
RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
|
||||||
|
GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
|
||||||
|
|
||||||
|
+RUST_STD_BUILD="@BUILDDIR@/library/"
|
||||||
|
+RUST_STD_SRC="$RUSTC_SYSROOT/lib/rustlib/src/rust/library/"
|
||||||
|
+
|
||||||
|
# Run GDB with the additional arguments that load the pretty printers
|
||||||
|
# Set the environment variable `RUST_GDB` to overwrite the call to a
|
||||||
|
# different/specific command (defaults to `gdb`).
|
||||||
|
@@ -21,4 +24,5 @@ RUST_GDB="${RUST_GDB:-gdb}"
|
||||||
|
PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" exec ${RUST_GDB} \
|
||||||
|
--directory="$GDB_PYTHON_MODULE_DIRECTORY" \
|
||||||
|
-iex "add-auto-load-safe-path $GDB_PYTHON_MODULE_DIRECTORY" \
|
||||||
|
+ -iex "set substitute-path $RUST_STD_BUILD $RUST_STD_SRC" \
|
||||||
|
"$@"
|
@ -0,0 +1,90 @@
|
|||||||
|
--- rustc-beta-src/Cargo.lock.orig 2022-10-04 10:55:48.797517289 -0700
|
||||||
|
+++ rustc-beta-src/Cargo.lock 2022-10-04 10:55:48.799517248 -0700
|
||||||
|
@@ -1026,7 +1026,6 @@
|
||||||
|
dependencies = [
|
||||||
|
"cc",
|
||||||
|
"libc",
|
||||||
|
- "libnghttp2-sys",
|
||||||
|
"libz-sys",
|
||||||
|
"openssl-sys",
|
||||||
|
"pkg-config",
|
||||||
|
@@ -1993,16 +1992,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-beta-src/src/tools/cargo/Cargo.toml.orig 2022-10-04 10:55:48.799517248 -0700
|
||||||
|
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2022-10-04 11:00:55.057162743 -0700
|
||||||
|
@@ -21,7 +21,7 @@
|
||||||
|
cargo-platform = { path = "crates/cargo-platform", version = "0.1.2" }
|
||||||
|
cargo-util = { path = "crates/cargo-util", version = "0.2.1" }
|
||||||
|
crates-io = { path = "crates/crates-io", version = "0.34.0" }
|
||||||
|
-curl = { version = "0.4.43", features = ["http2"] }
|
||||||
|
+curl = { version = "0.4.43", features = [] }
|
||||||
|
curl-sys = "0.4.55"
|
||||||
|
env_logger = "0.9.0"
|
||||||
|
pretty_env_logger = { version = "0.4", optional = true }
|
||||||
|
--- rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs.orig 2022-09-24 10:23:17.000000000 -0700
|
||||||
|
+++ rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs 2022-10-04 10:55:48.799517248 -0700
|
||||||
|
@@ -192,16 +192,8 @@
|
||||||
|
}
|
||||||
|
self.fetch_started = true;
|
||||||
|
|
||||||
|
- // We've enabled the `http2` feature of `curl` in Cargo, so treat
|
||||||
|
- // failures here as fatal as it would indicate a build-time problem.
|
||||||
|
- self.multiplexing = self.config.http_config()?.multiplexing.unwrap_or(true);
|
||||||
|
-
|
||||||
|
- self.multi
|
||||||
|
- .pipelining(false, self.multiplexing)
|
||||||
|
- .with_context(|| "failed to enable multiplexing/pipelining in curl")?;
|
||||||
|
-
|
||||||
|
- // let's not flood the server with connections
|
||||||
|
- self.multi.set_max_host_connections(2)?;
|
||||||
|
+ // Multiplexing is disabled because the system libcurl doesn't support it.
|
||||||
|
+ self.multiplexing = false;
|
||||||
|
|
||||||
|
self.config
|
||||||
|
.shell()
|
||||||
|
--- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig 2022-09-24 10:23:17.000000000 -0700
|
||||||
|
+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2022-10-04 10:55:48.800517227 -0700
|
||||||
|
@@ -403,16 +403,9 @@
|
||||||
|
sources: SourceMap<'cfg>,
|
||||||
|
config: &'cfg Config,
|
||||||
|
) -> CargoResult<PackageSet<'cfg>> {
|
||||||
|
- // We've enabled the `http2` feature of `curl` in Cargo, so treat
|
||||||
|
- // failures here as fatal as it would indicate a build-time problem.
|
||||||
|
- 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)?;
|
||||||
|
+ // Multiplexing is disabled because the system libcurl doesn't support it.
|
||||||
|
+ let multi = Multi::new();
|
||||||
|
+ let multiplexing = false;
|
||||||
|
|
||||||
|
Ok(PackageSet {
|
||||||
|
packages: package_ids
|
||||||
|
@@ -658,7 +651,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);
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
--- rustc-beta-src/Cargo.lock.orig 2022-09-24 10:20:14.000000000 -0700
|
||||||
|
+++ rustc-beta-src/Cargo.lock 2022-10-04 10:26:35.490270607 -0700
|
||||||
|
@@ -1971,7 +1971,6 @@
|
||||||
|
dependencies = [
|
||||||
|
"cc",
|
||||||
|
"libc",
|
||||||
|
- "libssh2-sys",
|
||||||
|
"libz-sys",
|
||||||
|
"openssl-sys",
|
||||||
|
"pkg-config",
|
||||||
|
@@ -2004,20 +2003,6 @@
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
-name = "libssh2-sys"
|
||||||
|
-version = "0.2.23"
|
||||||
|
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
-checksum = "b094a36eb4b8b8c8a7b4b8ae43b2944502be3e59cd87687595cf6b0a71b3f4ca"
|
||||||
|
-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-beta-src/vendor/git2/Cargo.toml.orig 2022-10-04 10:26:35.490270607 -0700
|
||||||
|
+++ rustc-beta-src/vendor/git2/Cargo.toml 2022-10-04 10:28:14.002187686 -0700
|
||||||
|
@@ -58,9 +58,7 @@
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = [
|
||||||
|
- "ssh",
|
||||||
|
"https",
|
||||||
|
- "ssh_key_from_memory",
|
||||||
|
]
|
||||||
|
https = [
|
||||||
|
"libgit2-sys/https",
|
@ -0,0 +1,43 @@
|
|||||||
|
--- rustc-beta-src/compiler/rustc_codegen_ssa/src/back/link.rs.orig 2022-09-24 10:20:14.000000000 -0700
|
||||||
|
+++ rustc-beta-src/compiler/rustc_codegen_ssa/src/back/link.rs 2022-10-05 11:24:21.759564185 -0700
|
||||||
|
@@ -755,7 +755,7 @@
|
||||||
|
&& 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);
|
||||||
|
@@ -774,7 +774,7 @@
|
||||||
|
&& 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.
|
||||||
|
@@ -1520,15 +1520,15 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
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.
|
||||||
|
+ #[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) {
|
||||||
|
(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,
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue