From: "Peter O'Gorman" <pogma@thewrittenword.com>
To: Jonathan Wakely <jwakely.gcc@gmail.com>
Cc: gcc-help@gcc.gnu.org, ro@cebitec.uni-bielefeld.de
Subject: Re: -lpthread -lstdc++ crashes on IRIX 6.5
Date: Tue, 22 Feb 2011 01:45:00 -0000 [thread overview]
Message-ID: <20110222012400.GM5577@tw.local> (raw)
In-Reply-To: <AANLkTi=XZqc0Ze=_f0shOCq5Bc3-ZXS-yGU5-V-pLPsM@mail.gmail.com>
On Tue, Feb 22, 2011 at 01:06:01AM +0000, Jonathan Wakely wrote:
> > We're rebuilding now with a modified g++spec.c (patched to reorder
> > -lpthread after -lstdc++), but still not sure that is the correct fix
> > for this.
>
> The reason I asked is that on most platforms -pthread does two things,
> it uses -D_REENTRANT when compiling (technically when preprocessing)
> and uses -lpthread when linking. On some platforms doing one without
> the other is not supported, so you should use -pthread when compiling
> and when linking.
While I agree with all of this, adding -lpthread to the link line as
well as -pthread should not cause the resulting application to crash.
I see I never got to that in my original mail, sorry :(. Even if we
consistently use -pthread for compiling and linking with gcc, we
sometimes end up with a -lpthread on the link line (often because
libtool has it in some .la files dependency_libs, sometimes due to
pkgconfig), and when that happens the resulting application crashes at
launch.
Peter
--
Peter O'Gorman
pogma@thewrittenword.com
next prev parent reply other threads:[~2011-02-22 1:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-21 19:31 Peter O'Gorman
2011-02-22 0:49 ` Jonathan Wakely
2011-02-22 1:06 ` Peter O'Gorman
2011-02-22 1:24 ` Jonathan Wakely
2011-02-22 1:45 ` Peter O'Gorman [this message]
2011-02-22 20:18 ` Peter O'Gorman
2011-02-22 20:50 ` Rainer Orth
2011-02-22 22:54 ` Peter O'Gorman
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=20110222012400.GM5577@tw.local \
--to=pogma@thewrittenword.com \
--cc=gcc-help@gcc.gnu.org \
--cc=jwakely.gcc@gmail.com \
--cc=ro@cebitec.uni-bielefeld.de \
/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).