## START: Set by rpmautospec ## (rpmautospec version 0.2.5) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 60; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec Name: clang-rpm-macros Version: 1 Release: %autorelease Summary: RPM macros for building RPMs with clang License: GPLv3 URL: http://fedora.org Source0: verify-clang-cc # cyrus-sasl Source1: cyrus-sasl-run Source2: cyrus-sasl-0001-sample-Fix-build-with-clang-and-older-gcc.patch # libgcrypt Source3: libgcrypt-run Source5: libgcrypt-0001-Fix-build-of-jitterentropy-base.c-with-clang-v2.patch # Generic helper script Source6: remove-gcc-from-makefiles # gdb Source9: gdb-run Source10: gdb-0001-Fix-warning-when-compiling-with-clang.patch Source11: gdb-0001-Remove-attributes-from-re-declared-glibc-function.patch # libtasn1 Source14: libtasn1-run Source15: libtasn1-0001-Undefined-behavior-fix.patch # gmp Source16: gmp-run # libcap Source17: libcap-run # libdb Source20: libdb-run # dwz Source21: dwz-run # libsndfile Source22: libsndfile-run Source23: libsndfile-0001-configure-Use-version-script-when-compiling-with-cla.patch # dyninst Source24: dyninst-run Source25: dyninst-0001-Fix-clang-failure.patch Source26: dyninst-0001-Fix-some-build-errors-with-clang.patch # systemtap Source28: systemtap-run Source30: systemtap-0002-util-Use-abs-instead-of-labs.patch Source31: systemtap-0003-Add-some-override-specifiers-where-missing.patch Source32: systemtap-0004-Add-missing-copy-constructors-to-set1_ref-and-set1_c.patch Source33: systemtap-0005-set2-Return-this-from-assignment-operator.patch Source34: systemtap-0006-Fix-Woverloaded-virtual-warnings-when-building-with-.patch Source35: systemtap-0007-Fix-Wformat-nonliteral-and-Wformat-warnings-with-cla.patch Source36: systemtap-0008-dtrace-Use-o-option-to-specify-output-file-for-CPP.patch Source37: systemtap-0009-misc.patch Source38: export-fake-gcc-path.sh Source42: gcc Source43: macros.clang-cc-overrides Source44: vulkan-validation-layers-run Source45: vulkan-validation-layers-remove-copy-assignment-operator.patch BuildArch: noarch # For dwarfdump: Requires: libdwarf-tools # For readelf: Requires: binutils # For llvm-readelf Requires: llvm # The dist tag defined in macros.cc-clang-overrides ties this build to a # specific clang version. Requires: clang = 13.0.0~rc1 %global rrcdir %{_prefix}/lib/rpm/redhat/ %global clangrcdir %{_prefix}/lib/rpm/clang/ %description %{summary} %prep %build %install %{__mkdir_p} %{buildroot}%{rrcdir} %{__install} -p -m 755 -t %{buildroot}%{rrcdir} %{SOURCE0} %{__install} -p -d %{buildroot}%{clangrcdir} # cyrus-sasl %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE1} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE2} # libgcrypt %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE3} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE5} # remove-gcc-from-makefiles %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE6} # unzip ln -s remove-gcc-from-makefiles %{buildroot}%{clangrcdir}/unzip-run # zip ln -s remove-gcc-from-makefiles %{buildroot}%{clangrcdir}/zip-run # gdb %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE9} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE10} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE11} # libtasn1 %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE14} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE15} # gmp %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE16} # libcap %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE17} # libdb %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE20} # dwz %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE21} # libsndfile %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE22} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE23} # dyninst %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE24} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE25} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE26} # systemtap %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE28} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE30} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE31} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE32} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE33} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE34} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE35} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE36} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE37} # Setup fake gcc path %{__install} -p -d %{buildroot}%{_sysconfdir}/profile.d/ %{__install} -p -m 644 -t %{buildroot}%{_sysconfdir}/profile.d/ %{SOURCE38} %{__install} -p -d %{buildroot}%{clangrcdir}/bin ln -s ../../../../bin/gcc %{buildroot}%{clangrcdir}/bin/gcc-real ln -s ../../../../bin/clang %{buildroot}%{clangrcdir}/bin/cc ln -s ../../../../bin/clang++ %{buildroot}%{clangrcdir}/bin/g++ ln -s ../../../../bin/clang++ %{buildroot}%{clangrcdir}/bin/c++ ln -s ../../../../bin/clang-cpp %{buildroot}%{clangrcdir}/bin/cpp # gcc wrapper script %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/bin %{SOURCE42} # RPM macros %{__install} -p -d %{buildroot}%{_sysconfdir}/rpm/ %{__install} -p -m 644 -t %{buildroot}%{_sysconfdir}/rpm/ %{SOURCE43} # vulkan-validation-layers %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE45} %files %{rrcdir}/verify-clang-cc %{clangrcdir}/ %{_sysconfdir}/profile.d/export-fake-gcc-path.sh %{_sysconfdir}/rpm/macros.clang-cc-overrides %changelog * Tue Oct 05 2021 Timm Bäder 1-60 - Remove tpm2-pkcs11 patch * Tue Oct 05 2021 Timm Bäder 1-59 - spec: Use %autorelease and %autochangelog macros * Thu Sep 16 2021 Timm Bäder 1-58 - Update dyninst version in patches * Thu Sep 16 2021 Timm Bäder 1-57 - Add vulkan-validation-layers patch * Thu Sep 02 2021 Tom Stellard 1-56 - Fix file type check in verify-clang-cc * Tue Aug 24 2021 Tom Stellard 1-55 - Add macros file for buildroot overrides * Wed May 26 2021 Timm Bäder 1-54 - Fix tpm2-pkcs11-run * Wed May 26 2021 Tom Stellard 1-53 - Forward --version option on to the real gcc * Tue May 25 2021 Timm Bäder 1-52 - Remove obsolete tpm2-pkcs11 patches * Wed May 19 2021 Timm Bäder 1-51 - Remove obsolete systemtap patch * Wed May 19 2021 Timm Bäder 1-50 - Add thermald exception to gcc script * Wed May 19 2021 Timm Bäder 1-49 - verify-clang-cc: Expand QEMU special case detection * Sat May 08 2021 Timm Bäder 1-48 - Remove obsolete dyninst patch * Sat May 08 2021 Tom Stellard 1-47 - Fix typos in systemtap workarounds * Tue May 04 2021 Timm Bäder 1-46 - Add RPM package exceptions to gcc script * Tue Apr 27 2021 Timm Bäder 1-45 - Add another systemtap patch * Thu Apr 22 2021 Timm Bäder 1-44 - verify: Add qemu special case * Fri Apr 16 2021 Tom Stellard 1-43 - Remove kernel workaround * Fri Apr 16 2021 Timm Bäder 1-42 - Remove unnecessary gdb patches * Fri Apr 09 2021 Tom Stellard 1-41 - Fix bug in gcc wrapper * Fri Apr 09 2021 Tom Stellard 1-40 - Add libtool workaround * Fri Apr 02 2021 Tom Stellard 1-39 - Add cc and c++ symlinks to clang and clang++ * Fri Apr 02 2021 Tom Stellard 1-38 - veryify-clang-cc: Detect and ignore objects built with bpf * Thu Apr 01 2021 Tom Stellard 1-37 - Add tpm2-pkcs11 workarounds * Fri Feb 26 2021 Tom Stellard 1-36 - Remove compiler-rt workaround * Tue Jan 12 2021 Tom Stellard 1-35 - Remove systemd workaround * Fri Jan 08 2021 Tom Stellard 1-34 - Add workaround for kernel * Mon Dec 21 2020 Tom Stellard 1-33 - Update verify-clang-cc * Mon Dec 21 2020 Timm Bäder 1-32 - verify-clang-cc: Change logic for ignoring files * Mon Dec 21 2020 Timm Bäder 1-31 - verify-clang-cc: Call llvm-dwarfdump only once per file * Mon Dec 21 2020 Timm Bäder 1-30 - verify-clang-cc: Fix a typo * Mon Dec 21 2020 Tom Stellard 1-29 - Add gcc symlink to clang * Thu Nov 26 2020 Tom Stellard 1-28 - Add systemtap workarounds * Wed Nov 25 2020 Tom Stellard 1-27 - Add dyninst workaround * Sat Nov 21 2020 Tom Stellard 1-26 - Add libsndfile workaround * Wed Nov 11 2020 Tom Stellard 1-25 - Make verify-cc-clang script more generic * Wed Nov 11 2020 Tom Stellard 1-24 - dwz * Wed Nov 11 2020 Tom Stellard 1-23 - Add dwz workaround * Wed Nov 11 2020 Tom Stellard 1-22 - Add workaround for libdb-run * Tue Nov 10 2020 Tom Stellard 1-21 - Remove one of the libgcrypt workarounds * Mon Nov 09 2020 Tom Stellard 1-20 - Add missing compiler-rt files * Mon Nov 09 2020 Tom Stellard 1-19 - Update libcap-run for 2.44 * Fri Nov 06 2020 Tom Stellard 1-18 - Use --rescurse-depth=0 to speed up llvm-dwarfdump calls * Wed Oct 28 2020 Tom Stellard 1-17 - verify-clang-cc: Add special case for libpython3.so * Mon Oct 26 2020 Tom Stellard 1-16 - Add compiler-rt workaround * Fri Jul 31 2020 Tom Stellard 1-15 - Add libcap workaround * Fri Jul 31 2020 Tom Stellard 1-14 - Add workaround for gmp * Thu Jul 30 2020 Tom Stellard 1-13 - Add libtasn1 workarounds * Thu Jul 30 2020 Tom Stellard 1-12 - Add gdb workarounds * Thu Jul 30 2020 Tom Stellard 1-11 - Add systemd workaround * Tue Jul 28 2020 Tom Stellard 1-10 - Replace CC=gcc with CC=clang * Mon Jul 27 2020 Tom Stellard 1-9 - Add libgcrypt workaround * Mon Jul 27 2020 Tom Stellard 1-8 - Add Requires for tools used by verify-clang-cc * Fri Jul 24 2020 Tom Stellard 1-7 - Add work-around for cyrus-sasl * Fri Jul 10 2020 Tom Stellard 1-6 - Fix copy and paste error * Fri Jul 10 2020 Tom Stellard 1-5 - Improvements for verfy-clang-cc script * Tue Jun 16 2020 Tom Stellard 1-4 - Ignore .dwz directory in verify-clang-cc * Tue Jun 16 2020 Tom Stellard 1-3 - Update verify-clang-cc * Mon Jun 15 2020 Tom Stellard 1-2 - Remove redhat-hardened-clang.cfg * Mon Jun 15 2020 Tom Stellard 1-1 - Initial commit