mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Dirk Vanden Boer <dirk.vdb@gmail.com>
To: Dirk Vanden Boer <dirk.vdb@gmail.com>,
	musl@lists.openwall.com,  gregor.richards@uwaterloo.ca
Subject: Re: Segfault when using c++11 thread
Date: Sun, 23 Aug 2015 22:35:15 +0200	[thread overview]
Message-ID: <CADuK5a2p5jn2=1epnow7O9gNqSh94S6XujNratPss1sPV59H1w@mail.gmail.com> (raw)
In-Reply-To: <20150823183541.GB18417@port70.net>

On Sun, Aug 23, 2015 at 8:35 PM, Szabolcs Nagy <nsz@port70.net> wrote:
>
> * Dirk Vanden Boer <dirk.vdb@gmail.com> [2015-08-22 20:03:28 +0200]:
> > I compiled a native x86_64-linux-musl toolchain on my arch linux box using
> > the musl-cross scripts (no modifications).
> >
> > When running code that uses c++11 threading functionality I get segfaults:
> >
> > Minimal reproduction file:
> > #include <thread>
> > #include <iostream>
> >
> > int main()
> > {
> >     std::cout << "Thread id: " << std::this_thread::get_id() << std::endl;
> > }
> >
> > compile with:
> > ./cross/x86_64-linux-musl/bin/x86_64-linux-musl-g++ -pthread -std=c++11
> > -static -g main.cpp -o test
> >
>
> -static is broken if you don't patch gcc properly
> maybe the musl-cross gcc patch is missing the gthr weak ref fix.
>
> (fwiw static linking works for me with the backported
> musl patches from gcc-trunk
> http://port70.net/~nsz/musl/gcc-5.2.0/gcc-5.2.0-combined.diff
> but this link might get broken in the future)
>

Thanks, using that patch everything works fine.


      reply	other threads:[~2015-08-23 20:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-22 18:03 Dirk Vanden Boer
2015-08-23 18:35 ` Szabolcs Nagy
2015-08-23 20:35   ` Dirk Vanden Boer [this message]

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='CADuK5a2p5jn2=1epnow7O9gNqSh94S6XujNratPss1sPV59H1w@mail.gmail.com' \
    --to=dirk.vdb@gmail.com \
    --cc=gregor.richards@uwaterloo.ca \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).