summaryrefslogtreecommitdiff
path: root/mk/pthread.buildlink3.mk
AgeCommit message (Collapse)AuthorFilesLines
2010-02-06Haiku does not have /usr/include/pthread.h,obache1-2/+2
but have native pthread support and pthread.h in include path.
2009-03-20Simply and speed up buildlink3.mk files and processing.joerg1-4/+2
This changes the buildlink3.mk files to use an include guard for the recursive include. The use of BUILDLINK_DEPTH, BUILDLINK_DEPENDS, BUILDLINK_PACKAGES and BUILDLINK_ORDER is handled by a single new variable BUILDLINK_TREE. Each buildlink3.mk file adds a pair of enter/exit marker, which can be used to reconstruct the tree and to determine first level includes. Avoiding := for large variables (BUILDLINK_ORDER) speeds up parse time as += has linear complexity. The include guard reduces system time by avoiding reading files over and over again. For complex packages this reduces both %user and %sys time to half of the former time.
2008-01-23Use bsd.fast.prefs.mk in some very commonly included locations.tnn1-2/+2
2007-11-07Made "show-all-pthread" work.rillig1-1/+5
2007-02-10Replaced the deprecated PKG_SKIP_REASON with PKG_FAIL_REASON.rillig1-4/+4
2006-07-08Change the format of BUILDLINK_ORDER to contain depth information as well,jlam1-2/+2
and add a new helper target and script, "show-buildlink3", that outputs a listing of the buildlink3.mk files included as well as the depth at which they are included. For example, "make show-buildlink3" in fonts/Xft2 displays: zlib fontconfig iconv zlib freetype2 expat freetype2 Xrender renderproto
2006-07-08Track information in a new variable BUILDLINK_ORDER that informs usjlam1-1/+2
of the order in which buildlink3.mk files are (recursively) included by a package Makefile.
2006-04-06Over 1200 files touched but no revisions bumped :)reed1-2/+2
RECOMMENDED is removed. It becomes ABI_DEPENDS. BUILDLINK_RECOMMENDED.foo becomes BUILDLINK_ABI_DEPENDS.foo. BUILDLINK_DEPENDS.foo becomes BUILDLINK_API_DEPENDS.foo. BUILDLINK_DEPENDS does not change. IGNORE_RECOMMENDED (which defaulted to "no") becomes USE_ABI_DEPENDS which defaults to "yes". Added to obsolete.mk checking for IGNORE_RECOMMENDED. I did not manually go through and fix any aesthetic tab/spacing issues. I have tested the above patch on DragonFly building and packaging subversion and pkglint and their many dependencies. I have also tested USE_ABI_DEPENDS=no on my NetBSD workstation (where I have used IGNORE_RECOMMENDED for a long time). I have been an active user of IGNORE_RECOMMENDED since it was available. As suggested, I removed the documentation sentences suggesting bumping for "security" issues. As discussed on tech-pkg. I will commit to revbump, pkglint, pkg_install, createbuildlink separately. Note that if you use wip, it will fail! I will commit to pkgsrc-wip later (within day).
2005-11-04Shortened and restructured the header comment. Now the interface to thisrillig1-79/+41
file is described in terms of input and output variables.
2005-04-13Fixed quoting errors. Approved by jlam.rillig1-10/+10
2004-11-29Since last revision PTHREAD_AUTO_VARS defaults to 'no'.seb1-2/+2
2004-11-25Default PTHREAD_AUTO_VARS to the safer value of "no". Most packagesjlam1-2/+2
that use pthreads already implement their own probes for pthreads, so we don't need to auto-add the compiler/linker flags.
2004-11-17PTHREAD_AUTO_VARS is "yes" or "no" for whether the values of thejlam1-1/+10
variables PTHREAD_{CFLAGS,CPPFLAGS,LDFLAGS,LIBS} should be automatically added to their respective variables. Defaults to "yes". Packages that only require some parts to be linked the the pthreads compiler/linker options should set this to "no" and selectively add those options via patches to the right makefiles..
2004-11-12Move PREFER_NATIVE_PTHREADS default setting to from pthread.buildlink3.mkjlam1-2/+1
to defaults/mk.conf, where all defaults should live.
2004-11-12Remove redundant uses of PTHREAD_{CFLAGS,LDFLAGS} now that they're addedjlam1-2/+1
automatically by pthread.buildlink3.mk. Also, factor out the pthread library out of PTHREAD_LDFLAGS into a standalone variable PTHREAD_LIBS and use it in packages where necessary (usually the ones that don't have a GNU configure script).
2004-11-12(1) Split out the native (built-in) pthread detection injlam1-45/+26
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.
2004-11-10Backout previous pending further testing. There are rumors of problemsjlam1-3/+1
with -pthread/-pthreads GCC options detection that may be difficult to overcome.
2004-11-10If we are using native pthreads, then add "pthread" to BUILDLINK_PACKAGESjlam1-1/+3
so that the buildlink3 framework knows to use the various BUILDLINK_*.pthread variables. This fixes a long-standing and long- overlooked bug in pthread.buildlink3.mk that has existed since the buildlink3 framework was initially committed. As a result of this change, modifications to packages to introduce PTHREAD_{CFLAGS,LDFLAGS} in various places to either the configure script or into Makefiles are probably no longer needed.
2004-07-27eww, replace another [ with ${TEST}.xtraeme1-2/+2
2004-07-27s/echo/${ECHO}/xtraeme1-3/+3
2004-07-01Do not use continuation -- line is shortwiz1-3/+2
enough, and this silences a pkglint warning.
2004-06-21Check for libpthread.so.* file with -f instead of echo as suggested byxtraeme1-2/+2
grant, because previous check was not working fine, I tested it under OpenBSD 3.5 and now just works.
2004-06-21Under OpenBSD there is no libpthread.so, just libpthread.so.X.X, andxtraeme1-1/+12
BUILDLINK_LDADD.pthread was empty, so add a check to find the libraries and if they are found, add -lpthread to BUILDLINK_LDADD.pthread, thanks to grant beattie for the suggestion. Reported and tested by Sergio Jimenez <tripledes at eslack dot org>.
2004-06-12when using native threads, only set BUILDLINK_CFLAGS.pthread=-pthread ongrant1-2/+10
systems known to support its (FreeBSD, NetBSD, Linux). fixes breakage caused by passing -pthread to SunPro cc(1) and likely also fixes platforms other than the above.
2004-03-31revert previous.seb1-4/+4
2004-03-29When PTHREAD_TYPE is 'native' set USE_BUILTIN.pthread to YES andseb1-4/+4
add 'pthread' to BUILDLINK_PACKAGES so that BUILDLINK_{{LD,C}FLAGS,LDADD}.pthread actually have an effect. This should fix the build of at least tcl/tk related packages now that tcl and tk packages are thread-aware. Remove comments about linking native pthread libraries and headers into ${BUILDLINK_DIR} as this does not happen.
2004-03-18Fix serious bug where BUILDLINK_PACKAGES wasn't being ordered properlyjlam1-5/+5
by moving the inclusion of buildlink3.mk files outside of the protected region. This bug would be seen by users that have set PREFER_PKGSRC or PREFER_NATIVE to non-default values. BUILDLINK_PACKAGES should be ordered so that for any package in the list, that package doesn't depend on any packages to the left of it in the list. This ordering property is used to check for builtin packages in the correct order. The problem was that including a buildlink3.mk file for <pkg> correctly ensured that <pkg> was removed from BUILDLINK_PACKAGES and appended to the end. However, since the inclusion of any other buildlink3.mk files within that buildlink3.mk was in a region that was protected against multiple inclusion, those dependencies weren't also moved to the end of BUILDLINK_PACKAGES.
2004-01-25Append to BUILDLINK_DEPENDS.<pkg> instead of overriding it so that thejlam1-2/+2
most restrictive dependency is always part of the DEPENDS/BUILD_DEPENDS list.
2004-01-03Initial sprinkling of work-in-progress buildlink3.mk files for using thejlam1-0/+188
buildlink3 framework.