|
|
|
@ -76,14 +76,6 @@
|
|
|
|
|
# set esbuild_version
|
|
|
|
|
%global esbuild_version 0.19.2
|
|
|
|
|
|
|
|
|
|
# set latest version for devtoolset and gcc-toolset
|
|
|
|
|
%global dts_version 12
|
|
|
|
|
%if 0%{?rhel} == 8 || 0%{?rhel} == 9
|
|
|
|
|
%global dts_version 13
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%global toolset gcc-toolset
|
|
|
|
|
|
|
|
|
|
%if 0%{?rhel} == 8
|
|
|
|
|
%global chromium_pybin /usr/bin/python3.9
|
|
|
|
|
%else
|
|
|
|
@ -176,31 +168,17 @@
|
|
|
|
|
# enable|disable use_custom_libcxx
|
|
|
|
|
%global use_custom_libcxx 1
|
|
|
|
|
|
|
|
|
|
# enable clang by default
|
|
|
|
|
%global clang 1
|
|
|
|
|
|
|
|
|
|
# enable|disable control flow integrity support
|
|
|
|
|
%global cfi 0
|
|
|
|
|
%ifarch x86_64 aarch64
|
|
|
|
|
%if %{clang}
|
|
|
|
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
|
|
|
|
%global cfi 1
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%ifarch ppc64le
|
|
|
|
|
# workaround for a bug in new llvm on f40/rawhide (ppc64le)
|
|
|
|
|
%global cfi 0
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# set correct toolchain
|
|
|
|
|
%if %{clang}
|
|
|
|
|
%global toolchain clang
|
|
|
|
|
%else
|
|
|
|
|
%global toolchain gcc
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# enable qt backend
|
|
|
|
|
%global use_qt6 0
|
|
|
|
|
%global use_qt 0
|
|
|
|
@ -353,13 +331,6 @@ Patch20: chromium-disable-font-tests.patch
|
|
|
|
|
# don't download binary blob
|
|
|
|
|
Patch21: chromium-123-screen-ai-service.patch
|
|
|
|
|
|
|
|
|
|
# Fix issue where closure_compiler thinks java is only allowed in android builds
|
|
|
|
|
# https://bugs.chromium.org/p/chromium/issues/detail?id=1192875
|
|
|
|
|
Patch65: chromium-91.0.4472.77-java-only-allowed-in-android-builds.patch
|
|
|
|
|
|
|
|
|
|
# Update rjsmin to 1.2.0
|
|
|
|
|
Patch69: chromium-103.0.5060.53-update-rjsmin-to-1.2.0.patch
|
|
|
|
|
|
|
|
|
|
# Disable tests on remoting build
|
|
|
|
|
Patch82: chromium-98.0.4758.102-remoting-no-tests.patch
|
|
|
|
|
|
|
|
|
@ -556,25 +527,10 @@ Source102: https://github.com/deemru/msspi/archive/%{msspi_commit}.tar.gz#/msspi
|
|
|
|
|
Source103: chromium-browser-gost-icons.tar.xz
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{clang}
|
|
|
|
|
BuildRequires: clang
|
|
|
|
|
BuildRequires: clang-tools-extra
|
|
|
|
|
BuildRequires: llvm
|
|
|
|
|
BuildRequires: lld
|
|
|
|
|
# needs for libatomic
|
|
|
|
|
%if 0%{?rhel} >= 8
|
|
|
|
|
BuildRequires: %{toolset}-%{dts_version}-libatomic-devel
|
|
|
|
|
%endif
|
|
|
|
|
%else
|
|
|
|
|
%if 0%{?rhel} == 8
|
|
|
|
|
BuildRequires: %{toolset}-%{dts_version}-binutils, %{toolset}-%{dts_version}-libatomic-devel
|
|
|
|
|
%endif
|
|
|
|
|
%if 0%{?fedora} || 0%{?rhel} > 8
|
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
BuildRequires: gcc
|
|
|
|
|
BuildRequires: binutils
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
BuildRequires: rustc
|
|
|
|
|
|
|
|
|
@ -1179,8 +1135,6 @@ sed -i 's/std::string data_dir_basename = "chromium"/std::string data_dir_basena
|
|
|
|
|
%patch -P20 -p1 -b .disable-font-test
|
|
|
|
|
%patch -P21 -p1 -b .screen-ai-service
|
|
|
|
|
|
|
|
|
|
%patch -P65 -p1 -b .java-only-allowed
|
|
|
|
|
%patch -P69 -p1 -b .update-rjsmin-to-1.2.0
|
|
|
|
|
%patch -P82 -p1 -b .remoting-no-tests
|
|
|
|
|
|
|
|
|
|
%if ! %{bundlebrotli}
|
|
|
|
@ -1404,11 +1358,9 @@ cp -a third_party/dav1d/version/version.h third_party/dav1d/libdav1d/include/dav
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
|
|
# reduce warnings
|
|
|
|
|
%if %{clang}
|
|
|
|
|
FLAGS=' -Wno-deprecated-declarations -Wno-unknown-warning-option -Wno-unused-command-line-argument'
|
|
|
|
|
FLAGS+=' -Wno-unused-but-set-variable -Wno-unused-result -Wno-unused-function -Wno-unused-variable'
|
|
|
|
|
FLAGS+=' -Wno-unused-const-variable -Wno-unneeded-internal-declaration -Wno-unknown-attributes -Wno-unknown-pragmas'
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{system_build_flags}
|
|
|
|
|
CFLAGS=${CFLAGS/-g }
|
|
|
|
@ -1442,29 +1394,16 @@ RUSTFLAGS=${RUSTFLAGS/debuginfo=?/debuginfo=0}
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{clang}
|
|
|
|
|
export CC=clang
|
|
|
|
|
export CXX=clang++
|
|
|
|
|
export AR=llvm-ar
|
|
|
|
|
export NM=llvm-nm
|
|
|
|
|
export READELF=llvm-readelf
|
|
|
|
|
%else
|
|
|
|
|
export CC=gcc
|
|
|
|
|
export CXX=g++
|
|
|
|
|
export AR=ar
|
|
|
|
|
export NM=nm
|
|
|
|
|
export READELF=readelf
|
|
|
|
|
%endif
|
|
|
|
|
export CFLAGS
|
|
|
|
|
export CXXFLAGS
|
|
|
|
|
export LDFLAGS
|
|
|
|
|
export RUSTFLAGS
|
|
|
|
|
|
|
|
|
|
# enable gcc toolset on el8
|
|
|
|
|
%if 0%{?rhel} == 8 && ! %{clang}
|
|
|
|
|
. /opt/rh/%{toolset}-%{dts_version}/enable
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# need for error: the option `Z` is only accepted on the nightly compiler
|
|
|
|
|
export RUSTC_BOOTSTRAP=1
|
|
|
|
|
|
|
|
|
@ -1512,16 +1451,11 @@ CHROMIUM_CORE_GN_DEFINES+=' google_default_client_id="%{default_client_id}"'
|
|
|
|
|
CHROMIUM_CORE_GN_DEFINES+=' google_default_client_secret="%{default_client_secret}"'
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{clang}
|
|
|
|
|
CHROMIUM_CORE_GN_DEFINES+=' is_clang=true'
|
|
|
|
|
CHROMIUM_CORE_GN_DEFINES+=" clang_base_path=\"$clang_base_path\""
|
|
|
|
|
CHROMIUM_CORE_GN_DEFINES+=" clang_version=\"$clang_version\""
|
|
|
|
|
CHROMIUM_CORE_GN_DEFINES+=' clang_use_chrome_plugins=false'
|
|
|
|
|
CHROMIUM_CORE_GN_DEFINES+=' use_lld=true'
|
|
|
|
|
%else
|
|
|
|
|
CHROMIUM_CORE_GN_DEFINES+=' is_clang=false'
|
|
|
|
|
CHROMIUM_CORE_GN_DEFINES+=' use_lld=false'
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# enable system rust
|
|
|
|
|
CHROMIUM_CORE_GN_DEFINES+=' rust_sysroot_absolute="%{_prefix}"'
|
|
|
|
|