Date: Sun, 21 Oct 2012 14:22:43 +0200 From: Jilles Tjoelker <jilles@stack.nl> To: Eitan Adler <lists@eitanadler.com> Cc: FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: -lpthread vs -pthread: does -D_REENTRANT matter? Message-ID: <20121021122243.GB96141@stack.nl> In-Reply-To: <CAF6rxg=Pq%2B=60h3OCaMY%2BwtviuhJ6w_erdx5Q7CSdQURG5%2BF=A@mail.gmail.com> References: <CAF6rxg=PnQvtXydhx8%2BoRZJ2ERBoGwedXPcGi_9icYxAtPuxVw@mail.gmail.com> <20121014144222.GA14503@stack.nl> <CAF6rxg=Pq%2B=60h3OCaMY%2BwtviuhJ6w_erdx5Q7CSdQURG5%2BF=A@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Oct 14, 2012 at 04:55:07PM -0400, Eitan Adler wrote: > On 14 October 2012 10:42, Jilles Tjoelker <jilles@stack.nl> wrote: > > Because C99 does not specify threading, it allows these transformations. > > In C11, they are forbidden. Passing -pthread disables them as well. > Is the man page wrong or do I misunderstand? > This option sets flags for both the preprocessor and linker. It > does not affect the thread safety of object code produced by the > compiler or that of libraries supplied with it. OK, that would explain why I could not find such things. I seem to recall GCC must sometimes be instructed not to do thread-unsafe transformations but I cannot find how to do so. -- Jilles Tjoelker
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121021122243.GB96141>