chromium/fix-rust-linking.patch
Than Ngo 8afd224270 - Update to 144.0.7559.59
* CVE-2026-0899: Out of bounds memory access in V8
  * CVE-2026-0900: Inappropriate implementation in V8
  * CVE-2026-0901: Inappropriate implementation in Blink
  * CVE-2026-0902: Inappropriate implementation in V8
  * CVE-2026-0903: Insufficient validation of untrusted input in Downloads
  * CVE-2026-0904: Incorrect security UI in Digital Credentials
  * CVE-2026-0905: Insufficient policy enforcement in Network
  * CVE-2026-0906: Incorrect security UI
  * CVE-2026-0907: Incorrect security UI in Split View
  * CVE-2026-0908: Use after free in ANGLE
2026-01-14 11:03:27 +01:00

34 lines
1.9 KiB
Diff

Index: chromium-144.0.7559.59/build/toolchain/gcc_toolchain.gni
===================================================================
--- chromium-144.0.7559.59.orig/build/toolchain/gcc_toolchain.gni
+++ chromium-144.0.7559.59/build/toolchain/gcc_toolchain.gni
@@ -415,7 +415,13 @@ template("single_gcc_toolchain") {
# -soname flag is not available on aix ld
soname_flag = "-Wl,-soname=\"$soname\""
}
- link_command = "$ld -shared $soname_flag {{ldflags}}${extra_ldflags} -o \"$unstripped_sofile\" @\"$rspfile\" {{rlibs}}"
+ if (target_cpu == "ppc64") {
+ # Work around linker failures due to Rust libraries and the use of whole-archive
+ link_command = "$ld -shared $soname_flag -Wl,--start-group {{ldflags}}${extra_ldflags} -o \"$unstripped_sofile\" @\"$rspfile\" {{rlibs}} -Wl,--end-group"
+ }
+ else {
+ link_command = "$ld -shared $soname_flag {{ldflags}}${extra_ldflags} -o \"$unstripped_sofile\" @\"$rspfile\" {{rlibs}}"
+ }
# Generate a map file to be used for binary size analysis.
# Map file adds ~10% to the link time on a z620.
@@ -527,7 +533,13 @@ template("single_gcc_toolchain") {
whole_archive_flag = "-Wl,--whole-archive"
no_whole_archive_flag = "-Wl,--no-whole-archive"
}
- command = "$ld -shared {{ldflags}}${extra_ldflags} -o \"$unstripped_sofile\" $soname_flag @\"$rspfile\""
+ if (target_cpu == "ppc64") {
+ # Work around linker failures due to Rust libraries and the use of whole-archive
+ command = "$ld -shared -Wl,--start-group {{ldflags}}${extra_ldflags} -o \"$unstripped_sofile\" $soname_flag @\"$rspfile\" -Wl,--end-group"
+ }
+ else {
+ command = "$ld -shared {{ldflags}}${extra_ldflags} -o \"$unstripped_sofile\" $soname_flag @\"$rspfile\""
+ }
if (defined(invoker.strip)) {
strip_command = "${invoker.strip} -o \"$sofile\" \"$unstripped_sofile\""