Boost logo

Boost Users :

From: Dale Peakall (dale.peakall_at_[hidden])
Date: 2002-03-29 09:19:55


> -----Original Message-----
> From: John Maddock [mailto:john_maddock_at_[hidden]]
> Sent: 29 March 2002 12:22
> To: Boost-Users_at_[hidden]
> Subject: Re: [Boost-Users] linking with boost.threads on
> solaris 8 with
> gcc 3.0.3
>
>
> > Intriguing, as gcc-3.0.3 doesn't have a -pthread argument.
> I believe you
> > specify the threading model with a configure argument when
> building gcc
> now
> > (although I just grabbed pre-built binaries, so I may be wrong).
>
> I don't know about gcc3, but the way to tell is to do a
>
> gcc -dumpspecs | less
>
> and then search for "thread",
>
> BTW gcc2.95 doesn't have -pthread either: it's spelt
> -pthreads, note the
> trailing 's' it makes a difference!
>
> For gcc 2.95 -pthreads is the same as:
> CXXFLAGS=-D_REENTRANT -D_PTHREADS
> LIBS=-lpthread
>
> You are also correct that you have to specify the thread
> model when you
> build gcc, that's a precondition for thread safe code, but
> it's not the end
> of it, without -pthreads (which then defines _REENTRANT) your std lib
> allocator won't be thread safe by default (at least on 2.95).
>
> BTW I was also wrong about the #pragma implementation hack -
> it doesn't work
> :-(
> Evidently some of the functions from that header are in the
> std lib, and
> some aren't, maybe the version of gcc I'm using wasn't built
> with thread
> support, I don't know (I'm using the sourceforge compile farm
> for testing
> this so I have no control over the gcc install). Whatever
> we're back to
> square one on that one, although at least the release version
> of the thread
> lib does work.
>
> John Maddock
> http://ourworld.compuserve.com/homepages/john_maddock/index.htm
>
>
>
> ------------------------ Yahoo! Groups Sponsor
> ---------------------~-->
> Tiny Wireless Camera under $80!
> Order Now! FREE VCR Commander!
> Click Here - Only 1 Day Left!
> http://us.click.yahoo.com/nuyOHD/7.PDAA/yigFAA/EbFolB/TM
> --------------------------------------------------------------
> -------~->
>
> Info: <http://www.boost.org>
> Wiki: <http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl>
> Unsubscribe: <mailto:boost-users-unsubscribe_at_[hidden]>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
>
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net