Date: Mon, 8 Sep 2003 18:39:24 -0400 (EDT) From: Daniel Eischen <eischen@vigrid.com> To: Loren James Rittle <rittle@latour.rsch.comm.mot.com> Cc: freebsd-threads@freebsd.org Subject: Re: Removing -pthread from gcc Message-ID: <Pine.GSO.4.10.10309081823480.8588-100000@pcnet5.pcnet.com> In-Reply-To: <Pine.GSO.4.10.10309051914370.1042-100000@pcnet5.pcnet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 5 Sep 2003, Daniel Eischen wrote: > > On Fri, 5 Sep 2003, Loren James Rittle wrote: > > Thank you for considering these words. BTW, wouldn't it be cooler > > if (example only): > > > > -pthread (whatever the system default) > > -pthread=1 (1 process, aka -lc_r) > > -pthread=1:1 (1 process per thread, aka -lthr) > > -pthread=M:N (M threads in N processes, aka -lkse) > > -pthread=late/weak (perhaps not good ELF form, link against a stub to > > which all POSIX thread libraries on FreeBSD must conform, do not > > record the dependency ala FreeBSD4 default for -lc; or that does it in > > a weak manner en mass such that binding is deferred to the final > > selection made at a final link time) > > That's a lot better :-) The only problem is that we have 2 > different libraries that offer 1:1... > > I would not object to this approach, but I would like to > temporarily make -pthread (without args) either a NOOP or > an error in our tree to help correct "shortcoming in ports". So is there a consensus? My take is that we make -pthread a NOOP. I do have some reservations with -pthread=<threading model> though. With all the applications written primarily for Linux, I am fearful that those applications will use -pthread=1:1 just because that is Linux' threading model. The performance, reliability, etc of threading models will vary from OS to OS, so you'd probably end up basing the selected threading model on the OS. This defeats the point of having a standard compiler option; you might as well make it a link option (which it already is). -- Dan Eischen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10309081823480.8588-100000>
