public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Torvald Riegel <triegel@redhat.com>
To: David Edelsohn <dje.gcc@gmail.com>
Cc: Jakub Jelinek <jakub@redhat.com>,
	Jonathan Wakely <jwakely@redhat.com>,
	       GCC Patches <gcc-patches@gcc.gnu.org>,
	       "libstdc++@gcc.gnu.org" <libstdc++@gcc.gnu.org>,
	       Jason Merrill <jason@redhat.com>
Subject: Re: [PATCH v2] libstdc++: Make certain exceptions transaction_safe.
Date: Mon, 18 Jan 2016 16:30:00 -0000	[thread overview]
Message-ID: <1453134644.26597.423.camel@localhost.localdomain> (raw)
In-Reply-To: <1453125282.26597.422.camel@localhost.localdomain>

On Mon, 2016-01-18 at 14:54 +0100, Torvald Riegel wrote:
> On Sun, 2016-01-17 at 18:30 -0500, David Edelsohn wrote:
> > On Sun, Jan 17, 2016 at 3:21 PM, Torvald Riegel <triegel@redhat.com> wrote:
> > > On Sat, 2016-01-16 at 15:38 -0500, David Edelsohn wrote:
> > >> On Sat, Jan 16, 2016 at 8:35 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> > >> > On Sat, Jan 16, 2016 at 07:47:33AM -0500, David Edelsohn wrote:
> > >> >> stage1 libstdc++ builds just fine.  the problem is stage2 configure
> > >> >> fails due to missing ITM_xxx symbols when configure tries to compile
> > >> >> and run conftest programs.
> > >> >
> > >> > On x86_64-linux, the _ITM_xxx symbols are undef weak ones and thus it is
> > >> > fine to load libstdc++ without libitm and libstdc++ doesn't depend on
> > >> > libitm.
> > >> >
> > >> > So, is AIX defining __GXX_WEAK__ or not?  Perhaps some other macro or
> > >> > configure check needs to be used to determine if undefined weak symbols
> > >> > work the way libstdc++ needs them to.
> > >>
> > >> __GXX_WEAK__ appears to be defined by gcc/c-family/c-cppbuiltin.c
> > >> based on  SUPPORTS_ONE_ONLY.  gcc/defaults.h defines SUPPORTS_ONE_ONLY
> > >> if the target supports MAKE_DECL_ONE_ONLY and link-once semantics.
> > >> AIX weak correctly supports link-once semantics.  AIX also supports
> > >> the definition of __GXX_WEAK__ in gcc/doc/cpp.texi, namely collapsing
> > >> symbols with vague linkage in multiple translation units.
> > >>
> > >> libstdc++/src/c++11/cow-stdexcept.cc appears to be using __GXX_WEAK__
> > >> and __attribute__ ((weak)) for references to symbols that may not be
> > >> defined at link time or run time.  AIX does not allow undefined symbol
> > >> errors by default.  And the libstdc++ inference about the semantics of
> > >> __GXX_WEAK__ are different than the documentation.
> > >>
> > >> AIX supports MAKE_DECL_ONE_ONLY and the documented meaning of
> > >> __GXX_WEAK__.  AIX does not support extension of the meaning to
> > >> additional SVR4 semantics not specified in the documentation.
> > >
> > > I see, so we might be assuming that __GXX_WEAK__ means more than it
> > > actually does (I'm saying "might" because personally, I don't know; your
> > > information supports this is the case, but the initial info I got was
> > > that __GXX_WEAK__ would mean we could have weak decls without
> > > definitions).
> > 
> > I believe that libstdc++ must continue with the weak undefined
> > references to the symbols as designed, but protect them with a
> > different macro.  For example, __GXX_WEAK_REF__ or __GXX_WEAK_UNDEF__
> > defined in defaults.h based on configure test or simply overridden in
> > config/rs6000/aix.h.  Or the macro could be local to libstdc++ and
> > overridden in config/os/aix/os_defines.h.
> 
> OK.  I'm currently testing the attached patch on x86_64-linux.

No regressions in the libstdc++ and libitm tests on x86_64-linux.

  reply	other threads:[~2016-01-18 16:30 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-16 12:16 David Edelsohn
2016-01-16 12:43 ` Jonathan Wakely
2016-01-16 12:47   ` David Edelsohn
2016-01-16 13:35     ` Jakub Jelinek
2016-01-16 13:41       ` Jonathan Wakely
2016-01-16 13:51         ` Jonathan Wakely
2016-01-16 20:12       ` Torvald Riegel
2016-01-16 20:24         ` David Edelsohn
2016-01-16 20:38       ` David Edelsohn
2016-01-17 20:21         ` Torvald Riegel
2016-01-17 20:32           ` Jakub Jelinek
2016-01-17 23:30           ` David Edelsohn
2016-01-18 13:54             ` Torvald Riegel
2016-01-18 16:30               ` Torvald Riegel [this message]
2016-01-18 20:08                 ` Jonathan Wakely
  -- strict thread matches above, loose matches on Subject: below --
2016-01-16  9:57 Dominique d'Humières
2016-01-16 20:05 ` Torvald Riegel
2016-01-19 19:10 ` Torvald Riegel
2016-01-19 19:20   ` Jonathan Wakely
2016-01-21 10:00     ` Dominique d'Humières
2016-01-21 14:00       ` Torvald Riegel
2016-01-21 15:25       ` Torvald Riegel
2016-01-21 17:15         ` Dominique d'Humières
2016-01-21 17:29           ` Dominique d'Humières
2016-01-21 18:09             ` Mike Stump
2016-01-21 18:12               ` Pedro Alves
2016-01-21 18:18                 ` Torvald Riegel
2016-01-07 16:47 Torvald Riegel
2016-01-14 17:58 ` Jonathan Wakely
2016-01-15 22:44   ` Torvald Riegel
2016-01-16 22:58 ` H.J. Lu
2016-01-17 16:59   ` Jonathan Wakely

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=1453134644.26597.423.camel@localhost.localdomain \
    --to=triegel@redhat.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=jason@redhat.com \
    --cc=jwakely@redhat.com \
    --cc=libstdc++@gcc.gnu.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).