Hi Sandra,

> PR 16519 notes that -pthread has only ever been documented as an RS6000 and
> Solaris 2 option.  In fact it's supported by most/all(?) POSIX-flavored
> targets, including GNU/Linux, BSD variants, Darwin, etc. It's probably best
> to document it as a generic option, with the expectation that GCC supports
> -pthread if the underlying operating system or C library provides an
> implementation of the POSIX threads API.
>
> After scratching my head about it, it seemed that it's best categorized as
> a linker option even though it also affects the preprocessor on some
> targets.  I'll wait a day or two before committing the attached patch, in
> case anybody wants to argue that this is the wrong way to categorize it.

I don't like categorizing it as a linker option: as you say, it affects
the preprocessor as well (adding -D_REENTRANT on most systems), and in
the past (not completely sure about the present) there were subtle bugs
if you forgot to add -pthread during compilation.

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to