Skip to content

Commit

Permalink
Rebase patches on 1.75.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rubdos committed Dec 29, 2023
1 parent bc474b9 commit 74da0f8
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 48 deletions.
6 changes: 3 additions & 3 deletions 0001-Set-proper-llvm-targets.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ Signed-off-by: Ruben De Smet <ruben.de.smet@rubdos.be>
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config.example.toml b/config.example.toml
index 5c4bee87553..63946e46122 100644
index e5df28a49af..48a9fafea6f 100644
--- a/config.example.toml
+++ b/config.example.toml
@@ -88,7 +88,7 @@ changelog-seen = 2
@@ -99,7 +99,7 @@ change-id = 116881
# the resulting rustc being unable to compile for the disabled architectures.
#
# To add support for new targets, see https://rustc-dev-guide.rust-lang.org/building/new-target.html.
Expand All @@ -23,5 +23,5 @@ index 5c4bee87553..63946e46122 100644
# LLVM experimental targets to build support for. These targets are specified in
# the same format as above, but since these targets are experimental, they are
--
2.42.0
2.43.0

12 changes: 6 additions & 6 deletions 0002-Disable-statx-for-all-builds.-JB-50106.patch
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Signed-off-by: Ruben De Smet <ruben.de.smet@rubdos.be>
1 file changed, 2 insertions(+), 30 deletions(-)

diff --git a/library/std/src/sys/unix/fs.rs b/library/std/src/sys/unix/fs.rs
index a5604c92a80..8438d7dcc30 100644
index 40eb910fdc3..8798aa7061c 100644
--- a/library/std/src/sys/unix/fs.rs
+++ b/library/std/src/sys/unix/fs.rs
@@ -17,28 +17,11 @@
Expand Down Expand Up @@ -49,10 +49,10 @@ index a5604c92a80..8438d7dcc30 100644
- all(target_os = "linux", target_env = "gnu")
-))]
-use libc::c_char;
#[cfg(any(target_os = "linux", target_os = "emscripten", target_os = "android"))]
use libc::dirfd;
#[cfg(any(target_os = "linux", target_os = "emscripten"))]
@@ -98,20 +81,9 @@
#[cfg(any(
all(target_os = "linux", not(target_env = "musl")),
target_os = "emscripten",
@@ -117,20 +100,9 @@
// https://github.com/rust-lang/rust/pull/67774
macro_rules! cfg_has_statx {
({ $($then_tt:tt)* } else { $($else_tt:tt)* }) => {
Expand All @@ -76,5 +76,5 @@ index a5604c92a80..8438d7dcc30 100644

cfg_has_statx! {{
--
2.42.0
2.43.0

Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ Signed-off-by: Ruben De Smet <ruben.de.smet@rubdos.be>
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
index f00472f181d..a2b9fbf82db 100644
index f745bc390ca..934f16ab4ab 100644
--- a/compiler/rustc_session/src/config.rs
+++ b/compiler/rustc_session/src/config.rs
@@ -2226,7 +2226,14 @@ pub fn parse_target_triple(
@@ -2241,7 +2241,14 @@ pub fn parse_target_triple(
})
}
Some(target) => TargetTriple::TargetTriple(target),
Expand All @@ -35,5 +35,5 @@ index f00472f181d..a2b9fbf82db 100644
}

--
2.42.0
2.43.0

22 changes: 11 additions & 11 deletions 0005-Provide-ENV-controls-to-bypass-some-sb2-calls-betwee.patch
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ Signed-off-by: Ruben De Smet <ruben.de.smet@rubdos.be>
2 files changed, 172 insertions(+), 20 deletions(-)

diff --git a/library/std/src/sys/unix/process/process_common.rs b/library/std/src/sys/unix/process/process_common.rs
index 640648e8707..f15625e0514 100644
index bac32d9e60e..3cd9767da88 100644
--- a/library/std/src/sys/unix/process/process_common.rs
+++ b/library/std/src/sys/unix/process/process_common.rs
@@ -84,7 +84,7 @@ pub unsafe fn sigaddset(set: *mut libc::sigset_t, signum: libc::c_int) -> libc::
@@ -85,7 +85,7 @@ pub unsafe fn sigaddset(set: *mut libc::sigset_t, signum: libc::c_int) -> libc::
////////////////////////////////////////////////////////////////////////////////

pub struct Command {
Expand All @@ -53,7 +53,7 @@ index 640648e8707..f15625e0514 100644
args: Vec<CString>,
/// Exactly what will be passed to `execvp`.
///
@@ -93,6 +93,13 @@ pub struct Command {
@@ -94,6 +94,13 @@ pub struct Command {
/// `args` to properly update this as well.
argv: Argv,
env: CommandEnv,
Expand All @@ -67,7 +67,7 @@ index 640648e8707..f15625e0514 100644

program_kind: ProgramKind,
cwd: Option<CString>,
@@ -109,6 +116,14 @@ pub struct Command {
@@ -110,6 +117,14 @@ pub struct Command {
pgroup: Option<pid_t>,
}

Expand All @@ -82,7 +82,7 @@ index 640648e8707..f15625e0514 100644
// Create a new type for argv, so that we can make it `Send` and `Sync`
struct Argv(Vec<*const c_char>);

@@ -181,16 +196,24 @@ pub fn new(program: &OsStr) -> Command {
@@ -183,16 +198,24 @@ pub fn new(program: &OsStr) -> Command {
let mut saw_nul = false;
let program_kind = ProgramKind::new(program.as_ref());
let program = os2c(program, &mut saw_nul);
Expand Down Expand Up @@ -110,7 +110,7 @@ index 640648e8707..f15625e0514 100644
closures: Vec::new(),
groups: None,
stdin: None,
@@ -205,16 +228,24 @@ pub fn new(program: &OsStr) -> Command {
@@ -207,16 +230,24 @@ pub fn new(program: &OsStr) -> Command {
let mut saw_nul = false;
let program_kind = ProgramKind::new(program.as_ref());
let program = os2c(program, &mut saw_nul);
Expand Down Expand Up @@ -138,7 +138,7 @@ index 640648e8707..f15625e0514 100644
closures: Vec::new(),
groups: None,
stdin: None,
@@ -225,6 +256,16 @@ pub fn new(program: &OsStr) -> Command {
@@ -227,6 +258,16 @@ pub fn new(program: &OsStr) -> Command {
}
}

Expand All @@ -156,7 +156,7 @@ index 640648e8707..f15625e0514 100644
// Set a new arg0
let arg = os2c(arg, &mut self.saw_nul);
diff --git a/library/std/src/sys/unix/process/process_unix.rs b/library/std/src/sys/unix/process/process_unix.rs
index 3963e7f52d5..b491c2ad75f 100644
index 72aca4e6659..495368b58ec 100644
--- a/library/std/src/sys/unix/process/process_unix.rs
+++ b/library/std/src/sys/unix/process/process_unix.rs
@@ -25,7 +25,7 @@
Expand Down Expand Up @@ -350,7 +350,7 @@ index 3963e7f52d5..b491c2ad75f 100644
}

if let Some(pgroup) = self.get_pgroup() {
@@ -401,8 +504,12 @@ fn drop(&mut self) {
@@ -408,8 +511,12 @@ fn drop(&mut self) {
_reset = Some(Reset(*sys::os::environ()));
*sys::os::environ() = envp.as_ptr();
}
Expand All @@ -365,15 +365,15 @@ index 3963e7f52d5..b491c2ad75f 100644
Err(io::Error::last_os_error())
}

@@ -429,6 +536,7 @@ fn posix_spawn(
@@ -436,6 +543,7 @@ fn posix_spawn(
_: &ChildPipes,
_: Option<&CStringArray>,
) -> io::Result<Option<Process>> {
+ eprintln!("process_unix:270: in null posix_spawn");
Ok(None)
}

@@ -452,12 +560,15 @@ fn posix_spawn(
@@ -459,12 +567,15 @@ fn posix_spawn(
use crate::mem::MaybeUninit;
use crate::sys::{self, cvt_nz, unix_sigpipe_attr_specified};

Expand Down
12 changes: 6 additions & 6 deletions 0007-Disable-aarch64-outline-atomics-for-now.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ The feature causes linking problems.

Signed-off-by: Matti Lehtimäki <matti.lehtimaki@jolla.com>
---
compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs | 2 +-
.../rustc_target/src/spec/targets/aarch64_unknown_linux_gnu.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs
index da246089440..8c5daccc331 100644
--- a/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs
+++ b/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs
diff --git a/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_gnu.rs
index c0b07db3818..b8f240295be 100644
--- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_gnu.rs
+++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_gnu.rs
@@ -7,7 +7,7 @@ pub fn target() -> Target {
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),
Expand All @@ -27,5 +27,5 @@ index da246089440..8c5daccc331 100644
max_atomic_width: Some(128),
supported_sanitizers: SanitizerSet::ADDRESS
--
2.42.0
2.43.0

38 changes: 19 additions & 19 deletions 0008-Revert-Use-statx-s-64-bit-times-on-32-bit-linux-gnu.patch
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ This reverts commit fec4818fdb40c82679f57fa7f26fcddc1a874c13.
3 files changed, 42 insertions(+), 89 deletions(-)

diff --git a/library/std/src/os/linux/fs.rs b/library/std/src/os/linux/fs.rs
index 479bbcc17a8..2e90d8d6be7 100644
index ab0b2a3eda3..4ac9ae4fd04 100644
--- a/library/std/src/os/linux/fs.rs
+++ b/library/std/src/os/linux/fs.rs
@@ -356,34 +356,19 @@ fn st_size(&self) -> u64 {
@@ -363,34 +363,19 @@ fn st_size(&self) -> u64 {
self.as_inner().as_inner().st_size as u64
}
fn st_atime(&self) -> i64 {
Expand Down Expand Up @@ -55,10 +55,10 @@ index 479bbcc17a8..2e90d8d6be7 100644
fn st_ctime_nsec(&self) -> i64 {
self.as_inner().as_inner().st_ctime_nsec as i64
diff --git a/library/std/src/sys/unix/fs.rs b/library/std/src/sys/unix/fs.rs
index 8438d7dcc30..c5ca8582f88 100644
index 8798aa7061c..1d92664b2e1 100644
--- a/library/std/src/sys/unix/fs.rs
+++ b/library/std/src/sys/unix/fs.rs
@@ -98,19 +98,10 @@ struct StatxExtraFields {
@@ -117,19 +117,10 @@ struct StatxExtraFields {
// This is needed to check if btime is supported by the filesystem.
stx_mask: u32,
stx_btime: libc::statx_timestamp,
Expand All @@ -80,7 +80,7 @@ index 8438d7dcc30..c5ca8582f88 100644
unsafe fn try_statx(
fd: c_int,
path: *const c_char,
@@ -200,13 +191,6 @@ fn statx(
@@ -219,13 +210,6 @@ fn statx(
let extra = StatxExtraFields {
stx_mask: buf.stx_mask,
stx_btime: buf.stx_btime,
Expand All @@ -94,7 +94,7 @@ index 8438d7dcc30..c5ca8582f88 100644
};

Some(Ok(FileAttr { stat, statx_extra_fields: Some(extra) }))
@@ -354,36 +338,6 @@ impl FileAttr {
@@ -380,36 +364,6 @@ impl FileAttr {
fn from_stat64(stat: stat64) -> Self {
Self { stat, statx_extra_fields: None }
}
Expand Down Expand Up @@ -131,7 +131,7 @@ index 8438d7dcc30..c5ca8582f88 100644
}
} else {
impl FileAttr {
@@ -409,15 +363,24 @@ pub fn file_type(&self) -> FileType {
@@ -435,15 +389,24 @@ pub fn file_type(&self) -> FileType {
#[cfg(target_os = "netbsd")]
impl FileAttr {
pub fn modified(&self) -> io::Result<SystemTime> {
Expand Down Expand Up @@ -159,8 +159,8 @@ index 8438d7dcc30..c5ca8582f88 100644
}
}

@@ -430,19 +393,18 @@ impl FileAttr {
target_os = "vita"
@@ -472,19 +435,18 @@ impl FileAttr {
target_os = "hurd",
)))]
pub fn modified(&self) -> io::Result<SystemTime> {
- #[cfg(target_pointer_width = "32")]
Expand All @@ -186,9 +186,9 @@ index 8438d7dcc30..c5ca8582f88 100644
+ }))
}

#[cfg(target_os = "horizon")]
@@ -457,19 +419,18 @@ pub fn modified(&self) -> io::Result<SystemTime> {
target_os = "vita"
#[cfg(any(target_os = "horizon", target_os = "hurd"))]
@@ -500,19 +462,18 @@ pub fn modified(&self) -> io::Result<SystemTime> {
target_os = "hurd",
)))]
pub fn accessed(&self) -> io::Result<SystemTime> {
- #[cfg(target_pointer_width = "32")]
Expand All @@ -214,8 +214,8 @@ index 8438d7dcc30..c5ca8582f88 100644
+ }))
}

#[cfg(target_os = "horizon")]
@@ -486,7 +447,10 @@ pub fn accessed(&self) -> io::Result<SystemTime> {
#[cfg(any(target_os = "horizon", target_os = "hurd"))]
@@ -529,7 +490,10 @@ pub fn accessed(&self) -> io::Result<SystemTime> {
target_os = "watchos",
))]
pub fn created(&self) -> io::Result<SystemTime> {
Expand All @@ -227,7 +227,7 @@ index 8438d7dcc30..c5ca8582f88 100644
}

#[cfg(not(any(
@@ -502,7 +466,10 @@ pub fn created(&self) -> io::Result<SystemTime> {
@@ -545,7 +509,10 @@ pub fn created(&self) -> io::Result<SystemTime> {
cfg_has_statx! {
if let Some(ext) = &self.statx_extra_fields {
return if (ext.stx_mask & libc::STATX_BTIME) != 0 {
Expand All @@ -240,17 +240,17 @@ index 8438d7dcc30..c5ca8582f88 100644
Err(io::const_io_error!(
io::ErrorKind::Uncategorized,
diff --git a/library/std/src/sys/unix/time.rs b/library/std/src/sys/unix/time.rs
index 17b4130c202..4e8dd9a86e7 100644
index f2e86a4fb2b..fee9e07ec01 100644
--- a/library/std/src/sys/unix/time.rs
+++ b/library/std/src/sys/unix/time.rs
@@ -36,6 +36,7 @@ pub(in crate::sys::unix) struct Timespec {
@@ -34,6 +34,7 @@ pub(in crate::sys::unix) struct Timespec {

impl SystemTime {
#[cfg_attr(target_os = "horizon", allow(unused))]
#[cfg_attr(any(target_os = "horizon", target_os = "hurd"), allow(unused))]
+ #[cfg_attr(target_env = "gnu", allow(dead_code))]
pub fn new(tv_sec: i64, tv_nsec: i64) -> SystemTime {
SystemTime { t: Timespec::new(tv_sec, tv_nsec) }
}
--
2.42.0
2.43.0

0 comments on commit 74da0f8

Please sign in to comment.