From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Vorel Date: Wed, 1 Apr 2020 12:15:54 +0200 Subject: [LTP] LTP compilation broken with -fno-common In-Reply-To: References: <20200401083228.GA18685@dell5510> <20200401093934.GA23773@yuki.lan> <20200401095822.GB23773@yuki.lan> Message-ID: <20200401101554.GA31937@dell5510> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it 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