From 7bb71e872d8bcd51815fc5a3b6ed7c6f19b6a6d6 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 5 Aug 2022 11:40:53 +0200 Subject: [PATCH] brp-llvm-compile-lto-elf: Pass -r to xargs If there are no .o/.a files to be distributed, this prevents check_convert_bitcode from being called without a file argument, in which case the first flag is going to be treated like the file name, resulting in something like: realpath: invalid option -- 'O' Try 'realpath --help' for more information. Usage: file [-bcCdEhikLlNnprsSvzZ0] [--apple] [--extension] [--mime-encoding] [--mime-type] [-e ] [-F ] [-f ] [-m ] [-P ] [--exclude-quiet] ... file -C [-m ] file [--help] --- brp-llvm-compile-lto-elf | 2 +- redhat-rpm-config.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/brp-llvm-compile-lto-elf b/brp-llvm-compile-lto-elf index 6eceee2..93dad4c 100755 --- a/brp-llvm-compile-lto-elf +++ b/brp-llvm-compile-lto-elf @@ -43,4 +43,4 @@ 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 -n1 -P$NCPUS sh -c "check_convert_bitcode \$@ $CLANG_FLAGS" ARG0 + xargs -0 -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 f88f5ec..13db8f1 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 226 +%global baserelease 227 Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config @@ -219,6 +219,9 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua %doc buildflags.md %changelog +* Fri Aug 05 2022 Nikita Popov - 227-1 +- brp-llvm-compile-lto-elf: Pass -r to xargs + * Wed Jun 22 2022 Timm Bäder - 226-1 - Move llvm_compile_lto_to_elf before __debug_install_post