diff options
author | ru <ru@FreeBSD.org> | 2007-10-01 18:22:32 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2007-10-01 18:22:32 +0000 |
commit | 0ea9576a4d3c8cec356445aa34c765471dc136ac (patch) | |
tree | 90e7bb1d3149059a948d4992dd3241a0069cdfe0 | |
parent | 62d48a1604c31ca3959932216d8b9735207c594d (diff) | |
download | FreeBSD-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)
-rw-r--r-- | Makefile.inc1 | 10 | ||||
-rw-r--r-- | lib/libkse/Makefile | 5 | ||||
-rw-r--r-- | lib/libpthread/Makefile | 5 | ||||
-rw-r--r-- | sbin/ggate/Makefile | 3 | ||||
-rw-r--r-- | usr.bin/Makefile | 3 | ||||
-rw-r--r-- | usr.sbin/Makefile | 19 | ||||
-rw-r--r-- | usr.sbin/ngctl/Makefile | 3 |
7 files changed, 23 insertions, 25 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1 index 8785d33..a0a011a 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1027,12 +1027,20 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libkrb5} \ ${_lib_libgssapi} ${_lib_libipx} \ lib/libkiconv lib/libkvm lib/libmd \ lib/ncurses/ncurses lib/ncurses/ncursesw \ - lib/libopie lib/libpam lib/${DEFAULT_THREAD_LIB} \ + lib/libopie lib/libpam ${_default_thread_lib} \ lib/libradius lib/libsbuf lib/libtacplus lib/libutil \ ${_lib_libypclnt} lib/libz lib/msun \ ${_secure_lib_libcrypto} ${_secure_lib_libssh} \ ${_secure_lib_libssl} +.if ${MK_LIBTHR} != "no" && ${MK_LIBPTHREAD} != "no" +_default_thread_lib= lib/${DEFAULT_THREAD_LIB} +.elif ${MK_LIBTHR} != "no" +_default_thread_lib= lib/libthr +.elif ${MK_LIBPTHREAD} != "no" +_default_thread_lib= lib/libpthread +.endif + _generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib lib/libopie__L lib/libtacplus__L: lib/libmd__L 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 diff --git a/sbin/ggate/Makefile b/sbin/ggate/Makefile index 989589f..7ab5ccb 100644 --- a/sbin/ggate/Makefile +++ b/sbin/ggate/Makefile @@ -6,8 +6,7 @@ SUBDIR= ${_ggatec} \ ${_ggated} \ ggatel -.if ${MK_LIBTHR} != "no" || \ - (${MACHINE_ARCH} != "sparc64" && ${MK_LIBPTHREAD} != "no") +.if ${MK_LIBTHR} != "no" || ${MK_LIBPTHREAD} != "no" _ggatec= ggatec _ggated= ggated .endif diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 75c6af7..90cab4c 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -260,8 +260,7 @@ _calendar= calendar .if ${MK_OPENSSL} != "no" _chkey= chkey _newkey= newkey -.if ${MK_LIBTHR} != "no" || \ - (${MACHINE_ARCH} != "sparc64" && ${MK_LIBPTHREAD} != "no") +.if ${MK_LIBTHR} != "no" || ${MK_LIBPTHREAD} != "no" _csup= csup .endif .endif diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index 8eac4b5..066ffa0 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -268,13 +268,16 @@ _ypset= ypset _authpf= authpf .endif +.if ${MK_LIBTHR} != "no" || ${MK_LIBPTHREAD} != "no" +_pppctl= pppctl +.endif + .if ${MK_LPR} != "no" _lpr= lpr .endif .if ${MK_NS_CACHING} != "no" -.if ${MK_LIBTHR} != "no" || \ - (${MACHINE_ARCH} != "sparc64" && ${MK_LIBPTHREAD} != "no") +.if ${MK_LIBTHR} != "no" || ${MK_LIBPTHREAD} != "no" _nscd= nscd .endif .endif @@ -313,9 +316,6 @@ _mount_smbfs= mount_smbfs _mptable= mptable _ndiscvt= ndiscvt _pnpinfo= pnpinfo -.if ${MK_LIBPTHREAD} != "no" || ${MK_LIBTHR} != "no" -_pppctl= pppctl -.endif _sicontrol= sicontrol _spkrtest= spkrtest _zzz= zzz @@ -349,9 +349,6 @@ _mount_nwfs= mount_nwfs _mount_smbfs= mount_smbfs _mptable= mptable _ndiscvt= ndiscvt -.if ${MK_LIBPTHREAD} != "no" || ${MK_LIBTHR} != "no" -_pppctl= pppctl -.endif _sicontrol= sicontrol _spkrtest= spkrtest _zzz= zzz @@ -363,9 +360,6 @@ _acpi= acpi .endif _kgmon= kgmon _mount_smbfs= mount_smbfs -.if ${MK_LIBPTHREAD} != "no" || ${MK_LIBTHR} != "no" -_pppctl= pppctl -.endif _zzz= zzz .endif @@ -377,9 +371,6 @@ _nvram= nvram .if ${MACHINE_ARCH} == "sparc64" _eeprom= eeprom _ofwdump= ofwdump -.if ${MK_LIBTHR} != "no" -_pppctl= pppctl -.endif .endif .include <bsd.subdir.mk> diff --git a/usr.sbin/ngctl/Makefile b/usr.sbin/ngctl/Makefile index bd93699..cf17d2e 100644 --- a/usr.sbin/ngctl/Makefile +++ b/usr.sbin/ngctl/Makefile @@ -13,8 +13,7 @@ WARNS?= 3 NGCTL_NO_LIBEDIT= .endif -.if ${MK_LIBTHR} == "no" && \ - (${MACHINE_ARCH} == "sparc64" || ${MK_LIBPTHREAD} == "no") +.if ${MK_LIBTHR} == "no" && ${MK_LIBPTHREAD} == "no" NGCTL_NO_LIBEDIT= .endif |