This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH 2/2] Disable .gnu_attribute tags in compatibility-ldbl.o
- From: Alan Modra <amodra at gmail dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, Segher Boessenkool <segher at kernel dot crashing dot org>
- Date: Wed, 28 Sep 2016 12:19:19 +0930
- Subject: Re: [PATCH 2/2] Disable .gnu_attribute tags in compatibility-ldbl.o
- Authentication-results: sourceware.org; auth=none
- References: <20160928011145.GF3336@bubble.grove.modra.org> <20160928011338.GG3336@bubble.grove.modra.org> <alpine.DEB.2.20.1609280120250.17432@digraph.polyomino.org.uk>
On Wed, Sep 28, 2016 at 01:26:12AM +0000, Joseph Myers wrote:
> On Wed, 28 Sep 2016, Alan Modra wrote:
>
> > compatibility-ldbl.o is compiled with -mlong-double-64. When
> > long double .gnu_attribute tags are checked by the linker, it
> > complains about the mismatch between this file and others in
> > libstdc++.
>
> Is that the only file in libstdc++ that involves long double in its
> interface at all, and so that gets such attributes?
No, some 12 object files do, all marked with 128-bit IBM long double.
eg. c++locale.o, complex_io.o, hash_tr1.o.
> 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.
--
Alan Modra
Australia Development Lab, IBM