All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] LTP compilation broken with -fno-common
@ 2020-04-01  8:32 Petr Vorel
  2020-04-01  9:16 ` Richard Palethorpe
  2020-04-01  9:39 ` Cyril Hrubis
  0 siblings, 2 replies; 17+ messages in thread
From: Petr Vorel @ 2020-04-01  8:32 UTC (permalink / raw)
  To: ltp

Hi,

LTP compilation breaks with -fno-common (we don't use as the default).
This is the default for GCC 10, is there a way to fix it or do we need to disable it?

Compilation on gcc-10 (or gcc-9 with CFLAGS="-fno-common":

gcc-9 -Werror=implicit-function-declaration -fno-common -g -O2 -fno-strict-aliasing -pipe -Wall -W -Wold-style-definition -W  -I../../include -I../../include -I../../include/old/   -L../../lib  tst_checkpoint_wait_timeout.c   -lltp -o tst_checkpoint_wait_timeout
/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: ../../lib/libltp.a(tst_test.o):ltp.git/lib/../include/tst_test.h:325: multiple definition of `TCID'; /tmp/cc49yYO6.o:ltp.git/lib/tests/tst_strsig.c:27: first defined here
/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: ../../lib/libltp.a(tst_sys_conf.o):ltp.git/lib/../include/tst_test.h:325: multiple definition of `TCID'; /tmp/cc49yYO6.o:ltp.git/lib/tests/tst_strsig.c:27: first defined here

It's somehow related to the "hack" in include/tst_test.h:

/*
 * This is a hack to make the testcases link without defining TCID
 */
extern const char *TCID;

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2020-04-16  9:13 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-01  8:32 [LTP] LTP compilation broken with -fno-common Petr Vorel
2020-04-01  9:16 ` Richard Palethorpe
2020-04-01  9:39 ` Cyril Hrubis
2020-04-01  9:55   ` Martin Doucha
2020-04-01  9:58     ` Cyril Hrubis
2020-04-01 10:04       ` Martin Doucha
2020-04-01 10:15         ` Petr Vorel
2020-04-01 10:50         ` Cyril Hrubis
2020-04-01 11:42           ` Martin Doucha
2020-04-01 12:01             ` Cyril Hrubis
2020-04-01 10:14   ` Petr Vorel
2020-04-09  7:45   ` Petr Vorel
2020-04-09  9:18     ` Cyril Hrubis
2020-04-09 10:06     ` Li Wang
2020-04-15  7:00       ` Petr Vorel
2020-04-15 10:19       ` [LTP] hugemmap01 warnings with -i [was Re: LTP compilation broken with -fno-common] Petr Vorel
2020-04-16  9:13         ` Li Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.