summaryrefslogtreecommitdiff
path: root/lang/rust/files
diff options
context:
space:
mode:
Diffstat (limited to 'lang/rust/files')
-rw-r--r--lang/rust/files/patch-vendor_cc.rs107
-rw-r--r--lang/rust/files/patch-vendor_openssl_crypto_threads__pthread.c15
-rw-r--r--lang/rust/files/riscv64/patch-vendor_openssl-src_src_lib.rs10
3 files changed, 101 insertions, 31 deletions
diff --git a/lang/rust/files/patch-vendor_cc.rs b/lang/rust/files/patch-vendor_cc.rs
index c711d629e744..4a763326e4f6 100644
--- a/lang/rust/files/patch-vendor_cc.rs
+++ b/lang/rust/files/patch-vendor_cc.rs
@@ -8,21 +8,21 @@ until LLVM can be updated to use libc++ by default.
https://reviews.llvm.org/D77776
---- vendor/cc-1.0.99/src/tool.rs.orig 2024-05-09 18:20:47 UTC
-+++ vendor/cc-1.0.99/src/tool.rs
-@@ -151,9 +151,7 @@ impl Tool {
+--- vendor/cc-1.1.18/src/tool.rs.orig 2025-06-08 20:17:28 UTC
++++ vendor/cc-1.1.18/src/tool.rs
+@@ -174,9 +174,7 @@ impl Tool {
- match (clang, accepts_cl_style_flags, gcc) {
- (clang_cl, true, _) => Ok(ToolFamily::Msvc { clang_cl }),
-- (true, false, _) => Ok(ToolFamily::Clang {
+ match (clang, accepts_cl_style_flags, gcc, emscripten, vxworks) {
+ (clang_cl, true, _, false, false) => Ok(ToolFamily::Msvc { clang_cl }),
+- (true, _, _, _, false) | (_, _, _, true, false) => Ok(ToolFamily::Clang {
- zig_cc: is_zig_cc(path, cargo_output),
- }),
-+ (true, false, _) => Ok(ToolFamily::Gnu),
- (false, false, true) => Ok(ToolFamily::Gnu),
- (false, false, false) => {
- cargo_output.print_warning(&"Compiler family detection failed since it does not define `__clang__`, `__GNUC__` or `_MSC_VER`, fallback to treating it as GNU");
---- vendor/cc-1.1.22/src/tool.rs.orig 2024-05-09 18:20:47 UTC
-+++ vendor/cc-1.1.22/src/tool.rs
++ (true, _, _, _, false) | (_, _, _, true, false) => Ok(ToolFamily::Gnu),
+ (false, false, true, _, false) | (_, _, _, _, true) => Ok(ToolFamily::Gnu),
+ (false, false, false, false, false) => {
+ cargo_output.print_warning(&"Compiler family detection failed since it does not define `__clang__`, `__GNUC__`, `__EMSCRIPTEN__` or `__VXWORKS__`, also does not accept cl style flag `-?`, fallback to treating it as GNU");
+--- vendor/cc-1.2.0/src/tool.rs.orig 2024-12-10 13:16:09 UTC
++++ vendor/cc-1.2.0/src/tool.rs
@@ -174,9 +174,7 @@ impl Tool {
match (clang, accepts_cl_style_flags, gcc, emscripten, vxworks) {
@@ -34,9 +34,9 @@ https://reviews.llvm.org/D77776
(false, false, true, _, false) | (_, _, _, _, true) => Ok(ToolFamily::Gnu),
(false, false, false, false, false) => {
cargo_output.print_warning(&"Compiler family detection failed since it does not define `__clang__`, `__GNUC__`, `__EMSCRIPTEN__` or `__VXWORKS__`, also does not accept cl style flag `-?`, fallback to treating it as GNU");
---- vendor/cc-1.2.0/src/tool.rs.orig 2024-05-09 18:20:47 UTC
-+++ vendor/cc-1.2.0/src/tool.rs
-@@ -174,9 +174,7 @@ impl Tool {
+--- vendor/cc-1.2.13/src/tool.rs.orig 2025-04-01 18:22:03 UTC
++++ vendor/cc-1.2.13/src/tool.rs
+@@ -141,9 +141,7 @@ impl Tool {
match (clang, accepts_cl_style_flags, gcc, emscripten, vxworks) {
(clang_cl, true, _, false, false) => Ok(ToolFamily::Msvc { clang_cl }),
@@ -47,9 +47,9 @@ https://reviews.llvm.org/D77776
(false, false, true, _, false) | (_, _, _, _, true) => Ok(ToolFamily::Gnu),
(false, false, false, false, false) => {
cargo_output.print_warning(&"Compiler family detection failed since it does not define `__clang__`, `__GNUC__`, `__EMSCRIPTEN__` or `__VXWORKS__`, also does not accept cl style flag `-?`, fallback to treating it as GNU");
---- vendor/cc-1.2.10/src/tool.rs.orig 2024-05-09 18:20:47 UTC
-+++ vendor/cc-1.2.10/src/tool.rs
-@@ -174,9 +174,7 @@ impl Tool {
+--- vendor/cc-1.2.16/src/tool.rs.orig 2025-04-01 18:22:03 UTC
++++ vendor/cc-1.2.16/src/tool.rs
+@@ -141,9 +141,7 @@ impl Tool {
match (clang, accepts_cl_style_flags, gcc, emscripten, vxworks) {
(clang_cl, true, _, false, false) => Ok(ToolFamily::Msvc { clang_cl }),
@@ -60,9 +60,74 @@ https://reviews.llvm.org/D77776
(false, false, true, _, false) | (_, _, _, _, true) => Ok(ToolFamily::Gnu),
(false, false, false, false, false) => {
cargo_output.print_warning(&"Compiler family detection failed since it does not define `__clang__`, `__GNUC__`, `__EMSCRIPTEN__` or `__VXWORKS__`, also does not accept cl style flag `-?`, fallback to treating it as GNU");
---- vendor/cc-1.2.13/src/tool.rs.orig 2024-05-09 18:20:47 UTC
-+++ vendor/cc-1.2.13/src/tool.rs
-@@ -174,9 +174,7 @@ impl Tool {
+--- vendor/cc-1.2.19/src/tool.rs.orig 2025-04-01 18:22:03 UTC
++++ vendor/cc-1.2.19/src/tool.rs
+@@ -141,9 +141,7 @@ impl Tool {
+
+ match (clang, accepts_cl_style_flags, gcc, emscripten, vxworks) {
+ (clang_cl, true, _, false, false) => Ok(ToolFamily::Msvc { clang_cl }),
+- (true, _, _, _, false) | (_, _, _, true, false) => Ok(ToolFamily::Clang {
+- zig_cc: is_zig_cc(path, cargo_output),
+- }),
++ (true, _, _, _, false) | (_, _, _, true, false) => Ok(ToolFamily::Gnu),
+ (false, false, true, _, false) | (_, _, _, _, true) => Ok(ToolFamily::Gnu),
+ (false, false, false, false, false) => {
+ cargo_output.print_warning(&"Compiler family detection failed since it does not define `__clang__`, `__GNUC__`, `__EMSCRIPTEN__` or `__VXWORKS__`, also does not accept cl style flag `-?`, fallback to treating it as GNU");
+--- vendor/cc-1.2.20/src/tool.rs.orig 2025-04-01 18:22:03 UTC
++++ vendor/cc-1.2.20/src/tool.rs
+@@ -141,9 +141,7 @@ impl Tool {
+
+ match (clang, accepts_cl_style_flags, gcc, emscripten, vxworks) {
+ (clang_cl, true, _, false, false) => Ok(ToolFamily::Msvc { clang_cl }),
+- (true, _, _, _, false) | (_, _, _, true, false) => Ok(ToolFamily::Clang {
+- zig_cc: is_zig_cc(path, cargo_output),
+- }),
++ (true, _, _, _, false) | (_, _, _, true, false) => Ok(ToolFamily::Gnu),
+ (false, false, true, _, false) | (_, _, _, _, true) => Ok(ToolFamily::Gnu),
+ (false, false, false, false, false) => {
+ cargo_output.print_warning(&"Compiler family detection failed since it does not define `__clang__`, `__GNUC__`, `__EMSCRIPTEN__` or `__VXWORKS__`, also does not accept cl style flag `-?`, fallback to treating it as GNU");
+--- vendor/cc-1.2.23/src/tool.rs.orig 2025-04-01 18:22:03 UTC
++++ vendor/cc-1.2.23/src/tool.rs
+@@ -141,9 +141,7 @@ impl Tool {
+
+ match (clang, accepts_cl_style_flags, gcc, emscripten, vxworks) {
+ (clang_cl, true, _, false, false) => Ok(ToolFamily::Msvc { clang_cl }),
+- (true, _, _, _, false) | (_, _, _, true, false) => Ok(ToolFamily::Clang {
+- zig_cc: is_zig_cc(path, cargo_output),
+- }),
++ (true, _, _, _, false) | (_, _, _, true, false) => Ok(ToolFamily::Gnu),
+ (false, false, true, _, false) | (_, _, _, _, true) => Ok(ToolFamily::Gnu),
+ (false, false, false, false, false) => {
+ cargo_output.print_warning(&"Compiler family detection failed since it does not define `__clang__`, `__GNUC__`, `__EMSCRIPTEN__` or `__VXWORKS__`, also does not accept cl style flag `-?`, fallback to treating it as GNU");
+--- vendor/cc-1.2.25/src/tool.rs.orig 2025-04-01 18:22:03 UTC
++++ vendor/cc-1.2.25/src/tool.rs
+@@ -141,9 +141,7 @@ impl Tool {
+
+ match (clang, accepts_cl_style_flags, gcc, emscripten, vxworks) {
+ (clang_cl, true, _, false, false) => Ok(ToolFamily::Msvc { clang_cl }),
+- (true, _, _, _, false) | (_, _, _, true, false) => Ok(ToolFamily::Clang {
+- zig_cc: is_zig_cc(path, cargo_output),
+- }),
++ (true, _, _, _, false) | (_, _, _, true, false) => Ok(ToolFamily::Gnu),
+ (false, false, true, _, false) | (_, _, _, _, true) => Ok(ToolFamily::Gnu),
+ (false, false, false, false, false) => {
+ cargo_output.print_warning(&"Compiler family detection failed since it does not define `__clang__`, `__GNUC__`, `__EMSCRIPTEN__` or `__VXWORKS__`, also does not accept cl style flag `-?`, fallback to treating it as GNU");
+--- vendor/cc-1.2.26/src/tool.rs.orig 2025-04-01 18:22:03 UTC
++++ vendor/cc-1.2.26/src/tool.rs
+@@ -141,9 +141,7 @@ impl Tool {
+
+ match (clang, accepts_cl_style_flags, gcc, emscripten, vxworks) {
+ (clang_cl, true, _, false, false) => Ok(ToolFamily::Msvc { clang_cl }),
+- (true, _, _, _, false) | (_, _, _, true, false) => Ok(ToolFamily::Clang {
+- zig_cc: is_zig_cc(path, cargo_output),
+- }),
++ (true, _, _, _, false) | (_, _, _, true, false) => Ok(ToolFamily::Gnu),
+ (false, false, true, _, false) | (_, _, _, _, true) => Ok(ToolFamily::Gnu),
+ (false, false, false, false, false) => {
+ cargo_output.print_warning(&"Compiler family detection failed since it does not define `__clang__`, `__GNUC__`, `__EMSCRIPTEN__` or `__VXWORKS__`, also does not accept cl style flag `-?`, fallback to treating it as GNU");
+--- vendor/cc-1.2.27/src/tool.rs.orig 2025-04-01 18:22:03 UTC
++++ vendor/cc-1.2.27/src/tool.rs
+@@ -141,9 +141,7 @@ impl Tool {
match (clang, accepts_cl_style_flags, gcc, emscripten, vxworks) {
(clang_cl, true, _, false, false) => Ok(ToolFamily::Msvc { clang_cl }),
diff --git a/lang/rust/files/patch-vendor_openssl_crypto_threads__pthread.c b/lang/rust/files/patch-vendor_openssl_crypto_threads__pthread.c
new file mode 100644
index 000000000000..03afdc6902f8
--- /dev/null
+++ b/lang/rust/files/patch-vendor_openssl_crypto_threads__pthread.c
@@ -0,0 +1,15 @@
+/usr/ports/security/openssl34/files/patch-crypto_threads__pthread.c
+
+--- vendor/openssl-src-300.5.0+3.5.0/openssl/crypto/threads_pthread.c.orig 2025-05-09 22:37:37.000000000 +0200
++++ vendor/openssl-src-300.5.0+3.5.0/openssl/crypto/threads_pthread.c 2025-05-21 14:44:18.563852000 +0200
+@@ -50,6 +50,10 @@ __tsan_mutex_post_lock((x), 0, 0)
+ # define BROKEN_CLANG_ATOMICS
+ #endif
+
++#if defined(__FreeBSD__) && (defined(__i386__) || (defined(__powerpc__) && defined(__ILP32__)))
++#define BROKEN_CLANG_ATOMICS
++#endif
++
+ #if defined(OPENSSL_THREADS) && !defined(CRYPTO_TDEBUG) && !defined(OPENSSL_SYS_WINDOWS)
+
+ # if defined(OPENSSL_SYS_UNIX)
diff --git a/lang/rust/files/riscv64/patch-vendor_openssl-src_src_lib.rs b/lang/rust/files/riscv64/patch-vendor_openssl-src_src_lib.rs
deleted file mode 100644
index 755907739e36..000000000000
--- a/lang/rust/files/riscv64/patch-vendor_openssl-src_src_lib.rs
+++ /dev/null
@@ -1,10 +0,0 @@
---- vendor/openssl-src-111.28.2+1.1.1w/src/lib.rs.orig 2021-11-04 11:27:54 UTC
-+++ vendor/openssl-src-111.28.2+1.1.1w/src/lib.rs
-@@ -284,6 +284,7 @@ impl Build {
- "powerpc64le-unknown-linux-gnu" => "linux-ppc64le",
- "powerpc64le-unknown-linux-musl" => "linux-ppc64le",
- "riscv64gc-unknown-linux-gnu" => "linux-generic64",
-+ "riscv64gc-unknown-freebsd" => "BSD-generic64",
- "s390x-unknown-linux-gnu" => "linux64-s390x",
- "s390x-unknown-linux-musl" => "linux64-s390x",
- "x86_64-apple-darwin" => "darwin64-x86_64-cc",