svn commit: r40970 - head/en_US.ISO8859-1/books/porters-handbook

Alex Dupre ale at FreeBSD.org
Thu Feb 14 17:08:41 UTC 2013


Eitan Adler ha scritto:
> Every time the -pthread vs -lpthread discussion comes up this is brought up.
> I have no idea why this is, or who committed it.

marcus and kris changed that lines a few times in the past, but
PTHREAD_CFLAGS never contained -pthread. The reason is that such
variable was intended for FreeBSD and no preprocessor flag is needed
since FreeBSD 5.

> -pthread also defines certain preproccessor flags and may link in
> additional libraries.

Yes, it could define other flags and it could link other libraries, but
actually it doesn't do it.

> Perhaps if one is changing other things it doesn't hurt to also fix
> this.  It isn't a big priority though.

I agree with you that using -pthread on compiling and linking is The
Right Thing. My objection is that the porter's handbook says maintainers
*must* patch ports to use -pthread. When PTHREAD_CFLAGS/LIBS were added
to bsd.port.mk (and such requirements added to porter's handbook) there
was a specific actual reason and we should obey. Now there isn't
anymore, we can finally live happy and stop patching ports.

A more useful addition in the Porter's handbook IMHO would be an entry
about 'ltverhack' to avoid useless shared library bumps. Even this is
not mandatory, but at least we get a huge gain.

-- 
Alex Dupre


More information about the svn-doc-all mailing list