public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Alan Modra <amodra@gmail.com>
Cc: <gcc-patches@gcc.gnu.org>, <libstdc++@gcc.gnu.org>,
	Segher Boessenkool	<segher@kernel.crashing.org>
Subject: Re: [PATCH 2/2] Disable .gnu_attribute tags in compatibility-ldbl.o
Date: Wed, 28 Sep 2016 17:34:00 -0000	[thread overview]
Message-ID: <alpine.DEB.2.20.1609281716570.7282@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20160928024919.GI3336@bubble.grove.modra.org>

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

  reply	other threads:[~2016-09-28 17:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-28  1:20 [PATCH 1/2][RS6000] .gnu.attribute Tag_GNU_Power_ABI_FP Alan Modra
2016-09-28  1:26 ` [PATCH 2/2] Disable .gnu_attribute tags in compatibility-ldbl.o Alan Modra
2016-09-28  2:49   ` Joseph Myers
2016-09-28  4:41     ` Alan Modra
2016-09-28 17:34       ` Joseph Myers [this message]
2016-09-28  9:04   ` Segher Boessenkool
2016-09-28  2:00 ` [PATCH 1/2][RS6000] .gnu.attribute Tag_GNU_Power_ABI_FP Joseph Myers
2016-09-28  4:38   ` Alan Modra
2016-09-28  8:48 ` Segher Boessenkool
2016-09-29  0:57   ` Alan Modra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1609281716570.7282@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=amodra@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    --cc=segher@kernel.crashing.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).