Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 08 Feb 2002 11:20:21 +0200
From:      Maxim Sobolev <sobomax@FreeBSD.org>
To:        Stephen Montgomery-Smith <stephen@math.missouri.edu>
Cc:        "M. Warner Losh" <imp@village.org>, jdp@FreeBSD.org, deischen@FreeBSD.org, jasone@FreeBSD.org, hackers@FreeBSD.org, jlemon@FreeBSD.org
Subject:   Re: Linking libc before libc_r into application causes weirdproblems
Message-ID:  <3C639855.DA710095@FreeBSD.org>
References:  <1013147180.73417.2.camel@notebook> <20020207.234939.69060047.imp@village.org> <3C63773A.8DBF36F6@math.missouri.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Stephen Montgomery-Smith wrote:
> 
> "M. Warner Losh" wrote:
> >
> > Confirmed.  test.c appears to work properly when compiled:
> >
> > cc -o test test.c -pthread
> > ./test
> >
> > Generally speaking, if you want to add -lc_r, you are doing things
> > incorrectly.  I've done way to much building...  In FreeBSD 3.x you
> > did need to do -lc_r, but that was changed to -pthread in 4.0.
> >
> > Warner
> >
> 
> According to the man page for gcc, you are supposed to write
> 
> cc -o test test.c -pthread -D_THREAD_SAFE
> 
> or am I misunderstanding something?

In 5.0-CURRENT -pthread was replaced by -lc_r.

-Maxim

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C639855.DA710095>