Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/annobin.git#44aadc55ffebb040c4e532cdadcae3817309f8f4
This commit is contained in:
DistroBaker 2020-12-06 13:02:20 +00:00
parent e8fe6f2889
commit d59752eb01
2 changed files with 46 additions and 4 deletions

36
annobin-gcc11.patch Normal file
View File

@ -0,0 +1,36 @@
--- a/gcc-plugin/annobin.cc 2020-12-02 11:59:10.000000000 +0100
+++ b/gcc-plugin/annobin.cc 2020-12-06 11:44:44.446266880 +0100
@@ -752,12 +752,12 @@ annobin_get_str_option_by_name (const ch
#if GCCPLUGIN_VERSION_MAJOR >= 11
/* GCC version 11 introduced the cl_vars array which provides offsets for
fields in global_options which are not handled by cl_options. */
- struct cl_var * var = cl_vars;
+ const struct cl_var * var = cl_vars;
- for (var = cl_vars; var->name != NULL; var ++)
- if (strmp (var->name, name) == 0)
+ for (var = cl_vars; var->var_name != NULL; var ++)
+ if (strcmp (var->var_name, name) == 0)
// FIXME: Cache the result ?
- return (const char *) (* (const char **) (((char *) annobin_global_options) + var->var_offset));
+ return * (const char **) (((char *) annobin_global_options) + var->var_offset);
annobin_inform (INFORM_VERBOSE, "WARN: gcc variable '%s' not found within cl_vars array", name);
#endif
@@ -772,12 +772,12 @@ annobin_get_int_option_by_name (const ch
#if GCCPLUGIN_VERSION_MAJOR >= 11
/* GCC version 11 introduced the cl_vars array which provides offsets for
fields in global_options which are not handled by cl_options. */
- struct cl_var * var = cl_vars;
+ const struct cl_var * var = cl_vars;
- for (var = cl_vars; var->name != NULL; var ++)
- if (strmp (var->name, name) == 0)
+ for (var = cl_vars; var->var_name != NULL; var ++)
+ if (strcmp (var->var_name, name) == 0)
// FIXME: Cache the result ?
- return (const int) (* (const int **) (((char *) annobin_global_options) + var->var_offset));
+ return * (int *) (((char *) annobin_global_options) + var->var_offset);
annobin_inform (INFORM_VERBOSE, "WARN: gcc variable '%s' not found within cl_vars array", name);
#endif

View File

@ -2,7 +2,7 @@
Name: annobin
Summary: Annotate and examine compiled binary files
Version: 9.48
Release: 2%{?dist}
Release: 4%{?dist}
License: GPLv3+
# ProtocolURL: https://fedoraproject.org/wiki/Toolchain/Watermark
# Maintainer: nickc@redhat.com
@ -34,9 +34,9 @@ License: GPLv3+
# Set this to zero to disable the requirement for a specific version of gcc.
# This should only be needed if there is some kind of problem with the version
# checking logic or when building on RHEL-7 or earlier.
%global with_hard_gcc_version_requirement 0
%global with_hard_gcc_version_requirement 1
%bcond_with plugin_rebuild
%bcond_without plugin_rebuild
# Allow the building of annobin without using annobin itself.
# This is because if we are bootstrapping a new build environment we can have
# a new version of gcc installed, but without a new of annobin installed.
@ -57,7 +57,7 @@ Source: https://nickc.fedorapeople.org/annobin-%{version}.tar.xz
# For the latest sources use: git clone git://sourceware.org/git/annobin.git
# Insert patches here, if needed.
# Patch01: annobin-xxx.patch
Patch01: annobin-gcc11.patch
#---------------------------------------------------------------------------------
@ -323,6 +323,12 @@ fi
#---------------------------------------------------------------------------------
%changelog
* Sun Dec 06 2020 Jakub Jelinek <jakub@redhat.com> - 9.48-4
- Revert back to previous settings.
* Sun Dec 06 2020 Jakub Jelinek <jakub@redhat.com> - 9.48-3
- Another NVR bump for GCC 11 rebuild.
* Sun Dec 06 2020 Jakub Jelinek <jakub@redhat.com> - 9.48-2
- NVR bump for GCC 11 rebuild.