This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: powerpc build failure with GCC mainline -fno-common change


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]