Fix RHEL build

RHEL 7+ have rpm versions which support the --undefine parameter.
This commit is contained in:
Yaakov Selkowitz 2023-03-14 13:40:26 -04:00
parent 07c77149e9
commit 4cb3354e13
1 changed files with 2 additions and 2 deletions

View File

@ -403,8 +403,8 @@ make -C gcc-plugin clean
BUILD_FLAGS="-fplugin=%{_tmppath}/tmp_annobin.so"
# Disable the standard annobin plugin so that we do get conflicts.
# Note - Fedora's rpm uses a different way of evaluating macros.
%if 0%{?fedora} == 0
# Note - rpm-4.10 uses a different way of evaluating macros.
%if 0%{?rhel} && 0%{?rhel} < 7
OPTS="$(rpm --eval '%undefine _annotated_build %build_cflags %build_ldflags')"
%else
OPTS="$(rpm --undefine=_annotated_build --eval '%build_cflags %build_ldflags')"