From 52367527140335f52a69be77de09b544c2740aab Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Wed, 20 Nov 2024 19:53:07 +0100 Subject: [PATCH] Disable PA_MUSTTAIL to fix build faiure on ppc64le --- HACK-debian-clang-disable-base-musttail.patch | 14 +++++++++++++- chromium.spec | 3 +++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/HACK-debian-clang-disable-base-musttail.patch b/HACK-debian-clang-disable-base-musttail.patch index 0ccc45bc..fbc91160 100644 --- a/HACK-debian-clang-disable-base-musttail.patch +++ b/HACK-debian-clang-disable-base-musttail.patch @@ -6,7 +6,19 @@ diff -up chromium-131.0.6778.69/base/compiler_specific.h.me chromium-131.0.6778. // } // ``` -#if __has_cpp_attribute(clang::musttail) -+#if defined(__clang__) && __has_cpp_attribute(clang::musttail) && !defined(__powerpc64__) ++#if __has_cpp_attribute(clang::musttail) && !defined(__powerpc64__) #define MUSTTAIL [[clang::musttail]] #else #define MUSTTAIL +diff -up chromium-131.0.6778.85/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h.me chromium-131.0.6778.85/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h +--- chromium-131.0.6778.85/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h.me 2024-11-20 18:50:28.690761262 +0100 ++++ chromium-131.0.6778.85/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h 2024-11-20 18:54:49.374711202 +0100 +@@ -138,7 +138,7 @@ + // PA_MUSTTAIL return Func1(d + 1); // `Func1()` will be tail-called. + // } + // ``` +-#if PA_HAS_CPP_ATTRIBUTE(clang::musttail) ++#if PA_HAS_CPP_ATTRIBUTE(clang::musttail) && !defined(__powerpc64__) + #define PA_MUSTTAIL [[clang::musttail]] + #else + #define PA_MUSTTAIL diff --git a/chromium.spec b/chromium.spec index 14a769bf..4d54d170 100644 --- a/chromium.spec +++ b/chromium.spec @@ -146,6 +146,9 @@ # enable|disable use_custom_libcxx %global use_custom_libcxx 0 +%if 0%{?rhel} || 0%{?fedora} == 39 +%global use_custom_libcxx 1 +%endif # enable|disable control flow integrity support %global cfi 0