Name: custom-macros Version: 1.0 Release: 10%{?dist} Summary: Buildroot macros: clang + ThinLTO + x86-64-v3 for user-space rebuilds License: MIT URL: https://copr.fedorainfracloud.org/coprs/garrus/clang-opt/ Source0: macros.z-clang-opt BuildArch: noarch # Pull the clang toolchain into the buildroot: the default mock buildroot # only ships gcc, and this project's macros switch rpmbuild to clang. Requires: clang Requires: lld # llvm-profdata, needed by specs whose CMake enables clang PGO (e.g. svt-av1 # with SVT_AV1_PGO=ON aborts with "llvm-profdata not found" without it). Requires: llvm %description Installs the macro override file at /etc/rpm/macros (rpm's site-default override, loaded last), flipping this COPR project's builds to the clang toolchain via redhat-rpm-config's native %toolchain machinery: clang + ThinLTO (%_clang_lto) + x86-64-v3 [AVX2] baseline (%__cflags_arch_x86_64), linking through lld (%_distro_extra_ldflags -fuse-ld=lld). Debug/debuginfo subpackages are disabled for slim builds, and %%check is skipped (rebuild repo). Requires clang+lld so the buildroot can actually run the switched toolchain. %prep %setup -q -c -T %install install -d %{buildroot}%{_sysconfdir}/rpm install -m 0644 %{SOURCE0} %{buildroot}%{_sysconfdir}/rpm/macros install -d %{buildroot}%{_rpmconfigdir}/macros.d install -m 0644 %{SOURCE0} %{buildroot}%{_rpmconfigdir}/macros.d/macros.z-clang-opt %files %{_sysconfdir}/rpm/macros %{_rpmconfigdir}/macros.d/macros.z-clang-opt %changelog * Tue Oct 13 2026 Garrus <128003623+lshyrilser1@users.noreply.github.com> - 1.0-10 - Override %dist to append ".clangopt" after the dist tag, so clang-opt rebuilds of identical-NVR Fedora packages sort strictly newer (3.fc45.clangopt > 3.fc45) and dnf auto-selects/retains them. Ends the "dnf update never picks the optimized build; a manual reinstall --repo is required" behavior. * Sun Oct 12 2026 Lutherus <128003623+lshyrilser1@users.noreply.github.com> - 1.0-9 - Require llvm: svt-av1's build enables clang PGO and aborts with "llvm-profdata not found" when the tool is absent from the buildroot. * Sun Oct 12 2026 Lutherus <128003623+lshyrilser1@users.noreply.github.com> - 1.0-8 - Set the check-pre macro to a bare "exit 0". Appending it after the build-pre macro produced "cd