Skip to content

Commit 0d432f7

Browse files
committed
fixup! Rebase Rust and Cargo patches on 1.72.1
1 parent 410362a commit 0d432f7

3 files changed

+16
-15
lines changed

0006-Scratchbox2-needs-to-be-able-to-tell-cargo-the-defau.patch

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ diff --git a/src/tools/cargo/src/cargo/core/compiler/compile_kind.rs b/src/tools
1515
index 73d8f89cc..d35f55d11 100644
1616
--- a/src/tools/cargo/src/cargo/core/compiler/compile_kind.rs
1717
+++ b/src/tools/cargo/src/cargo/core/compiler/compile_kind.rs
18-
@@ -72,6 +72,13 @@ impl CompileKind {
19-
18+
@@ -71,7 +71,13 @@ impl CompileKind {
19+
}
20+
2021
let kinds = match &config.build_config()?.target {
2122
- None => Ok(vec![CompileKind::Host]),
2223
+ None => {
@@ -25,6 +26,6 @@ index 73d8f89cc..d35f55d11 100644
2526
+ } else {
2627
+ Ok(vec![CompileKind::Host])
2728
+ }
28-
+ },
29+
+ }
2930
Some(build_target_config) => dedup(&build_target_config.values(config)?),
3031
};

0008-Revert-Use-statx-s-64-bit-times-on-32-bit-linux-gnu.patch

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ index bf49ad70590..ff01830e0f6 100644
7171
- stx_mtime: libc::statx_timestamp,
7272
-
7373
}
74-
74+
7575
- // We prefer `statx` on Linux if available, which contains file creation time,
7676
- // as well as 64-bit timestamps of all kinds.
7777
- // Default `stat64` contains no creation time and may have 32-bit `time_t`.
@@ -92,7 +92,7 @@ index bf49ad70590..ff01830e0f6 100644
9292
- #[cfg(target_pointer_width = "32")]
9393
- stx_mtime: buf.stx_mtime,
9494
};
95-
95+
9696
Some(Ok(FileAttr { stat, statx_extra_fields: Some(extra) }))
9797
@@ -365,36 +349,6 @@ impl FileAttr {
9898
fn from_stat64(stat: stat64) -> Self {
@@ -141,15 +141,15 @@ index bf49ad70590..ff01830e0f6 100644
141141
+ tv_nsec: self.stat.st_mtimensec as libc::c_long,
142142
+ }))
143143
}
144-
144+
145145
pub fn accessed(&self) -> io::Result<SystemTime> {
146146
- Ok(SystemTime::new(self.stat.st_atime as i64, self.stat.st_atimensec as i64))
147147
+ Ok(SystemTime::from(libc::timespec {
148148
+ tv_sec: self.stat.st_atime as libc::time_t,
149149
+ tv_nsec: self.stat.st_atimensec as libc::c_long,
150150
+ }))
151151
}
152-
152+
153153
pub fn created(&self) -> io::Result<SystemTime> {
154154
- Ok(SystemTime::new(self.stat.st_birthtime as i64, self.stat.st_birthtimensec as i64))
155155
+ Ok(SystemTime::from(libc::timespec {
@@ -158,7 +158,7 @@ index bf49ad70590..ff01830e0f6 100644
158158
+ }))
159159
}
160160
}
161-
161+
162162
@@ -441,19 +404,18 @@ impl FileAttr {
163163
target_os = "vita"
164164
)))]
@@ -176,7 +176,7 @@ index bf49ad70590..ff01830e0f6 100644
176176
+ tv_nsec: self.stat.st_mtime_nsec as _,
177177
+ }))
178178
}
179-
179+
180180
#[cfg(any(target_os = "vxworks", target_os = "espidf", target_os = "vita"))]
181181
pub fn modified(&self) -> io::Result<SystemTime> {
182182
- Ok(SystemTime::new(self.stat.st_mtime as i64, 0))
@@ -185,7 +185,7 @@ index bf49ad70590..ff01830e0f6 100644
185185
+ tv_nsec: 0,
186186
+ }))
187187
}
188-
188+
189189
#[cfg(target_os = "horizon")]
190190
@@ -468,19 +430,18 @@ pub fn modified(&self) -> io::Result<SystemTime> {
191191
target_os = "vita"
@@ -204,7 +204,7 @@ index bf49ad70590..ff01830e0f6 100644
204204
+ tv_nsec: self.stat.st_atime_nsec as _,
205205
+ }))
206206
}
207-
207+
208208
#[cfg(any(target_os = "vxworks", target_os = "espidf", target_os = "vita"))]
209209
pub fn accessed(&self) -> io::Result<SystemTime> {
210210
- Ok(SystemTime::new(self.stat.st_atime as i64, 0))
@@ -213,7 +213,7 @@ index bf49ad70590..ff01830e0f6 100644
213213
+ tv_nsec: 0,
214214
+ }))
215215
}
216-
216+
217217
#[cfg(target_os = "horizon")]
218218
@@ -497,7 +458,10 @@ pub fn accessed(&self) -> io::Result<SystemTime> {
219219
target_os = "watchos",
@@ -225,7 +225,7 @@ index bf49ad70590..ff01830e0f6 100644
225225
+ tv_nsec: self.stat.st_birthtime_nsec as libc::c_long,
226226
+ }))
227227
}
228-
228+
229229
#[cfg(not(any(
230230
@@ -513,7 +477,10 @@ pub fn created(&self) -> io::Result<SystemTime> {
231231
cfg_has_statx! {
@@ -244,7 +244,7 @@ index 17b4130c202..4e8dd9a86e7 100644
244244
--- a/library/std/src/sys/unix/time.rs
245245
+++ b/library/std/src/sys/unix/time.rs
246246
@@ -36,6 +36,7 @@ pub(in crate::sys::unix) struct Timespec {
247-
247+
248248
impl SystemTime {
249249
#[cfg_attr(target_os = "horizon", allow(unused))]
250250
+ #[cfg_attr(target_env = "gnu", allow(dead_code))]

rust.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Patch4: 0004-Force-the-target-when-building-for-CompileKind-Host.patch
7676
Patch5: 0005-Provide-ENV-controls-to-bypass-some-sb2-calls-betwee.patch
7777
Patch6: 0006-Scratchbox2-needs-to-be-able-to-tell-cargo-the-defau.patch
7878
Patch7: 0007-Disable-aarch64-outline-atomics-for-now.patch
79-
Patch8: 0008-Revert-Use-statxs-64-bit-times-on-32-bit-linux-gnu.patch
79+
Patch8: 0008-Revert-Use-statx-s-64-bit-times-on-32-bit-linux-gnu.patch
8080
# This is the real rustc spec - the stub one appears near the end.
8181
%ifarch %ix86
8282

0 commit comments

Comments
 (0)