diff --git a/.redhat-rpm-config.metadata b/.redhat-rpm-config.metadata deleted file mode 100644 index e69de29..0000000 diff --git a/SOURCES/brp-llvm-compile-lto-elf b/SOURCES/brp-llvm-compile-lto-elf index 7eb53a1..1756651 100755 --- a/SOURCES/brp-llvm-compile-lto-elf +++ b/SOURCES/brp-llvm-compile-lto-elf @@ -48,5 +48,7 @@ check_convert_bitcode () { echo "Checking for LLVM bitcode artifacts" export -f check_convert_bitcode -find "$RPM_BUILD_ROOT" -type f -name "*.[ao]" -print0 | \ - xargs -0 -r -n1 -P$NCPUS sh -c "check_convert_bitcode \$@ $CLANG_FLAGS" ARG0 +# Deduplicate by device:inode to avoid processing hardlinks in parallel. +find "$RPM_BUILD_ROOT" -type f -name "*.[ao]" -printf "%D:%i %p\n" | \ + awk '!seen[$1]++' | cut -d" " -f2- | \ + xargs -d"\n" -r -n1 -P$NCPUS sh -c "check_convert_bitcode \$@ $CLANG_FLAGS" ARG0 diff --git a/SOURCES/brp-python-bytecompile b/SOURCES/brp-python-bytecompile index ead7022..4f587d4 100755 --- a/SOURCES/brp-python-bytecompile +++ b/SOURCES/brp-python-bytecompile @@ -57,7 +57,7 @@ function python_bytecompile() # -x and -e together implements the same functionality as the Filter class below # -s strips $RPM_BUILD_ROOT from the path # -p prepends the leading slash to the path to make it absolute - $python_binary -B $options -m compileall -q -f $exclude -s $RPM_BUILD_ROOT -p / -e $RPM_BUILD_ROOT $python_libdir + $python_binary -B $options -m compileall -q -f $exclude -s $RPM_BUILD_ROOT -p / -e $RPM_BUILD_ROOT --invalidation-mode=timestamp $python_libdir # # Python 3.4 and higher diff --git a/SOURCES/macros b/SOURCES/macros index 74e9bf3..87698da 100644 --- a/SOURCES/macros +++ b/SOURCES/macros @@ -328,7 +328,7 @@ print(result) # way we can detect installing an unusable .o/.a file. This is on the TODO # list for F34. %_gcc_lto_cflags -flto=auto -ffat-lto-objects -%_clang_lto_cflags -flto +%_clang_lto_cflags -flto=thin %_lto_cflags %{expand:%%{_%{toolchain}_lto_cflags}} %_general_options -O2 %{?_lto_cflags} -fexceptions -g -grecord-gcc-switches -pipe diff --git a/SOURCES/redhat-hardened-cc1 b/SOURCES/redhat-hardened-cc1 index fc54bcb..a369517 100644 --- a/SOURCES/redhat-hardened-cc1 +++ b/SOURCES/redhat-hardened-cc1 @@ -1,2 +1,5 @@ *cc1_options: + %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}} + +*cpp_options: ++ %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}} diff --git a/SPECS/redhat-rpm-config.spec b/SPECS/redhat-rpm-config.spec index 78d68b8..8a65cb9 100644 --- a/SPECS/redhat-rpm-config.spec +++ b/SPECS/redhat-rpm-config.spec @@ -6,8 +6,8 @@ Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config -Version: 199 -Release: 1%{?dist}.alma +Version: 207 +Release: 1%{?dist}.alma.1 # No version specified. License: GPL+ URL: https://src.fedoraproject.org/rpms/redhat-rpm-config @@ -127,6 +127,10 @@ Requires: %{_bindir}/grep Requires: %{_bindir}/sed Requires: %{_bindir}/xargs +# for brp-llvm-compile-lto-elf +Requires: (llvm if clang) +Requires: (gawk if clang) + # -fstack-clash-protection and -fcf-protection require GCC 8. Conflicts: gcc < 8.0.1-0.22 @@ -250,9 +254,37 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua %doc buildflags.md %changelog -* Tue May 09 2023 Eduard Abdullin - 199-1.alma +* Thu Mar 28 2024 Eduard Abdullin - 207-1.alma.1 - Fix AlmaLinux detection +* Thu Jan 18 2024 Miro Hrončok - 207-1 +- brp-python-bytecompile: Pass --invalidation-mode=timestamp to compileall +- Resolves: RHEL-22139 + +* Mon Oct 02 2023 Nikita Popov - 206-1 +- Use correct format specifier in brp-llvm-compile-lto-elf + +* Fri Sep 29 2023 Nikita Popov - 205-1 +- Fix the fix for brp-llvm-compile-lto-elf + +* Tue Sep 26 2023 Florian Weimer - 204-1 +- Enable PIC mode for assembler files (RHEL-6298) + +* Wed Sep 13 2023 Florian Weimer - 203-1 +- Rebuild against more recent downstream branch (#2234024) + +* Fri Aug 25 2023 Nikita Popov - 202-1 +- Fix brp-llvm-compile-lto-elf parallelism with hardlinks +- Resolves: rhbz#2234024 + +* Mon May 08 2023 Nikita Popov - 201-1 +- Add llvm dependency if clang toolchain used +- Resolves: rhbz#2193406 + +* Wed Apr 19 2023 Nikita Popov - 200-1 +- Change clang LTO default to ThinLTO +- Resolves: rhbz#2178788 + * Mon Feb 13 2023 Miro Hrončok - 199-1 - Add pyproject-srpm-macros to the default buildroot - Related: rhbz#2168193