git: f69320cde430 - main - www/ungoogled-chromium: Fix build with rust 1.89.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 01 Sep 2025 08:26:06 UTC
The branch main has been updated by mikael:
URL: https://cgit.FreeBSD.org/ports/commit/?id=f69320cde4307cf56edae4d2c25d2762062a63c3
commit f69320cde4307cf56edae4d2c25d2762062a63c3
Author: Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2025-08-31 09:39:40 +0000
Commit: Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2025-09-01 08:24:04 +0000
www/ungoogled-chromium: Fix build with rust 1.89.0
error:
ld.lld: error: undefined symbol: __rustc::__rust_no_alloc_shim_is_unstable_v2
PR: 288923
Approved by: portmgr (build fix blanket)
---
.../files/patch-build_rust_allocator_lib.rs | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/www/ungoogled-chromium/files/patch-build_rust_allocator_lib.rs b/www/ungoogled-chromium/files/patch-build_rust_allocator_lib.rs
new file mode 100644
index 000000000000..508b657a5761
--- /dev/null
+++ b/www/ungoogled-chromium/files/patch-build_rust_allocator_lib.rs
@@ -0,0 +1,17 @@
+https://chromium.googlesource.com/chromium/src/+/8393b61ba876c8e1614275c97767f9b06b889f48
+https://chromium.googlesource.com/chromium/src/+/6aae0e2353c857d98980ff677bf304288d7c58de
+
+--- build/rust/allocator/lib.rs.orig 2025-06-18 14:17:42.000000000 +0200
++++ build/rust/allocator/lib.rs 2025-08-24 10:57:12.002293000 +0200
+@@ -89,9 +89,8 @@ mod both_allocators {
+ /// As part of rustc's contract for using `#[global_allocator]` without
+ /// rustc-generated shims we must define this symbol, since we are opting in
+ /// to unstable functionality. See https://github.com/rust-lang/rust/issues/123015
+- #[no_mangle]
+- #[linkage = "weak"]
+- static __rust_no_alloc_shim_is_unstable: u8 = 0;
++ #[rustc_std_internal_symbol]
++ fn __rust_no_alloc_shim_is_unstable_v2() {}
+
+ // Mangle the symbol name as rustc expects.
+ #[rustc_std_internal_symbol]