public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Than Ngo <than@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/chromium] epel9-next: fixed build failure with clang 18
Date: Fri, 07 Aug 2026 16:06:08 GMT	[thread overview]
Message-ID: <178611876848.1.8324134663333492978.rpms-chromium-a5fbe20b02b1@fedoraproject.org> (raw)

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

                 reply	other threads:[~2026-08-07 16:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178611876848.1.8324134663333492978.rpms-chromium-a5fbe20b02b1@fedoraproject.org \
    --to=than@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox