[PATCH] sim/ppc: Fix linker error with -fno-common

Simon Marchi simark@simark.ca
Fri Jul 3 00:08:23 GMT 2020


On 2020-07-02 11:26 a.m., Sebastian Huber wrote:
> sim/ppc
> 
> * ld-insn.h (last_model, last_model_data, last_model_function,
> last_model_internal, last_model_macro, last_model_static):
> Delete.
> (max_model_fields_len, model_data, model_functions,
> model_internal, model_macros, model_static, models): Declare, but do not
> define.
> * ld-insn.c (last_model, last_model_data, last_model_function,
> last_model_internal, last_model_macro, last_model_static,
> max_model_fields_len, model_data, model_functions,
> model_internal, model_macros, model_static, models): Define.

Hi Sebastian,

When fixing a build error, please put a copy of the error in the commit message.
Also, please describe the problem and the fix, if not obvious.

Here, it would also be good to mention that gcc master has this flag enabled by
default, so it's likely that the next release will have it too.

It's not possible to apply your patches, it looks like they get modified by your
email client.  Could you please try to send them using git-send-email?  If that's
really not possible, an acceptable alternative is to use git-format-patch and
attach them as attachment, this way you know they won't get garbled.

The code itself looks ok to me, but I'm not a sim maintainer.

Simon


More information about the Gdb-patches mailing list