This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [PATCH 2/2] Disable .gnu_attribute tags in compatibility-ldbl.o


On Wed, 28 Sep 2016, Alan Modra wrote:

> > I'd expect libraries such as libstdc++ and libgcc (generally, all compiler 
> > and libc libraries) to be set up in such a way that they will work with 
> > all long double choices in user code (via mangling and headers mapping 
> > access to long double library functions to the right versions for the 
> > chosen type) - and so need to be compiled without these attribute tags to 
> > avoid the linker complaining when someone links them with user code built 
> > with a non-default choice of long double.  Certainly for glibc I'd think 
> > using the option globally to build everything is the right choice (well, 
> > except for libnldbl.a, where -mlong-double-64 attributes are logically 
> > correct).
> 
> Yes, and this is why the linker only warns rather than errors on
> mismatching .gnu.attributes tags.

But for a library that is aware of long double variants, it shouldn't even 
warn.  And given that we don't build multiple copies of GCC's libraries, 
they should be aware of the variants (via mangling them differently, 
ensuring versions of the relevant functions for each long double type are 
present, etc.) and so using them should not result in warnings.

-- 
Joseph S. Myers
joseph@codesourcery.com


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