Subject: CVS commit: pkgsrc/mk
To: None <pkgsrc-changes@NetBSD.org>
From: Johnny C. Lam <jlam@netbsd.org>
List: pkgsrc-changes
Date: 11/12/2004 05:20:02
Module Name: pkgsrc
Committed By: jlam
Date: Fri Nov 12 05:20:02 UTC 2004
Modified Files:
pkgsrc/mk: bsd.pkg.mk pthread.buildlink3.mk
Added Files:
pkgsrc/mk: pthread.builtin.mk
Log Message:
(1) Split out the native (built-in) pthread detection in
pthread.buildlink3.mk into a separate file, pthread.builtin.mk,
that is handled using the usual builtin.mk logic.
(2) If pthread.buildlink3.mk is included by a package Makefile, then
automatically add the necessary compiler and linker flags to
compile and link pthread-enabled/reentrant code. For native
pthreads, this means passing -pthread to the compiler and linker.
For the userland pthread replacement, we pass -D_REENTRANT and
-lpthread instead.
(3) Add PTHREAD_{CFLAGS,LDFLAGS,LIBS} in both CONFIGURE_ENV and MAKE_ENV
when pthread.buildlink3.mk is included so that the configure and
build processes can use these values. Remove these definitions
from bsd.pkg.mk since PTHREAD_* variables are all declared within
pthread.buildlink3.mk.
XXX For now, PTHREAD_LDFLAGS is a superset of PTHREAD_LIBS until
XXX packages that use use PTHREAD_LDFLAGS can be fixed.
To generate a diff of this commit:
cvs rdiff -r1.1534 -r1.1535 pkgsrc/mk/bsd.pkg.mk
cvs rdiff -r1.13 -r1.14 pkgsrc/mk/pthread.buildlink3.mk
cvs rdiff -r0 -r1.1 pkgsrc/mk/pthread.builtin.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.