From 2a12adcea2a1193fd5d038b0e3f38f12593f5cdc Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Thu, 9 Dec 2021 06:29:40 +0530 Subject: [PATCH] Avoid setting annobin flags if !_annotated_build Without this, the glibc build fails if annobin hasn't been bootstrapped against an updated gcc major version. This will likely never happen in production builds since _annotated_build is always set through redhat-rpm-config but when testing with annobin disabled (*and* with a rebased gcc), it may end up unnecessarily making gcc look for annobin. --- glibc.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/glibc.spec b/glibc.spec index 8dc33cb..bf9ed76 100644 --- a/glibc.spec +++ b/glibc.spec @@ -151,7 +151,7 @@ end \ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 26%{?dist} +Release: 27%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -1145,6 +1145,7 @@ rpm_inherit_flags \ "-mtune=zEC12" \ "-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1" \ +%if 0%{?_annotated_build} > 0 # libc_nonshared.a cannot be built with the default hardening flags # because the glibc build system is incompatible with # -D_FORTIFY_SOURCE. The object files need to be marked as to be @@ -1152,6 +1153,7 @@ rpm_inherit_flags \ # annobin does not work here because of flag ordering issues.) # See . BuildFlagsNonshared="-fplugin=annobin -fplugin-arg-annobin-disable -Wa,--generate-missing-build-notes=yes" +%endif # Special flag to enable annobin annotations for statically linked # assembler code. Needs to be passed to make; not preserved by @@ -2260,6 +2262,9 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Thu Dec 09 2021 Siddhesh Poyarekar - 2.34.9000-27 +- Set BuildFlagsNonshared only if _annotated_build is set. + * Sat Dec 04 2021 Florian Weimer - 2.34.9000-26 - Drop glibc-rh2026399.patch, not needed anymore due to upstream fix. - Auto-sync with upstream branch master,