This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: powerpc build failure with GCC mainline -fno-common change
- From: Tulio Magno Quites Machado Filho <tuliom at linux dot ibm dot com>
- To: Joseph Myers <joseph at codesourcery dot com>, libc-alpha at sourceware dot org, Andreas Schwab <schwab at suse dot de>
- Cc:
- Date: Fri, 22 Nov 2019 13:58:41 -0300
- Subject: Re: powerpc build failure with GCC mainline -fno-common change
- References: <alpine.DEB.2.21.1911210114120.8373@digraph.polyomino.org.uk>
Joseph Myers <joseph@codesourcery.com> writes:
> glibc for powerpc configurations is failing to build with GCC mainline
> after the switch to -fno-common by default. The error is multiple
> definitions of __cache_line_size linking sln, in dl-sysdep.c and
> libc-start.c.
>
> https://sourceware.org/ml/libc-testresults/2019-q4/msg00237.html
>
> As I see it, there are two obvious possible fixes: either use
> __attribute__ ((common)) on both definitions, or change one of them to an
> extern declaration if SHARED is not defined. Any comments on what would
> be the better fix?
AFAICS, this variable is duplicated in the loader and in libc.so and I'm afraid
these suggestions would hide the real issue.
> Perhaps __cache_line_size should be part of _rtld_global?
Having this variable in a single place is ideal, but does it really need to
be in the loader?
AFAICS, libc is the only place using __cache_line_size.
I'm preparing a patch that leaves this variable only in libc (shared and
static), but I'm open to suggestions if you think this could variable should
have been available to the other libraries too.
--
Tulio Magno