diff --git a/annobin-gcc-plugin-no-include-intl-h.patch b/annobin-gcc-plugin-no-include-intl-h.patch new file mode 100644 index 0000000..67ce500 --- /dev/null +++ b/annobin-gcc-plugin-no-include-intl-h.patch @@ -0,0 +1,11 @@ +--- annobin.orig/gcc-plugin/annobin.cc 2025-06-17 11:46:55.482221126 +0100 ++++ annobin-12.93/gcc-plugin/annobin.cc 2025-06-17 11:47:07.389296765 +0100 +@@ -14,7 +14,7 @@ + + #include + #include +-#include ++ + + #include "annobin-common.h" + #include "annobin-global.h" diff --git a/annobin.spec b/annobin.spec index 5e1de30..dba994b 100644 --- a/annobin.spec +++ b/annobin.spec @@ -9,7 +9,7 @@ BuildRequires: scl-utils-build Name: %{?scl_prefix}annobin Summary: Annotate and examine compiled binary files Version: 12.93 -Release: 3%{?dist} +Release: 4%{?dist} License: GPL-3.0-or-later AND LGPL-2.0-or-later AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (LGPL-2.0-or-later WITH GCC-exception-2.0) AND GFDL-1.3-or-later URL: https://sourceware.org/annobin/ # Maintainer: nickc@redhat.com @@ -80,9 +80,11 @@ URL: https://sourceware.org/annobin/ #--------------------------------------------------------------------------------- -%global annobin_sources annobin-%{version}.tar.xz -Source: https://nickc.fedorapeople.org/%{annobin_sources} -# For the latest sources use: git clone git://sourceware.org/git/annobin.git +%global annobin_dir annobin-%{version} +%global latest_sources latest-annobin.tar.xz + +Source: https://nickc.fedorapeople.org/%{annobin_dir}.tar.xz +# For the most recent sources use: git clone git://sourceware.org/git/annobin.git # Insert patches here, if needed. Patch01: annobin-nop.patch @@ -90,13 +92,22 @@ Patch02: annobin-tmp-default-to-using-group-attach.patch %if %{bootstrapping} Patch03: annobin-gcc-plugin-ignore-major-version-diffs.patch %endif + +# Workaround for a bug in /usr/include/locale.h: +# /usr/include/locale.h:122:14: error: expected unqualified-id before 'const' +# extern char *setlocale (int __category, const char *__locale) __THROW; +# /usr/include/locale.h:122:14: error: expected ')' before 'const' +# /opt/rh/gcc-toolset-15/root/usr/lib/gcc/aarch64-redhat-linux/15/plugin/include/intl.h:26:38: note: to match this '(' +# # define setlocale(category, locale) (locale) +Patch04: annobin-gcc-plugin-no-include-intl-h.patch + # FIXME: TEMPORARY: This patch changes the GCC plugin so that will call error() # instead of warning() when generating warning messages. This is because the # prototype for warning() changes between GCC 14 and GCC 15. So a plugin built # by GCC 14 cannot be run by GCC 15. Once gcc-toolset-15-gcc in the buildroot # is at version 15, this patch should be discarded. # For more details see RHEL-95704. -Patch04: annobin-GCC-PLUGIN-WARNING.patch +Patch05: annobin-GCC-PLUGIN-WARNING.patch # This is where a copy of the sources will be installed. %global annobin_source_dir %{?_scl_root}/%{_usrsrc}/annobin @@ -401,7 +412,7 @@ echo "Requires: (%{?scl_prefix}gcc >= %{gcc_major} and %{?scl_prefix}gcc < %{gcc # NB/ Do not add {?scl_prefix} to the -n option below. The annobin sources # unpack into a directory called annobin-VERSION not gcc-toolset-N-annobin-VERSION. -%autosetup -p1 -n annobin-%{version} +%autosetup -p1 -n %{annobin_dir} # The plugin has to be configured with the same arcane configure # scripts used by gcc. Hence we must not allow the Fedora build @@ -411,6 +422,10 @@ touch configure */configure Makefile.in */Makefile.in # Similarly we do not want to rebuild the documentation. touch doc/annobin.info +# Generate a source tarball for installation later with all the patches +# applied. This must be the last step in the prep section. +tar -C ../ -cJf ../%{latest_sources} %{annobin_dir} + #--------------------------------------------------------------------------------- %build @@ -553,8 +568,8 @@ ln -s gts-annobin.so.0.0.0 gts-annobin.so.0 popd # Also install a copy of the sources into the build tree. -mkdir -p %{buildroot}%{annobin_source_dir} -cp %{_sourcedir}/%{annobin_sources} %{buildroot}%{annobin_source_dir}/latest-annobin.tar.xz +mkdir -p %{buildroot}%{annobin_source_dir} +cp ../%{latest_sources} %{buildroot}%{annobin_source_dir} %endif rm -f %{buildroot}%{_infodir}/dir @@ -625,7 +640,7 @@ make check GCC=%gcc_for_annobin CC=%gcc_for_annobin %{ANNOBIN_GCC_PLUGIN_DIR}/%{aver} %dir %{annobin_source_dir} -%{annobin_source_dir}/latest-annobin.tar.xz +%{annobin_source_dir}/%{latest_sources} %endif %if %{with annocheck} @@ -642,6 +657,9 @@ make check GCC=%gcc_for_annobin CC=%gcc_for_annobin #--------------------------------------------------------------------------------- %changelog +* Tue Jun 17 2025 Nick Clifton - 12.93-4 +- Generate latest-annobin.tar.xz at prep phase (RHEL-95704) + * Tue Jun 10 2025 Nick Clifton - 12.93-3 - Disable bootstrapping. Also use error() in place of warning() in the gcc plugin. (RHEL-95704)