From 4cb3354e1307349bf7622207f6d61010437d51e9 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Mar 14 2023 17:40:34 +0000 Subject: Fix RHEL build RHEL 7+ have rpm versions which support the --undefine parameter. --- diff --git a/annobin.spec b/annobin.spec index ed4dca6..752bbc4 100644 --- a/annobin.spec +++ b/annobin.spec @@ -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')"