pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

rust184: add overlooked patch for the previous change...



Module Name:	pkgsrc-wip
Committed By:	Havard Eidnes <he%NetBSD.org@localhost>
Pushed By:	he
Date:		Mon Feb 3 15:20:40 2025 +0000
Changeset:	314aefb167d594030c989918cd168e86abadc0f0

Added Files:
	rust184/patches/patch-vendor_line-index-0.1.2_src_lib.rs

Log Message:
rust184: add overlooked patch for the previous change...

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=314aefb167d594030c989918cd168e86abadc0f0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 .../patch-vendor_line-index-0.1.2_src_lib.rs       | 42 ++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diffs:
diff --git a/rust184/patches/patch-vendor_line-index-0.1.2_src_lib.rs b/rust184/patches/patch-vendor_line-index-0.1.2_src_lib.rs
new file mode 100644
index 0000000000..4d14411866
--- /dev/null
+++ b/rust184/patches/patch-vendor_line-index-0.1.2_src_lib.rs
@@ -0,0 +1,42 @@
+$NetBSD$
+
+Do not attempt use of neon extension in big-endian mode.
+
+--- vendor/line-index-0.1.2/src/lib.rs.orig	2025-02-03 07:59:39.771200202 +0000
++++ vendor/line-index-0.1.2/src/lib.rs
+@@ -235,7 +235,7 @@ fn analyze_source_file_dispatch(
+     }
+ }
+ 
+-#[cfg(target_arch = "aarch64")]
++#[cfg(all(target_arch = "aarch64", target_endian = "little"))]
+ fn analyze_source_file_dispatch(
+     src: &str,
+     lines: &mut Vec<TextSize>,
+@@ -347,7 +347,7 @@ unsafe fn analyze_source_file_sse2(
+ }
+ 
+ #[target_feature(enable = "neon")]
+-#[cfg(target_arch = "aarch64")]
++#[cfg(all(target_arch = "aarch64", target_endian = "little"))]
+ #[inline]
+ // See https://community.arm.com/arm-community-blogs/b/infrastructure-solutions-blog/posts/porting-x86-vector-bitmask-optimizations-to-arm-neon
+ //
+@@ -362,7 +362,7 @@ unsafe fn move_mask(v: std::arch::aarch6
+ }
+ 
+ #[target_feature(enable = "neon")]
+-#[cfg(target_arch = "aarch64")]
++#[cfg(all(target_arch = "aarch64", target_endian = "little"))]
+ unsafe fn analyze_source_file_neon(
+     src: &str,
+     lines: &mut Vec<TextSize>,
+@@ -441,7 +441,7 @@ unsafe fn analyze_source_file_neon(
+     }
+ }
+ 
+-#[cfg(not(any(target_arch = "x86", target_arch = "x86_64", target_arch = "aarch64")))]
++#[cfg(not(any(target_arch = "x86", target_arch = "x86_64", all(target_arch = "aarch64", target_endian = "little"))))]
+ // The target (or compiler version) does not support SSE2 ...
+ fn analyze_source_file_dispatch(
+     src: &str,


Home | Main Index | Thread Index | Old Index