public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/chromium] epel9-next: fixed build failure with clang 18
@ 2026-08-07 16:06 Than Ngo
  0 siblings, 0 replies; only message in thread
From: Than Ngo @ 2026-08-07 16:06 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/chromium
Branch : epel9-next
Commit : a5fbe20b02b16a67b3d976151bc26eb32f969da6
Author : Than Ngo <than@redhat.com>
Date   : 2024-03-06T14:55:37+01:00
Stats  : +56/-56 in 3 file(s)
URL    : https://src.fedoraproject.org/rpms/chromium/c/a5fbe20b02b16a67b3d976151bc26eb32f969da6?branch=epel9-next

Log:
fixed build failure with clang 18

---
diff --git a/chromium-121-rust-clang_lib.patch b/chromium-121-rust-clang_lib.patch
deleted file mode 100644
index 70327ef..0000000
--- a/chromium-121-rust-clang_lib.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-diff -up chromium-121.0.6167.57/build/config/clang/BUILD.gn.rust-clang_lib chromium-121.0.6167.57/build/config/clang/BUILD.gn
---- chromium-121.0.6167.57/build/config/clang/BUILD.gn.rust-clang_lib	2024-01-10 16:43:01.000000000 +0100
-+++ chromium-121.0.6167.57/build/config/clang/BUILD.gn	2024-01-20 19:51:38.481992799 +0100
-@@ -112,6 +112,7 @@ template("clang_lib") {
-       _prefix = "lib"
-       _suffix = ""
-       _ext = "a"
-+      _libprefix = ""
-       if (is_win) {
-         _dir = "windows"
-         _prefix = ""
-@@ -127,7 +128,33 @@ template("clang_lib") {
-         }
-       } else if (is_apple) {
-         _dir = "darwin"
--      } else if (is_linux || is_chromeos) {
-+      } else if (is_linux) {
-+        if (current_cpu == "x64") {
-+          _dir = "x86_64-redhat-linux-gnu"
-+          _suffix ="-x86_64"
-+        } else if (current_cpu == "x86") {
-+          _dir = "i386-redhat-linux-gnu"
-+          _suffix = "-i386"
-+        } else if (current_cpu == "arm64") {
-+          _dir = "aarch64-redhat-linux-gnu"
-+          _suffix = "-aarch64"
-+        } else if (current_cpu == "arm") {
-+          _dir = "armhf-redhat-linux-gnu"
-+          _suffix = "-armhf"
-+        } else if (current_cpu == "ppc64") {
-+          _dir = "powerpc64le-redhat-linux-gnu"
-+          _suffix = "-powerpc64le"
-+        } else {
-+          assert(false)  # Unhandled cpu type
-+        }
-+        # different clang lib dir in fedora/epel
-+        if (clang_version == "17") {
-+          _suffix = ""
-+        } else if (clang_version == "16" || clang_version == "14") {
-+          _libprefix = "64"
-+          _dir = ""
-+        }
-+      } else if (is_chromeos) {
-         if (current_cpu == "x64") {
-           _dir = "x86_64-unknown-linux-gnu"
-         } else if (current_cpu == "x86") {
-@@ -166,7 +193,7 @@ template("clang_lib") {
-         assert(false)  # Unhandled target platform
-       }
- 
--      _clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib"
-+      _clang_lib_dir = "$clang_base_path/lib${_libprefix}/clang/$clang_version/lib"
-       _lib_file = "${_prefix}clang_rt.${_libname}${_suffix}.${_ext}"
-       libs = [ "$_clang_lib_dir/$_dir/$_lib_file" ]
-     }

diff --git a/chromium-122-rust-clang_lib.patch b/chromium-122-rust-clang_lib.patch
new file mode 100644
index 0000000..1212438
--- /dev/null
+++ b/chromium-122-rust-clang_lib.patch
@@ -0,0 +1,55 @@
+diff -up chromium-121.0.6167.57/build/config/clang/BUILD.gn.rust-clang_lib chromium-121.0.6167.57/build/config/clang/BUILD.gn
+--- chromium-121.0.6167.57/build/config/clang/BUILD.gn.rust-clang_lib	2024-01-10 16:43:01.000000000 +0100
++++ chromium-121.0.6167.57/build/config/clang/BUILD.gn	2024-01-20 19:51:38.481992799 +0100
+@@ -112,6 +112,7 @@ template("clang_lib") {
+       _prefix = "lib"
+       _suffix = ""
+       _ext = "a"
++      _libprefix = ""
+       if (is_win) {
+         _dir = "windows"
+         _prefix = ""
+@@ -127,7 +128,33 @@ template("clang_lib") {
+         }
+       } else if (is_apple) {
+         _dir = "darwin"
+-      } else if (is_linux || is_chromeos) {
++      } else if (is_linux) {
++        if (current_cpu == "x64") {
++          _dir = "x86_64-redhat-linux-gnu"
++          _suffix ="-x86_64"
++        } else if (current_cpu == "x86") {
++          _dir = "i386-redhat-linux-gnu"
++          _suffix = "-i386"
++        } else if (current_cpu == "arm64") {
++          _dir = "aarch64-redhat-linux-gnu"
++          _suffix = "-aarch64"
++        } else if (current_cpu == "arm") {
++          _dir = "armhf-redhat-linux-gnu"
++          _suffix = "-armhf"
++        } else if (current_cpu == "ppc64") {
++          _dir = "powerpc64le-redhat-linux-gnu"
++          _suffix = "-powerpc64le"
++        } else {
++          assert(false)  # Unhandled cpu type
++        }
++        # different clang lib dir in fedora/epel
++        if (clang_version == "17" || clang_version == "18") {
++          _suffix = ""
++        } else if (clang_version == "16" || clang_version == "14") {
++          _libprefix = "64"
++          _dir = ""
++        }
++      } else if (is_chromeos) {
+         if (current_cpu == "x64") {
+           _dir = "x86_64-unknown-linux-gnu"
+         } else if (current_cpu == "x86") {
+@@ -166,7 +193,7 @@ template("clang_lib") {
+         assert(false)  # Unhandled target platform
+       }
+ 
+-      _clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib"
++      _clang_lib_dir = "$clang_base_path/lib${_libprefix}/clang/$clang_version/lib"
+       _lib_file = "${_prefix}clang_rt.${_libname}${_suffix}.${_ext}"
+       libs = [ "$_clang_lib_dir/$_dir/$_lib_file" ]
+     }

diff --git a/chromium.spec b/chromium.spec
index c5fa05f..ab53d6c 100644
--- a/chromium.spec
+++ b/chromium.spec
@@ -481,7 +481,7 @@ patch356: chromium-122-disable-FFmpegAllowLists.patch
 Patch357: chromium-122-clang16-disable-auto-upgrade-debug-info.patch
 
 # set clang_lib path
-Patch358: chromium-121-rust-clang_lib.patch
+Patch358: chromium-122-rust-clang_lib.patch
 
 # upstream patches
 Patch400: chromium-122-el8-support-64kpage.patch

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-07 16:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-07 16:06 [rpms/chromium] epel9-next: fixed build failure with clang 18 Than Ngo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox