diff --git a/brp-llvm-compile-lto-elf b/brp-llvm-compile-lto-elf index 7eb53a1..788cb3b 100755 --- a/brp-llvm-compile-lto-elf +++ b/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/redhat-rpm-config.spec b/redhat-rpm-config.spec index e8eba52..9f807cf 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -4,7 +4,7 @@ # 2) When making changes, increment the version (in baserelease) by 1. # rpmdev-bumpspec and other tools update the macro below, which is used # in Version: to get the desired effect. -%global baserelease 267 +%global baserelease 268 Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config @@ -131,6 +131,7 @@ 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 @@ -254,6 +255,9 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora common.lua %doc buildflags.md %changelog +* Fri Sep 29 2023 Nikita Popov - 268-1 +- Fix brp-llvm-compile-lto-elf parallelism with hardlinks (#2234024) + * Tue Sep 26 2023 Florian Weimer - 267-1 - Switch %%build_type_safety_c to 1 (#2142177)