[LTP] LTP compilation broken with -fno-common
Petr Vorel
pvorel@suse.cz
Wed Apr 1 12:15:54 CEST 2020
Hi Martin,
> On 01. 04. 20 11:58, Cyril Hrubis wrote:
> > The problem here is that gcc10 forbids variables in headers, moving it
> > anywhere int the header wouldn't help.
> I don't think GCC cares about where exactly the variable came from. It's
> only refusing to link multiple definitions of the same symbol. So if we
> move the TCID definition into the TST_NO_DEFAULT_MAIN guard block, GCC
> linker should stop complaining because the symbol name will become unique.
No, moving the definition above #ifndef TST_NO_DEFAULT_MAIN does not help.
Kind regards,
Petr
More information about the ltp
mailing list