summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2007-10-01 18:22:32 +0000
committerru <ru@FreeBSD.org>2007-10-01 18:22:32 +0000
commit0ea9576a4d3c8cec356445aa34c765471dc136ac (patch)
tree90e7bb1d3149059a948d4992dd3241a0069cdfe0 /lib
parent62d48a1604c31ca3959932216d8b9735207c594d (diff)
downloadFreeBSD-src-0ea9576a4d3c8cec356445aa34c765471dc136ac.zip
FreeBSD-src-0ea9576a4d3c8cec356445aa34c765471dc136ac.tar.gz
Always install libpthread.* symlinks if at least one of
the threading libraries is built. This simplifies the logic in makefiles that need to check if the pthreads support is present. It also fixes a bug where we would build a threading library that we shouldn't have built: for example, building with WITHOUT_LIBTHR and the default value of DEFAULT_THREADING_LIB (libthr) would mistakenly build the libthr library, but not install it. Approved by: re (kensmith)
Diffstat (limited to 'lib')
-rw-r--r--lib/libkse/Makefile5
-rw-r--r--lib/libpthread/Makefile5
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/libkse/Makefile b/lib/libkse/Makefile
index ae44905..ed80d75 100644
--- a/lib/libkse/Makefile
+++ b/lib/libkse/Makefile
@@ -10,7 +10,8 @@
.include <bsd.own.mk>
-.if ${DEFAULT_THREAD_LIB} == "libpthread" && ${SHLIBDIR} == "/usr/lib"
+.if (${DEFAULT_THREAD_LIB} == "libpthread" || ${MK_LIBTHR} == "no") && \
+ ${SHLIBDIR} == "/usr/lib"
SHLIBDIR= /lib
.endif
@@ -46,7 +47,7 @@ PRECIOUSLIB=
.include "${.CURDIR}/sys/Makefile.inc"
.include "${.CURDIR}/thread/Makefile.inc"
-.if ${DEFAULT_THREAD_LIB} == "libpthread"
+.if ${DEFAULT_THREAD_LIB} == "libpthread" || ${MK_LIBTHR} == "no"
SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a
.if !defined(NO_PIC)
SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so
diff --git a/lib/libpthread/Makefile b/lib/libpthread/Makefile
index ae44905..ed80d75 100644
--- a/lib/libpthread/Makefile
+++ b/lib/libpthread/Makefile
@@ -10,7 +10,8 @@
.include <bsd.own.mk>
-.if ${DEFAULT_THREAD_LIB} == "libpthread" && ${SHLIBDIR} == "/usr/lib"
+.if (${DEFAULT_THREAD_LIB} == "libpthread" || ${MK_LIBTHR} == "no") && \
+ ${SHLIBDIR} == "/usr/lib"
SHLIBDIR= /lib
.endif
@@ -46,7 +47,7 @@ PRECIOUSLIB=
.include "${.CURDIR}/sys/Makefile.inc"
.include "${.CURDIR}/thread/Makefile.inc"
-.if ${DEFAULT_THREAD_LIB} == "libpthread"
+.if ${DEFAULT_THREAD_LIB} == "libpthread" || ${MK_LIBTHR} == "no"
SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a
.if !defined(NO_PIC)
SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so
OpenPOWER on IntegriCloud