diff --git a/chromium-130.0.6723.92-compiler-rt-adjust-paths.patch b/chromium-130.0.6723.92-compiler-rt-adjust-paths.patch new file mode 100644 index 0000000..0469220 --- /dev/null +++ b/chromium-130.0.6723.92-compiler-rt-adjust-paths.patch @@ -0,0 +1,32 @@ +diff --git a/build/config/clang/BUILD.gn b/build/config/clang/BUILD.gn +index d4de2e0cca0..57359c32121 100644 +--- a/build/config/clang/BUILD.gn ++++ b/build/config/clang/BUILD.gn +@@ -130,12 +130,15 @@ template("clang_lib") { + } else if (is_linux || is_chromeos) { + if (current_cpu == "x64") { + _dir = "x86_64-unknown-linux-gnu" ++ _suffix = "-x86_64" + } else if (current_cpu == "x86") { + _dir = "i386-unknown-linux-gnu" ++ _suffix = "-i386" + } else if (current_cpu == "arm") { + _dir = "armv7-unknown-linux-gnueabihf" + } else if (current_cpu == "arm64") { + _dir = "aarch64-unknown-linux-gnu" ++ _suffix = "-aarch64" + } else { + assert(false) # Unhandled cpu type + } +@@ -166,6 +169,11 @@ template("clang_lib") { + assert(false) # Unhandled target platform + } + ++ # Bit of a hack to make this find builtins from compiler-rt >= 16 ++ if (is_linux || is_chromeos) { ++ _dir = "linux" ++ } ++ + _clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib" + _lib_file = "${_prefix}clang_rt.${_libname}${_suffix}.${_ext}" + libs = [ "$_clang_lib_dir/$_dir/$_lib_file" ] diff --git a/chromium-130.0.6723.92-fix_lib64_in_rust_bindgen.patch b/chromium-130.0.6723.92-fix_lib64_in_rust_bindgen.patch new file mode 100644 index 0000000..22d6cad --- /dev/null +++ b/chromium-130.0.6723.92-fix_lib64_in_rust_bindgen.patch @@ -0,0 +1,31 @@ +--- chromium-130.0.6723.92/build/rust/rust_bindgen.gni.orig 2024-11-04 13:36:04.846905817 +0100 ++++ chromium-130.0.6723.92/build/rust/rust_bindgen.gni 2024-11-04 13:44:25.882207141 +0100 +@@ -22,7 +22,7 @@ + if (host_os == "win") { + _libclang_path += "/bin" + } else { +- _libclang_path += "/lib" ++ _libclang_path += "/lib64" + } + + # Template to build Rust/C bindings with bindgen. +@@ -122,7 +122,7 @@ + # point to. + args += [ + "--ld-library-path", +- rebase_path(clang_base_path + "/lib", root_build_dir), ++ rebase_path(clang_base_path + "/lib64", root_build_dir), + ] + } + +--- chromium-130.0.6723.92/build/rust/rust_bindgen.gni.orig 2024-11-05 09:00:20.400539921 +0100 ++++ chromium-130.0.6723.92/build/rust/rust_bindgen.gni 2024-11-05 09:00:40.482583864 +0100 +@@ -150,7 +150,7 @@ + # make it behave consistently with our other command line flags and allows + # system headers to be found. + clang_resource_dir = +- rebase_path(clang_base_path + "/lib/clang/" + clang_version, ++ rebase_path(clang_base_path + "/lib64/clang/" + clang_version, + root_build_dir) + args += [ + "-resource-dir", diff --git a/chromium-130.0.6723.92-increase-fortify-level.patch b/chromium-130.0.6723.92-increase-fortify-level.patch new file mode 100644 index 0000000..1559b94 --- /dev/null +++ b/chromium-130.0.6723.92-increase-fortify-level.patch @@ -0,0 +1,13 @@ +diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn +index eb329bc88fec..7c98dfddcf8a 100644 +--- a/build/config/compiler/BUILD.gn ++++ b/build/config/compiler/BUILD.gn +@@ -2054,7 +2054,7 @@ config("chromium_code") { + # Non-chromium code is not guaranteed to compile cleanly with + # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are + # disabled, so only do that for Release build. +- fortify_level = "2" ++ fortify_level = "3" + + # ChromeOS's toolchain supports a high-quality _FORTIFY_SOURCE=3 + # implementation with a few custom glibc patches. Use that if it's diff --git a/chromium.spec b/chromium.spec index 58bd75f..ed417f1 100644 --- a/chromium.spec +++ b/chromium.spec @@ -3,7 +3,7 @@ %define clang_version %(clang --version | grep -m1 version | sed 's/[^0-9.]//g' | cut -d. -f1) Name: chromium Epoch: 3 -Version: 126.0.6478.126 +Version: 130.0.6723.92 Release: 1mamba Summary: An open-source browser project that aims to build a safer, faster, and more stable way to experience the web Group: Graphical Desktop/Applications/Internet @@ -19,6 +19,9 @@ Patch2: chromium-116-0.5845.110-aarch64-include-limits.patch Patch4: chromium-126.0.6478.126-drop-flags-unsupported-by-clang17.patch Patch5: chromium-123.0.6312.86-clang-18.patch Patch6: chromium-123.0.6312.86-clang-18-2.patch +Patch7: chromium-130.0.6723.92-fix_lib64_in_rust_bindgen.patch +Patch8: chromium-130.0.6723.92-compiler-rt-adjust-paths.patch +Patch9: chromium-130.0.6723.92-increase-fortify-level.patch License: BSD ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -117,35 +120,34 @@ sed -i -e 's/\/malloc/' -e 's/\/free/' \ -e '1i #include ' \ third_party/blink/renderer/core/xml/*.cc \ third_party/blink/renderer/core/xml/parser/xml_document_parser.cc \ - third_party/libxml/chromium/*.cc \ - third_party/maldoca/src/maldoca/ole/oss_utils.h + third_party/libxml/chromium/*.cc %patch 1 -p1 -b .use-oauth2-client-switches-as-default %patch 2 -p1 -b .aarch64-include-limits -%patch 4 -p1 -b .drop-flags-unsupported-by-clang17 -%patch 5 -p1 -b .clang-18 +#%patch 4 -p1 -b .drop-flags-unsupported-by-clang17 +#%patch 5 -p1 -b .clang-18 %patch 6 -p1 -b .clang-18-2 +%patch 7 -p1 -b .fix_lib64_in_rust_bindgen +%patch 8 -p1 -b .compiler-rt-adjust-paths +%patch 9 -p1 -b .increase-fortify-level # Fixes for building with libstdc++ instead of libc++ #patch -Np1 -i chromium-patches-*/chromium-117-material-color-include.patch # Force script incompatible with Python 3 to use /usr/bin/python2 -sed -i '1s|python$|&2|' third_party/dom_distiller_js/protoc_plugins/*.py +#sed -i '1s|python$|&2|' third_party/dom_distiller_js/protoc_plugins/*.py # Remove compiler flags not supported by our system clang sed -i \ -e '/"-Wno-defaulted-function-deleted"/d' \ build/config/compiler/BUILD.gn -## Use Python 2 -#find . -name '*.py' -exec sed -i -r 's|/usr/bin/python$|&2|g' {} + - # https://crbug.com/893950 sed -i -e 's/\/malloc/' -e 's/\/free/' \ + -e '1i #include ' \ third_party/blink/renderer/core/xml/*.cc \ third_party/blink/renderer/core/xml/parser/xml_document_parser.cc \ - third_party/libxml/chromium/*.cc \ - third_party/maldoca/src/maldoca/ole/oss_utils.h + third_party/libxml/chromium/*.cc ## There are still a lot of relative calls which need a workaround #mkdir -p python2-path @@ -155,7 +157,7 @@ sed -i -e 's/\/malloc/' -e 's/\/free/' \ # Keys are the names in the above script; values are the dependencies in Arch declare -rgA _system_libs=( [brotli]=brotli - [dav1d]=dav1d + #[dav1d]=dav1d #[ffmpeg]=ffmpeg [flac]=flac [fontconfig]=fontconfig @@ -169,7 +171,7 @@ declare -rgA _system_libs=( [libjpeg]=libjpeg [libpng]=libpng #[libvpx]=libvpx - #[libwebp]=libwebp + [libwebp]=libwebp [libxml]=libxml2 [libxslt]=libxslt [opus]=opus @@ -199,7 +201,8 @@ done python3 build/linux/unbundle/replace_gn_files.py \ --system-libraries "${!_system_libs[@]}" -mkdir -p third_party/node/linux/node-linux-x64/bin +# Link to system nodejs and java +rm third_party/node/linux/node-linux-x64/bin/node ln -s %{_bindir}/node third_party/node/linux/node-linux-x64/bin/ ln -s /usr/bin/java third_party/jdk/current/bin/ @@ -207,6 +210,11 @@ ln -s /usr/bin/java third_party/jdk/current/bin/ rm buildtools/third_party/eu-strip/bin/eu-strip ln -s %{_bindir}/eu-strip buildtools/third_party/eu-strip/bin/eu-strip +# test deps are broken for ui/lens with system ICU +# "//third_party/icu:icuuc_public" (taken from Gentoo ebuild) +sed -i '/source_set("unit_tests") {/,/}/d' chrome/browser/ui/lens/BUILD.gn +sed -i '/lens:unit_tests/d' chrome/test/BUILD.gn components/BUILD.gn + # Remove compiler flags not supported by our system clang sed -i \ -e '/"-fsplit-lto-unit"/d' \ @@ -225,7 +233,8 @@ export CC=clang export CXX=clang++ export AR=llvm-ar export NM=llvm-nm - +export LIBCLANG_PATH=%{_libdir} + # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn) export CFLAGS=' -Wno-builtin-macro-redefined -Wno-unknown-warning-option' export CXXFLAGS=' -Wno-builtin-macro-redefined -Wno-unknown-warning-option' @@ -249,11 +258,12 @@ export RUSTC_BOOTSTRAP=1 chromium_conf=( 'custom_toolchain="//build/toolchain/linux/unbundle:default"' 'host_toolchain="//build/toolchain/linux/unbundle:default"' - 'clang_base_path="/usr"' + "clang_base_path=\"%{_prefix}\"" 'clang_use_chrome_plugins=false' - 'clang_version="%{clang_version}"' - 'rust_sysroot_absolute="/usr"' - "rustc_version=\"$(rustc --version)\"" + "clang_version=\"%{clang_version}\"" + "rust_sysroot_absolute=\"%{_prefix}\"" + "rust_bindgen_root=\"%{_prefix}\"" + "rustc_version=\"$(rustc --version)\"" 'is_official_build=true' # implies is_cfi=true on x86_64 'symbol_level=0' 'chrome_pgo_phase=0' # needs newer clang to read the bundled PGO profile @@ -383,8 +393,6 @@ ln -s %{_libdir}/chromium/chromedriver %{buildroot}%{_bindir}/chromedriver ## legacy favorites symlink #ln -s chromium.desktop %{buildroot}%{_datadir}/applications/chromium-devel.desktop -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig %posttrans /usr/bin/update-desktop-database -q @@ -422,6 +430,9 @@ ln -s %{_libdir}/chromium/chromedriver %{buildroot}%{_bindir}/chromedriver %{_mandir}/man1/chromium.1* %changelog +* Tue Nov 05 2024 Automatic Build System 130.0.6723.92-1mamba +- automatic version update by autodist + * Sun Jun 30 2024 Automatic Build System 126.0.6478.126-1mamba - automatic version update by autodist