[03/24] gcc-4.5 build fixes

Message ID 20230807105935.2098236-4-arsen@aarsen.me
State Accepted
Headers
Series Sync shared build infrastructure with binutils-gdb |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Arsen Arsenović Aug. 7, 2023, 10:32 a.m. UTC
  From: Alan Modra <amodra@gmail.com>

Trying to build binutils with an older gcc currently fails.  Working
around these gcc bugs is not onerous so let's fix them.

include/ChangeLog:

	* xtensa-dynconfig.h (xtensa_isa_internal): Delete unnecessary
	forward declaration.
---
 include/xtensa-dynconfig.h | 2 --
 1 file changed, 2 deletions(-)
  

Comments

Jeff Law Aug. 7, 2023, 5:31 p.m. UTC | #1
On 8/7/23 04:32, Arsen Arsenović via Gcc-patches wrote:
> From: Alan Modra <amodra@gmail.com>
> 
> Trying to build binutils with an older gcc currently fails.  Working
> around these gcc bugs is not onerous so let's fix them.
> 
> include/ChangeLog:
> 
> 	* xtensa-dynconfig.h (xtensa_isa_internal): Delete unnecessary
> 	forward declaration.
OK.  While gcc-4.8 is the minimum for GCC, as long as the pain is small 
I think we should allow earlier compilers if it helps gdb/binutils.

jeff
  
Eric Gallager Aug. 7, 2023, 8:06 p.m. UTC | #2
On Mon, Aug 7, 2023 at 7:22 AM Arsen Arsenović via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> From: Alan Modra <amodra@gmail.com>
>
> Trying to build binutils with an older gcc currently fails.  Working
> around these gcc bugs is not onerous so let's fix them.
>
> include/ChangeLog:
>
>         * xtensa-dynconfig.h (xtensa_isa_internal): Delete unnecessary
>         forward declaration.
> ---
>  include/xtensa-dynconfig.h | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/include/xtensa-dynconfig.h b/include/xtensa-dynconfig.h
> index 48877ebb6b6..45d54dcd0e0 100644
> --- a/include/xtensa-dynconfig.h
> +++ b/include/xtensa-dynconfig.h
> @@ -121,8 +121,6 @@ struct xtensa_config_v4
>    int xchal_unaligned_store_hw;
>  };
>
> -typedef struct xtensa_isa_internal_struct xtensa_isa_internal;
> -
>  extern const void *xtensa_load_config (const char *name,
>                                        const void *no_plugin_def,
>                                        const void *no_name_def);
> --
> 2.41.0
>

Just to be clear: is it just gcc-4.5 where this fails, or gcc-4.5 and
all versions prior to it as well?
  

Patch

diff --git a/include/xtensa-dynconfig.h b/include/xtensa-dynconfig.h
index 48877ebb6b6..45d54dcd0e0 100644
--- a/include/xtensa-dynconfig.h
+++ b/include/xtensa-dynconfig.h
@@ -121,8 +121,6 @@  struct xtensa_config_v4
   int xchal_unaligned_store_hw;
 };
 
-typedef struct xtensa_isa_internal_struct xtensa_isa_internal;
-
 extern const void *xtensa_load_config (const char *name,
 				       const void *no_plugin_def,
 				       const void *no_name_def);