## START: Set by rpmautospec ## (rpmautospec version 0.2.6) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 79; 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 %global clang_version 14.0.5 %if "%{?rhel}" == "el9_0'" %global clang_version 13.0.0 %endif %if 0%{?fedora} == 35 %global clang_version 13.0.0 %endif %if 0%{?fedora} == 36 %global clang_version 14.0.0 %endif Name: clang-rpm-config 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-fix-clang-errors.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 # 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 Source39: export-lto-tools.sh Source40: export-ccc-override-options.sh Source42: gcc Source43: macros.clang-cc-overrides Source44: vulkan-validation-layers-run Source45: vulkan-validation-layers-remove-copy-assignment-operator.patch Source46: python3.10-run # libnetfilter_cthelper Source47: libnetfilter_cthelper-run Source48: libnetfilter_cthelper-0001-Use-__EXPORTED-rather-than-EXPORT_SYMBOL.patch # libnetfilter_cttimeout Source49: libnetfilter_cttimeout-run Source50: libnetfilter_cttimeout-0001-Use-__EXPORTED-rather-than-EXPORT_SYMBOL.patch # libisoburn Source51: libisoburn-run Source52: libisoburn-0001-Allow-users-to-override-CC-variable-in-auto_cxx.patch # man-db Source53: man-db-run Source54: man-db-0001-Revert-Reduce-indentation-depth-using-C99.patch # memcached Source55: memcached-run Source56: memcached-0001-Fix-undefined-behavior-and-warning-with-clang.patch # liborcus Source57: liborcus-run Source58: liborcus-0001-Fix-warning-when-compiling-with-clang.patch # libffi Source59: libffi-run Source60: libffi-0001-x86-64-Always-double-jump-table-slot-size-for-CET-71.patch # brasero Source61: brasero-run Source62: brasero-0001-Fix-error-building-with-clang.patch # ppp Source63: ppp-run Source64: ppp-0001-pppd-Fix-cross-compilation-using-Clang-253.patch Source65: ppp-0001-Compiling-with-clang-encounters-an-error-in-eap-tls..patch Source66: brp-llvm-compile-lto-elf # tcl Source67: tcl-run Source68: tcl-0001-Better-fix-for-3390638-making-the-intVal-variable-un.patch # curl Source69: curl-run Source70: curl-config-fix.patch # libnetfilter_cthelper Source71: libnetfilter_cthelper-rhel9-0001-Use-__EXPORTED-rather-than-EXPORT_SYMBOL.patch # acpica-tools Source72: acpica-tools-run Source73: acpica-tools-check-compiler-flags.patch # ruby Source74: ruby-run Source75: ruby-0001-Specify-c-to-emit-pch-with-clang-4423.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 = %{clang_version} %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} # 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} # 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/ %{SOURCE39} %{__install} -p -m 644 -t %{buildroot}%{_sysconfdir}/profile.d/ %{SOURCE40} %{__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} #python3.10 %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE46} ln -s %{clangrcdir}/`basename %{SOURCE46}` %{buildroot}%{clangrcdir}/python3.9-run # libnetfilter_cthelper %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE47} %if 0%{?rhel} %{__install} -p -m 644 %{SOURCE71} %{buildroot}%{clangrcdir}/libnetfilter_cthelper-0001-Use-__EXPORTED-rather-than-EXPORT_SYMBOL.patch %else %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE48} %endif # libnetfilter_cttimeout %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE49} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE50} # libisoburn %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE51} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE52} # man-db %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE53} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE54} # memcached %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE55} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE56} # liborcus %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE57} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE58} # libffi %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE59} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE60} # brasero %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE61} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE62} # ppp %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE63} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE64} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE65} %if 0%{?rhel} # brp-llvm-compile-lto-elf install -p -m 755 -t %{buildroot}%{rrcdir} %{SOURCE66} %endif # tcl %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE67} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE68} # curl %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE69} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE70} # acpica-tools %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE72} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE73} # ruby %{__install} -p -m 755 -t %{buildroot}%{clangrcdir}/ %{SOURCE74} %{__install} -p -m 644 -t %{buildroot}%{clangrcdir}/ %{SOURCE75} %files %{rrcdir}/verify-clang-cc %if 0%{?rhel} %{rrcdir}/brp-llvm-compile-lto-elf %endif %{clangrcdir}/ %{_sysconfdir}/profile.d/export-lto-tools.sh %{_sysconfdir}/profile.d/export-ccc-override-options.sh %{_sysconfdir}/rpm/macros.clang-cc-overrides %changelog * Wed Jul 06 2022 Tom Stellard 1-79 - Backport fix for ruby * Wed Jul 06 2022 Tom Stellard 1-78 - Add acpica workaround * Sat Jul 02 2022 Tom Stellard 1-77 - Add gcc symlink for httpd * Sat Jul 02 2022 Tom Stellard 1-76 - Add missing file * Fri Jul 01 2022 Tom Stellard 1-75 - Add libnetfilter_cthelper patch for rhel9 * Thu Jun 30 2022 Tom Stellard 1-74 - Add workaround patch for curl * Thu Jun 30 2022 Tom Stellard 1-73 - Disable LTO for libtraceevent on RHEL * Wed Jun 29 2022 Tom Stellard 1-72 - Add gcc symlink for suitesparse * Wed Jun 29 2022 Tom Stellard 1-71 - Add gcc symlink for realtime-setup * Wed Jun 29 2022 Tom Stellard 1-70 - Bump clang version on RHEL to 14.0.5 * Wed Jun 29 2022 Tom Stellard 1-69 - Use liborcus work-around for version 0.17.2 only * Sat Jun 25 2022 Tom Stellard 1-68 - Add gcc symlink for pptp * Sat Jun 25 2022 Tom Stellard 1-67 - Update man-db workaround to only apply to 2.10.0 * Fri Jun 24 2022 Tom Stellard 1-66 - Add gcc symlink for lsof * Fri Jun 24 2022 Tom Stellard 1-65 - Add gcc symlink for memstrack * Thu Jun 23 2022 Tom Stellard 1-64 - Add gcc symlink for libtool on RHEL-9 * Thu Jun 23 2022 Tom Stellard 1-63 - Add gcc symlink for initscripts * Wed Jun 22 2022 Tom Stellard 1-62 - Add gcc symlink for python-dmidecode * Wed Jun 22 2022 Tom Stellard 1-61 - Add gcc symlink for pnm2ppa * Wed Jun 22 2022 Tom Stellard 1-60 - Add gcc symlink for lm_sensors * Wed Jun 22 2022 Tom Stellard 1-59 - Add gcc sylink for gsm * Wed Jun 22 2022 Tom Stellard 1-58 - Add gcc symlink for libkeepalive * Wed Jun 22 2022 Tom Stellard 1-57 - Add gcc symlink for realtime-tests * Wed Jun 22 2022 Tom Stellard 1-56 - Add gcc symlink for lmdb * Wed Jun 22 2022 Tom Stellard 1-55 - Add gcc symlink for sane-airscan * Wed Jun 22 2022 Tom Stellard 1-54 - Add gcc symlink for stalld * Wed Jun 22 2022 Tom Stellard 1-53 - Add gcc symlink for suitesparse and disable LTO * Wed Jun 22 2022 Tom Stellard 1-52 - Add gcc symlink for traceroute * Wed Jun 22 2022 Tom Stellard 1-51 - Add gcc symlink for sip * Wed Jun 22 2022 Tom Stellard 1-50 - Add gcc symlink for tree-pkg * Tue Jun 21 2022 Tom Stellard 1-49 - Add gcc symlink for splix * Tue Jun 21 2022 Tom Stellard 1-48 - Add gcc symlink for ttmkfdir * Tue Jun 21 2022 Tom Stellard 1-47 - Add gcc symlink for pciutils * Tue Jun 21 2022 Tom Stellard 1-46 - Fix typo in previous commit * Tue Jun 21 2022 Tom Stellard 1-45 - Add gcc symlink for vsftpd * Fri Jun 17 2022 Tom Stellard 1-44 - Add gcc symlink for pigz and disable LTO too * Fri Jun 17 2022 Tom Stellard 1-43 - Add gcc symlink for libjbig * Fri Jun 17 2022 Tom Stellard 1-42 - Add gcc symlink for ftp * Fri Jun 17 2022 Tom Stellard 1-41 - Add gcc symlink for foma * Fri Jun 17 2022 Tom Stellard 1-40 - Add gcc symlink for dialog * Fri Jun 17 2022 Tom Stellard 1-39 - Remove __get_fortran_gcc_flags macro * Thu Jun 16 2022 Tom Stellard 1-38 - Add patch for tcl * Tue Jun 14 2022 Tom Stellard 1-37 - Add brp-llvm-compile-to-elf for RHEL * Fri Jun 10 2022 Tom Stellard 1-36 - Add work-around for python3.9 * Fri Jun 10 2022 Tom Stellard 1-35 - Add gcc symlink for perl-5.32.1 * Thu Jun 09 2022 Tom Stellard 1-34 - Add gcc symlink for python3.9 * Thu Jun 09 2022 Tom Stellard 1-33 - Add gcc symlink for ed * Thu Jun 09 2022 Tom Stellard 1-32 - Use a __get_fortran_gcc_flags macro that works on RHEL * Thu Jun 09 2022 Tom Stellard 1-31 - Add gcc symlink for byaccj * Thu Jun 09 2022 Tom Stellard 1-30 - Add gcc symlink for blktrace * Thu Jun 09 2022 Tom Stellard 1-29 - Add gcc symlink for apr-util * Tue Jun 07 2022 Tom Stellard 1-28 - Enable _auto_set_build_flags for RHEL * Tue Jun 07 2022 Tom Stellard 1-27 - Bump clang verion to 14.0.0 for RHEL-9.1. * Fri Jun 03 2022 Tom Stellard 1-26 - Disable LTO for wxGTK3 * Fri Jun 03 2022 Tom Stellard 1-25 - Add gcc symlink for xen * Thu Jun 02 2022 Tom Stellard 1-24 - Forward -print-multi-os-directory option to real gcc * Thu Jun 02 2022 Tom Stellard 1-23 - Fixes for ppp * Wed Jun 01 2022 Tom Stellard 1-22 - Add gcc symlink for epstool * Wed Jun 01 2022 Tom Stellard 1-21 - Add gcc symlink for haproxy * Sat May 28 2022 Tom Stellard 1-20 - Add patch to fix brasero * Tue May 17 2022 Tom Stellard 1-19 - Add patch to fix libffi * Mon May 16 2022 Tom Stellard 1-18 - Add patch to fix liborcus * Mon May 16 2022 Tom Stellard 1-17 - Add gcc symlink for speech-tools * Sat May 14 2022 Tom Stellard 1-16 - Fix up mingw macros * Fri May 13 2022 Tom Stellard 1-15 - Add patch to fix memcached * Fri May 13 2022 Tom Stellard 1-14 - Add upstream patch for man-db * Wed May 11 2022 Tom Stellard 1-13 - Add gcc symlink for linuxptp * Wed May 11 2022 Tom Stellard 1-12 - Add gcc symlink for net-tools * Wed May 11 2022 Tom Stellard 1-11 - Drop the override for the __make macro * Wed May 11 2022 Tom Stellard 1-10 - Don't override make variables for librttopo * Wed May 11 2022 Tom Stellard 1-9 - Use clang as the mingw compiler * Wed May 11 2022 Tom Stellard 1-8 - Don't overide make variables for liborcus * Tue May 10 2022 Tom Stellard 1-7 - Add patch to remove hard-coded g++ in libisoburn * Tue May 10 2022 Tom Stellard 1-6 - Disable libtasn1 work-around for newer versions of the package * Mon May 09 2022 Tom Stellard 1-5 - verify-clang-cc: Add work-around for libgit2 * Sat Apr 30 2022 Tom Stellard 1-4 - Disable __make macro override for enchant2 * Sat Apr 30 2022 Tom Stellard 1-3 - Disable LTO for dpdk * Sat Apr 30 2022 Tom Stellard 1-2 - Export fake gcc path for asymptote * Fri Apr 29 2022 Tom Stellard 1-1 - Rename package to clang-rpm-config