Skip to content

Commit

Permalink
rust: Upgrade 1.68.2 -> 1.69.0
Browse files Browse the repository at this point in the history
Rebase patches, drop crossbeam_atomic is this fully merged upstream.

https://blog.rust-lang.org/2023/04/20/Rust-1.69.0.html

(From OE-Core rev: 3109bd75a80daf00652743a0788e99bc44d68e4e)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
  • Loading branch information
akiernan authored and alexandrebelloni committed Apr 27, 2023
1 parent 1202207 commit 9e43151
Show file tree
Hide file tree
Showing 12 changed files with 99 additions and 139 deletions.
2 changes: 1 addition & 1 deletion meta/conf/distro/include/tcmode-default.inc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ LINUXLIBCVERSION ?= "6.1%"
QEMUVERSION ?= "7.2%"
GOVERSION ?= "1.20%"
LLVMVERSION ?= "15.%"
RUSTVERSION ?= "1.68%"
RUSTVERSION ?= "1.69%"

PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
library/std/src/sys/unix/fs.rs | 27 ++++++++++++++++++++-------
3 files changed, 38 insertions(+), 12 deletions(-)

diff --git a/library/std/src/os/linux/fs.rs b/library/std/src/os/linux/fs.rs
index 479bbcc17a8..ab0b2a3eda3 100644
--- a/library/std/src/os/linux/fs.rs
+++ b/library/std/src/os/linux/fs.rs
Index: rustc-1.69.0-src/library/std/src/os/linux/fs.rs
===================================================================
--- rustc-1.69.0-src.orig/library/std/src/os/linux/fs.rs
+++ rustc-1.69.0-src/library/std/src/os/linux/fs.rs
@@ -329,7 +329,14 @@ pub trait MetadataExt {
impl MetadataExt for Metadata {
#[allow(deprecated)]
Expand All @@ -39,11 +39,11 @@ index 479bbcc17a8..ab0b2a3eda3 100644
}
fn st_dev(&self) -> u64 {
self.as_inner().as_inner().st_dev as u64
diff --git a/library/std/src/sys/unix/fd.rs b/library/std/src/sys/unix/fd.rs
index dbaa3c33e2e..5d31557bd11 100644
--- a/library/std/src/sys/unix/fd.rs
+++ b/library/std/src/sys/unix/fd.rs
@@ -115,9 +115,12 @@ pub fn read_to_end(&self, buf: &mut Vec<u8>) -> io::Result<usize> {
Index: rustc-1.69.0-src/library/std/src/sys/unix/fd.rs
===================================================================
--- rustc-1.69.0-src.orig/library/std/src/sys/unix/fd.rs
+++ rustc-1.69.0-src/library/std/src/sys/unix/fd.rs
@@ -121,9 +121,12 @@ impl FileDesc {
}

pub fn read_at(&self, buf: &mut [u8], offset: u64) -> io::Result<usize> {
Expand All @@ -58,7 +58,7 @@ index dbaa3c33e2e..5d31557bd11 100644
use libc::pread64;

unsafe {
@@ -181,9 +184,12 @@ pub fn is_write_vectored(&self) -> bool {
@@ -276,9 +279,12 @@ impl FileDesc {
}

pub fn write_at(&self, buf: &[u8], offset: u64) -> io::Result<usize> {
Expand All @@ -73,11 +73,11 @@ index dbaa3c33e2e..5d31557bd11 100644
use libc::pwrite64;

unsafe {
diff --git a/library/std/src/sys/unix/fs.rs b/library/std/src/sys/unix/fs.rs
index aea0c26ee8b..e7be4729ca6 100644
--- a/library/std/src/sys/unix/fs.rs
+++ b/library/std/src/sys/unix/fs.rs
@@ -45,19 +45,24 @@
Index: rustc-1.69.0-src/library/std/src/sys/unix/fs.rs
===================================================================
--- rustc-1.69.0-src.orig/library/std/src/sys/unix/fs.rs
+++ rustc-1.69.0-src/library/std/src/sys/unix/fs.rs
@@ -46,9 +46,13 @@ use libc::{c_int, mode_t};
all(target_os = "linux", target_env = "gnu")
))]
use libc::c_char;
Expand All @@ -93,20 +93,19 @@ index aea0c26ee8b..e7be4729ca6 100644
use libc::fstatat64;
#[cfg(any(
target_os = "android",
target_os = "solaris",
target_os = "fuchsia",
@@ -57,9 +61,10 @@ use libc::fstatat64;
target_os = "redox",
- target_os = "illumos"
+ target_os = "illumos",
+ target_env = "musl"
target_os = "illumos",
target_os = "nto",
+ target_env = "musl",
))]
use libc::readdir as readdir64;
-#[cfg(target_os = "linux")]
+#[cfg(all(target_os = "linux", not(target_env = "musl")))]
use libc::readdir64;
#[cfg(any(target_os = "emscripten", target_os = "l4re"))]
use libc::readdir64_r;
@@ -77,7 +82,13 @@
@@ -80,7 +85,13 @@ use libc::{
dirent as dirent64, fstat as fstat64, fstatat as fstatat64, ftruncate64, lseek64,
lstat as lstat64, off64_t, open as open64, stat as stat64,
};
Expand All @@ -120,7 +119,7 @@ index aea0c26ee8b..e7be4729ca6 100644
target_os = "linux",
target_os = "emscripten",
target_os = "l4re",
@@ -87,7 +98,7 @@
@@ -90,7 +101,7 @@ use libc::{
dirent as dirent64, fstat as fstat64, ftruncate as ftruncate64, lseek as lseek64,
lstat as lstat64, off_t as off64_t, open as open64, stat as stat64,
};
Expand All @@ -129,23 +128,23 @@ index aea0c26ee8b..e7be4729ca6 100644
use libc::{dirent64, fstat64, ftruncate64, lseek64, lstat64, off64_t, open64, stat64};

pub use crate::sys_common::fs::try_exists;
@@ -260,6 +271,7 @@ unsafe impl Sync for Dir {}
@@ -277,6 +288,7 @@ unsafe impl Sync for Dir {}
#[cfg(any(
target_os = "android",
target_os = "linux",
+ not(target_env = "musl"),
target_os = "solaris",
target_os = "illumos",
target_os = "fuchsia",
@@ -292,6 +304,7 @@ struct dirent64_min {
@@ -311,6 +323,7 @@ struct dirent64_min {
}

#[cfg(not(any(
+ target_env = "musl",
target_os = "android",
target_os = "linux",
target_os = "solaris",
@@ -745,7 +758,7 @@ pub fn file_name(&self) -> OsString {
@@ -786,7 +799,7 @@ impl DirEntry {
}

#[cfg(all(
Expand All @@ -154,7 +153,7 @@ index aea0c26ee8b..e7be4729ca6 100644
not(miri)
))]
pub fn metadata(&self) -> io::Result<FileAttr> {
@@ -769,7 +782,7 @@ pub fn metadata(&self) -> io::Result<FileAttr> {
@@ -810,7 +823,7 @@ impl DirEntry {
}

#[cfg(any(
Expand All @@ -163,6 +162,3 @@ index aea0c26ee8b..e7be4729ca6 100644
miri
))]
pub fn metadata(&self) -> io::Result<FileAttr> {
--
2.39.0

Large diffs are not rendered by default.

50 changes: 0 additions & 50 deletions meta/recipes-devtools/rust/files/crossbeam_atomic.patch

This file was deleted.

11 changes: 5 additions & 6 deletions meta/recipes-devtools/rust/files/hardcodepaths.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ to resolve these issues properly upstream.

Upstream-Status: Inappropriate [patches need rework]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>

Index: rustc-1.66.0-src/compiler/rustc_codegen_llvm/src/context.rs
===================================================================
--- rustc-1.66.0-src.orig/compiler/rustc_codegen_llvm/src/context.rs
+++ rustc-1.66.0-src/compiler/rustc_codegen_llvm/src/context.rs
@@ -160,46 +160,6 @@ pub unsafe fn create_module<'ll>(
--- rustc-1.69.0-src/compiler/rustc_codegen_llvm/src/context.rs.orig 2023-04-21 08:38:23.092458478 +0100
+++ rustc-1.69.0-src/compiler/rustc_codegen_llvm/src/context.rs 2023-04-21 08:39:00.266819755 +0100
@@ -156,46 +156,6 @@
}
}

Expand Down Expand Up @@ -39,7 +38,7 @@ Index: rustc-1.66.0-src/compiler/rustc_codegen_llvm/src/context.rs
- //
- // FIXME(#34960)
- let cfg_llvm_root = option_env!("CFG_LLVM_ROOT").unwrap_or("");
- let custom_llvm_used = cfg_llvm_root.trim() != "";
- let custom_llvm_used = !cfg_llvm_root.trim().is_empty();
-
- if !custom_llvm_used && target_data_layout != llvm_data_layout {
- bug!(
Expand Down
Loading

0 comments on commit 9e43151

Please sign in to comment.