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: - Enable system libcxx
Date: Fri, 07 Aug 2026 16:08:28 GMT	[thread overview]
Message-ID: <178611890888.1.1571672838174223632.rpms-chromium-c2f0304e514d@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/chromium
            Branch : epel9-next
            Commit : c2f0304e514d7bda44124e0a8f2c216c852eeb58
            Author : Than Ngo <than@redhat.com>
            Date   : 2025-11-24T09:28:20+01:00
            Stats  : +56/-10 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/chromium/c/c2f0304e514d7bda44124e0a8f2c216c852eeb58?branch=epel9-next

            Log:
            - Enable system libcxx
- Fix link error when building with system libcxx
- Apply memory-allocator-dcheck-assert-fix for aarch64

---
diff --git a/chromium-131-fix-qt-ui.pach b/chromium-131-fix-qt-ui.pach
new file mode 100644
index 0000000..d0b778c
--- /dev/null
+++ b/chromium-131-fix-qt-ui.pach
@@ -0,0 +1,19 @@
+From b9075d0e1f687f9a5cf80a7778bde99cece9fdf7 Mon Sep 17 00:00:00 2001
+From: Than Ngo <than@redhat.com>
+Date: Sat, 23 Nov 2024 12:33:22 +0100
+Subject: [PATCH] Enable qt-ui
+
+
+diff -up chromium-131.0.6778.85/ui/qt/qt_shim.cc.me chromium-131.0.6778.85/ui/qt/qt_shim.cc
+--- chromium-131.0.6778.85/ui/qt/qt_shim.cc.me	2024-11-23 10:04:16.789121846 +0100
++++ chromium-131.0.6778.85/ui/qt/qt_shim.cc	2024-11-23 11:40:02.905064702 +0100
+@@ -265,7 +265,7 @@ FontRenderParams QtShim::GetFontRenderPa
+ FontDescription QtShim::GetFontDescription() const {
+   QFont font = app_.font();
+   return {
+-      .family = String(font.family().toStdString().c_str()),
++      .family = String(font.family().toUtf8().constData()),
+       .size_pixels = font.pixelSize(),
+       .size_points = font.pointSize(),
+       .is_italic = IsStyleItalic(font.style()),
+

diff --git a/chromium.spec b/chromium.spec
index 857d545..31e6242 100644
--- a/chromium.spec
+++ b/chromium.spec
@@ -9,6 +9,13 @@
 # official builds have less debugging and go faster... but we have to shut some things off.
 %global official_build 1
 
+# enable|disble use_custom_libcxx
+%global use_custom_libcxx 0
+%if 0%{?rhel}
+# no libcxx in el
+%global use_custom_libcxx 1
+%endif
+
 # enable|disble bootstrap
 %global bootstrap 0
 # workaround for old gn on el9, it causes build error: unknown function filter_labels_include()
@@ -125,9 +132,6 @@
 
 # enable|disable control flow integrity support
 %global cfi 0
-%ifarch x86_64
-%global cfi 0
-%endif
 
 # enable qt backend
 %global enable_qt 1
@@ -245,7 +249,7 @@
 
 Name:	chromium
 Version: 142.0.7444.175
-Release: 3%{?dist}
+Release: 4%{?dist}
 Summary: A WebKit (Blink) powered web browser that Google doesn't want you to use
 Url: http://www.chromium.org/Home
 License: BSD-3-Clause AND LGPL-2.1-or-later AND Apache-2.0 AND IJG AND MIT AND GPL-2.0-or-later AND ISC AND OpenSSL AND (MPL-1.1 OR GPL-2.0-only OR LGPL-2.0-only)
@@ -262,6 +266,9 @@ Patch20: chromium-disable-font-tests.patch
 # don't download binary blob
 Patch21: chromium-123-screen-ai-service.patch
 
+# Fix link error when building with system libcxx
+Patch22: chromium-131-fix-qt-ui.pach
+
 # Disable tests on remoting build
 Patch82: chromium-98.0.4758.102-remoting-no-tests.patch
 
@@ -355,6 +362,8 @@ Patch316: chromium-122-clang-build-flags.patch
 # unknown warning option -Wno-nontrivial-memcall
 Patch317: chromium-142-clang++-unknown-argument.patch
 
+Patch318: memory-allocator-dcheck-assert-fix.patch
+
 # Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=2239523
 # https://bugs.chromium.org/p/chromium/issues/detail?id=1145581#c60
 # Disable BTI until this is fixed upstream.
@@ -422,7 +431,6 @@ Patch402: fix-rust-linking.patch
 Patch403: fix-breakpad-compile.patch
 Patch404: fix-partition-alloc-compile.patch
 Patch405: fix-study-crash.patch
-Patch406: memory-allocator-dcheck-assert-fix.patch
 Patch407: fix-different-data-layouts.patch
 Patch408: 0002-Add-ppc64-trap-instructions.patch
 
@@ -496,6 +504,10 @@ BuildRequires: clang-tools-extra
 BuildRequires: llvm
 BuildRequires: lld
 
+%if ! %{use_custom_libcxx}
+BuildRequires: libcxx-devel
+%endif
+
 %if 0%{?rhel} && 0%{?rhel} <= 9
 BuildRequires: gcc-toolset-14-libatomic-devel
 %endif
@@ -972,6 +984,9 @@ Qt6 UI for chromium.
 
 %patch -P20 -p1 -b .disable-font-test
 %patch -P21 -p1 -b .screen-ai-service
+%if ! %{use_custom_libcxx}
+%patch -P22 -p1 -b .fix-qt-ui
+%endif
 
 %patch -P82 -p1 -b .remoting-no-tests
 
@@ -1050,6 +1065,8 @@ Qt6 UI for chromium.
 %patch -P317 -p1 -b .clang++-unsupported-argument
 %endif
 
+%patch -P318 -p1 -b .memory-allocator-dcheck-assert-fix
+
 %if %{disable_bti}
 %patch -P352 -p1 -b .workaround_for_crash_on_BTI_capable_system
 %endif
@@ -1096,7 +1113,6 @@ Qt6 UI for chromium.
 %patch -P403 -p1 -b .fix-breakpad-compile
 %patch -P404 -p1 -b .fix-partition-alloc-compile
 %patch -P405 -p1 -b .fix-study-crash
-%patch -P406 -p1 -b .memory-allocator-dcheck-assert-fix
 %patch -P407 -p1 -b .fix-different-data-layouts
 %patch -P408 -p1 -b .0002-Add-ppc64-trap-instructions
 %patch -P409 -p1 -b .fix-page-allocator-overflow
@@ -1199,6 +1215,11 @@ CXXFLAGS="$FLAGS"
 CXXFLAGS+=' -faltivec-src-compat=mixed -Wno-deprecated-altivec-src-compat'
 %endif
 
+%if ! %{use_custom_libcxx}
+LDFLAGS="${LDFLAGS} -stdlib=libc++"
+CXXFLAGS="${CXXFLAGS} -stdlib=libc++"
+%endif
+
 export CC=clang
 export CXX=clang++
 export AR=llvm-ar
@@ -1206,6 +1227,7 @@ export NM=llvm-nm
 export READELF=llvm-readelf
 export CFLAGS
 export CXXFLAGS
+export LDFLAGS
 
 # need for error: the option `Z` is only accepted on the nightly compiler
 export RUSTC_BOOTSTRAP=1
@@ -1229,6 +1251,9 @@ CHROMIUM_CORE_GN_DEFINES=""
 # using system toolchain
 CHROMIUM_CORE_GN_DEFINES+=' custom_toolchain="//build/toolchain/linux/unbundle:default"'
 CHROMIUM_CORE_GN_DEFINES+=' host_toolchain="//build/toolchain/linux/unbundle:default"'
+%if ! %{use_custom_libcxx}
+CHROMIUM_BROWSER_GN_DEFINES+=' use_custom_libcxx=false'
+%endif
 CHROMIUM_CORE_GN_DEFINES+=' is_debug=false dcheck_always_on=false dcheck_is_configurable=false'
 CHROMIUM_CORE_GN_DEFINES+=' enable_enterprise_companion=false'
 CHROMIUM_CORE_GN_DEFINES+=' system_libdir="%{_lib}"'
@@ -1286,10 +1311,7 @@ CHROMIUM_CORE_GN_DEFINES+=' symbol_level=%{debug_level} blink_symbol_level=%{deb
 CHROMIUM_CORE_GN_DEFINES+=' angle_has_histograms=false'
 # drop unrar
 CHROMIUM_CORE_GN_DEFINES+=' safe_browsing_use_unrar=false'
-# Disable --warning-suppression-mappings as it causes FTBFS on el/f40/f41 due to old llvm
-%if 0%{?rhel} || 0%{?fedora} == 40 || 0%{?fedora} == 41
-CHROMIUM_CORE_GN_DEFINES+=' clang_warning_suppression_file=""'
-%endif
+CHROMIUM_CORE_GN_DEFINES+=' v8_enable_backtrace=true'
 export CHROMIUM_CORE_GN_DEFINES
 
 # browser gn defines
@@ -1749,6 +1771,11 @@ fi
 %endif
 
 %changelog
+* Mon Nov 24 2025 Than Ngo <than@redhat.com> - 142.0.7444.175-4
+- Enable system libcxx
+- Fix link error when building with system libcxx
+- Apply memory-allocator-dcheck-assert-fix for aarch64
+
 * Thu Nov 20 2025 LuK1337 <priv.luk@gmail.com> - 142.0.7444.175-3
 - Backport Wayland DnD bug fix from upstream
 

                 reply	other threads:[~2026-08-07 16:08 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=178611890888.1.1571672838174223632.rpms-chromium-c2f0304e514d@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