Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Jun 2024 14:53:48 GMT
From:      Mikael Urankar <mikael@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 2f482fb4b131 - main - lang/rust: Attempt to fix build on armv7
Message-ID:  <202406231453.45NErmVx071903@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by mikael:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2f482fb4b131052bf7ae55704b7d7200e7a11e69

commit 2f482fb4b131052bf7ae55704b7d7200e7a11e69
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2024-06-23 14:51:30 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2024-06-23 14:51:30 +0000

    lang/rust: Attempt to fix build on armv7
    
    Reported by:    mandree,mmel
---
 ...h-vendor_rustix_src_backend_libc_fs_syscalls.rs | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/lang/rust/files/armv7/patch-vendor_rustix_src_backend_libc_fs_syscalls.rs b/lang/rust/files/armv7/patch-vendor_rustix_src_backend_libc_fs_syscalls.rs
new file mode 100644
index 000000000000..b379aae77f08
--- /dev/null
+++ b/lang/rust/files/armv7/patch-vendor_rustix_src_backend_libc_fs_syscalls.rs
@@ -0,0 +1,24 @@
+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);
+     }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202406231453.45NErmVx071903>