[Bug c/92612] [10 Regression] Linker error in 525.x264_r after r278509
wilco at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Nov 21 09:51:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92612
--- Comment #2 from Wilco <wilco at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #1)
> Following patch fixes that:
>
> diff --git a/benchspec/CPU/525.x264_r/src/ldecod_src/inc/configfile.h
> b/benchspec/CPU/525.x264_r/src/ldecod_src/inc/configfile.h
> index 12ed1cc8..450930e2 100644
> --- a/benchspec/CPU/525.x264_r/src/ldecod_src/inc/configfile.h
> +++ b/benchspec/CPU/525.x264_r/src/ldecod_src/inc/configfile.h
> @@ -18,9 +18,9 @@
> //#define LEVEL_IDC 21
>
>
> -InputParameters cfgparams;
>
> #ifdef INCLUDED_BY_CONFIGFILE_C
> +InputParameters cfgparams;
> // Mapping_Map Syntax:
> // {NAMEinConfigFile, &cfgparams.VariableName, Type, InitialValue,
> LimitType, MinLimit, MaxLimit, CharSize}
> // Types : {0:int, 1:text, 2: double}
> @@ -59,6 +59,7 @@ extern Mapping Map[];
> #endif
> extern void JMDecHelpExit ();
> extern void ParseCommand(InputParameters *p_Inp, int ac, char *av[]);
> +extern InputParameters cfgparams;
>
> #endif
(In reply to Martin Liška from comment #0)
> Since defaulting to -fno-common, one can't build the benchmark due to:
Yes some SPEC benchmarks rely on tentative definitions. Given it is a
portability issue, but the source can't be fixed, the easiest way is to add
-fcommon in the config file for the failing cases. This is similar to the other
workarounds like -fno-strict-aliasing.
More information about the Gcc-bugs
mailing list