lang/rust: drop "gnu" in the target env for armv6/7

PR:		282518
This commit is contained in:
Mikael Urankar
2024-10-31 18:10:09 +01:00
parent 10ed8a473f
commit 05961664b7
4 changed files with 20 additions and 44 deletions

View File

@@ -1,24 +0,0 @@
gnueabihf was changed to gnu in this commit and it breaks rustix
https://github.com/rust-lang/rust/commit/93ec0e6299e31e6857e8ad741750034f35762b11
--- vendor/rustix-0.38.28/src/backend/libc/fs/syscalls.rs.orig 2024-05-06 16:29:17.182875000 +0200
+++ vendor/rustix-0.38.28/src/backend/libc/fs/syscalls.rs 2024-05-06 16:29:48.897744000 +0200
@@ -140,7 +140,7 @@ pub(crate) fn open(path: &CStr, oflags: OFlags, mode:
pub(crate) fn open(path: &CStr, oflags: OFlags, mode: Mode) -> io::Result<OwnedFd> {
// Work around <https://sourceware.org/bugzilla/show_bug.cgi?id=17523>.
// glibc versions before 2.25 don't handle `O_TMPFILE` correctly.
- #[cfg(all(unix, target_env = "gnu", not(target_os = "hurd")))]
+ #[cfg(all(unix, target_env = "gnu", not(any(target_os = "freebsd", target_os = "hurd"))))]
if oflags.contains(OFlags::TMPFILE) && crate::backend::if_glibc_is_less_than_2_25() {
return open_via_syscall(path, oflags, mode);
}
@@ -203,7 +203,7 @@ pub(crate) fn openat(
) -> io::Result<OwnedFd> {
// Work around <https://sourceware.org/bugzilla/show_bug.cgi?id=17523>.
// glibc versions before 2.25 don't handle `O_TMPFILE` correctly.
- #[cfg(all(unix, target_env = "gnu", not(target_os = "hurd")))]
+ #[cfg(all(unix, target_env = "gnu", not(any(target_os = "freebsd", target_os = "hurd"))))]
if oflags.contains(OFlags::TMPFILE) && crate::backend::if_glibc_is_less_than_2_25() {
return openat_via_syscall(dirfd, path, oflags, mode);
}

View File

@@ -0,0 +1,10 @@
--- compiler/rustc_target/src/spec/targets/armv6_unknown_freebsd.rs.orig 2024-10-31 18:07:58.495590000 +0100
+++ compiler/rustc_target/src/spec/targets/armv6_unknown_freebsd.rs 2024-10-31 18:08:05.438220000 +0100
@@ -14,7 +14,6 @@ pub fn target() -> Target {
arch: "arm".into(),
options: TargetOptions {
abi: "eabihf".into(),
- env: "gnu".into(),
features: "+v6,+vfp2,-d32".into(),
max_atomic_width: Some(64),
mcount: "\u{1}__gnu_mcount_nc".into(),

View File

@@ -0,0 +1,10 @@
--- compiler/rustc_target/src/spec/targets/armv7_unknown_freebsd.rs.orig 2024-10-31 18:07:51.199947000 +0100
+++ compiler/rustc_target/src/spec/targets/armv7_unknown_freebsd.rs 2024-10-31 18:08:14.463398000 +0100
@@ -14,7 +14,6 @@ pub fn target() -> Target {
arch: "arm".into(),
options: TargetOptions {
abi: "eabihf".into(),
- env: "gnu".into(),
features: "+v7,+vfp3,-d32,+thumb2,-neon".into(),
max_atomic_width: Some(64),
mcount: "\u{1}__gnu_mcount_nc".into(),

View File

@@ -1,20 +0,0 @@
--- vendor/nix-0.28.0/src/sys/signal.rs.orig 2024-06-14 14:06:00 UTC
+++ vendor/nix-0.28.0/src/sys/signal.rs
@@ -1099,7 +1099,7 @@ pub type type_of_thread_id = libc::lwpid_t;
#[cfg(target_os = "freebsd")]
pub type type_of_thread_id = libc::lwpid_t;
/// Identifies a thread for [`SigevNotify::SigevThreadId`]
-#[cfg(all(not(target_os = "hurd"), any(target_env = "gnu", target_env = "uclibc")))]
+#[cfg(all(not(any(target_os = "freebsd", target_os = "hurd")), any(target_env = "gnu", target_env = "uclibc")))]
pub type type_of_thread_id = libc::pid_t;
/// Specifies the notification method used by a [`SigEvent`]
@@ -1349,7 +1349,7 @@ mod sigevent {
sev.sigev_value.sival_ptr = si_value as *mut libc::c_void;
sev._sigev_un._threadid = thread_id;
}
- #[cfg(any(target_env = "gnu", target_env = "uclibc"))]
+ #[cfg(all(not(target_os = "freebsd"), any(target_env = "gnu", target_env = "uclibc")))]
SigevNotify::SigevThreadId{signal, thread_id, si_value} => {
sev.sigev_notify = libc::SIGEV_THREAD_ID;
sev.sigev_signo = signal as libc::c_int;