public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/52104] go1 fails to link on Solaris 8/9 x86 with native TLS
Date: Fri, 03 Feb 2012 10:48:00 -0000	[thread overview]
Message-ID: <bug-52104-4-tHeqLKGkzV@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-52104-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52104

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-03 10:48:16 UTC ---
Are you sure this is using native TLS?

This part of the 49204 commit:

    (__future_base::_Async_state_common::_M_join): Serialize attempts to
    join thread.

adds:

    void _M_join() { std::call_once(_M_once, &thread::join, ref(_M_thread)); }

which is called from the destructor, which is defined in future.o

That calls call_once, which creates the missing symbol:

  template<typename _Callable, typename... _Args>
    void
    call_once(once_flag& __once, _Callable&& __f, _Args&&... __args)
    {
#ifdef _GLIBCXX_HAVE_TLS
      auto __bound_functor = std::__bind_simple(std::forward<_Callable>(__f),
          std::forward<_Args>(__args)...);
      __once_callable = &__bound_functor;
      __once_call = &__once_call_impl<decltype(__bound_functor)>;
#else
      unique_lock<mutex> __functor_lock(__get_once_mutex());
      auto __callable = std::__bind_simple(std::forward<_Callable>(__f),
          std::forward<_Args>(__args)...);
      __once_functor = [&]() { __callable(); };
      __set_once_functor_lock_ptr(&__functor_lock);
#endif

So the lambda and std::function are only used when _GLIBCXX_HAVE_TLS is not
defined


  parent reply	other threads:[~2012-02-03 10:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-03 10:04 [Bug libstdc++/52104] New: " ro at gcc dot gnu.org
2012-02-03 10:05 ` [Bug libstdc++/52104] " ro at gcc dot gnu.org
2012-02-03 10:06 ` ro at gcc dot gnu.org
2012-02-03 10:12 ` redi at gcc dot gnu.org
2012-02-03 10:21 ` ro at CeBiTec dot Uni-Bielefeld.DE
2012-02-03 10:48 ` redi at gcc dot gnu.org [this message]
2012-02-03 10:56 ` ro at CeBiTec dot Uni-Bielefeld.DE
2012-02-03 11:09 ` redi at gcc dot gnu.org
2012-02-03 13:09 ` ro at gcc dot gnu.org
2012-02-05 18:40 ` ebotcazou at gcc dot gnu.org
2012-02-05 19:17 ` redi at gcc dot gnu.org
2012-02-05 23:27 ` ebotcazou at gcc dot gnu.org
2012-02-05 23:57 ` redi at gcc dot gnu.org
2012-02-06 21:37 ` redi at gcc dot gnu.org
2012-02-10 15:23 ` ro at CeBiTec dot Uni-Bielefeld.DE
2012-03-09 16:16 ` [Bug libstdc++/52104] go1 fails to run on Solaris 10/11 x86 with with gld ro at gcc dot gnu.org
2012-03-22  8:55 ` rguenth at gcc dot gnu.org
2012-07-02 12:57 ` rguenth at gcc dot gnu.org

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=bug-52104-4-tHeqLKGkzV@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).