diff --git a/Makefile.inc1 b/Makefile.inc1 index 19a252673dab..66816ceb5fa2 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1030,12 +1030,12 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libkrb5} \ ${_secure_lib_libcrypto} ${_secure_lib_libssh} \ ${_secure_lib_libssl} -.if ${MK_LIBTHR} != "no" && ${MK_LIBPTHREAD} != "no" +.if ${MK_LIBTHR} != "no" && ${MK_LIBKSE} != "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 +.elif ${MK_LIBKSE} != "no" +_default_thread_lib= lib/libkse .endif _generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib diff --git a/UPDATING b/UPDATING index 107c03110bd3..9ba4ddc1c141 100644 --- a/UPDATING +++ b/UPDATING @@ -21,6 +21,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 7.x IS SLOW: developers choose to disable these features on build machines to maximize performance. +20071008: + Setting WITHOUT_LIBPTHREAD now means WITHOUT_LIBKSE and + WITHOUT_LIBTHR are set. + 20070930: The PCI code has been made aware of PCI domains. This means that the location strings as used by pciconf(8) etc are now in the @@ -145,9 +149,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 7.x IS SLOW: which previously had symbol dependencies to FBSD_1.0, will fail because the freshly installed libc will not have them. - The default threading library has been changed to libthr. If - you wish to have libpthread as your default, use option - DEFAULT_THREAD_LIB=libpthread for the buildworld. + The default threading library (providing "libpthread") has been + changed to libthr. If you wish to have libkse as your default, + use option DEFAULT_THREAD_LIB=libkse for the buildworld. 20070423: The ABI breakage in sendmail(8)'s libmilter has been repaired diff --git a/cddl/lib/Makefile b/cddl/lib/Makefile index 138f60740ee3..f517dfe109d1 100644 --- a/cddl/lib/Makefile +++ b/cddl/lib/Makefile @@ -11,7 +11,7 @@ SUBDIR= libavl \ .if ${MK_ZFS} != "no" _libzfs= libzfs -.if ${MK_LIBTHR} != "no" || ${MK_LIBPTHREAD} != "no" +.if ${MK_LIBTHR} != "no" || ${MK_LIBKSE} != "no" || ${MK_LIBPTHREAD} != "no" _libzpool= libzpool .endif .endif diff --git a/cddl/usr.bin/Makefile b/cddl/usr.bin/Makefile index 2ca99cbe1092..0ec531020c52 100644 --- a/cddl/usr.bin/Makefile +++ b/cddl/usr.bin/Makefile @@ -5,7 +5,7 @@ SUBDIR= ${_ztest} .if ${MK_ZFS} != "no" -.if ${MK_LIBTHR} != "no" || ${MK_LIBPTHREAD} != "no" +.if ${MK_LIBPTHREAD} != "no" && (${MK_LIBTHR} != "no" || ${MK_LIBKSE} != "no") _ztest= ztest .endif .endif diff --git a/cddl/usr.sbin/Makefile b/cddl/usr.sbin/Makefile index f8b81fcdd1f1..5caee344521d 100644 --- a/cddl/usr.sbin/Makefile +++ b/cddl/usr.sbin/Makefile @@ -5,7 +5,7 @@ SUBDIR= ${_zdb} .if ${MK_ZFS} != "no" -.if ${MK_LIBTHR} != "no" || ${MK_LIBPTHREAD} != "no" +.if ${MK_LIBPTHREAD} != "no" && (${MK_LIBTHR} != "no" || ${MK_LIBKSE} != "no") _zdb= zdb .endif .endif diff --git a/lib/Makefile b/lib/Makefile index 890c3bc6cad0..0f4515133c04 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -34,7 +34,7 @@ SUBDIR= ${_csu} libc libbsm libcom_err libcrypt libelf libkvm msun libmd \ libgssapi libipsec \ ${_libipx} libkiconv libmagic libmemstat ${_libmilter} ${_libmp} \ ${_libncp} ${_libngatm} libopie libpam libpcap \ - libpmc ${_libpthread} librt ${_libsdp} ${_libsm} ${_libsmb} \ + libpmc ${_libkse} librt ${_libsdp} ${_libsm} ${_libsmb} \ ${_libsmdb} \ ${_libsmutil} libstand libtelnet ${_libthr} ${_libthread_db} libufs \ libugidfw ${_libusbhid} ${_libvgl} libwrap liby libz ${_bind} @@ -101,11 +101,13 @@ _libsmb= libsmb .endif .if ${MK_LIBPTHREAD} != "no" -_libpthread= libpthread +.if ${MK_LIBKSE} != "no" +_libkse= libkse .endif .if ${MK_LIBTHR} != "no" -_libthr= libthr +_libthr= libthr +.endif .endif .if ${MACHINE_ARCH} != "arm" diff --git a/lib/libkse/Makefile b/lib/libkse/Makefile index ed80d758acca..7c7f8f285a09 100644 --- a/lib/libkse/Makefile +++ b/lib/libkse/Makefile @@ -10,13 +10,13 @@ .include -.if (${DEFAULT_THREAD_LIB} == "libpthread" || ${MK_LIBTHR} == "no") && \ +.if (${DEFAULT_THREAD_LIB} == "libkse" || ${MK_LIBTHR} == "no") && \ ${SHLIBDIR} == "/usr/lib" SHLIBDIR= /lib .endif LIB=kse -SHLIB_MAJOR= 3 +SHLIB_MAJOR= 0 CFLAGS+=-DPTHREAD_KERNEL CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/thread \ -I${.CURDIR}/../../include @@ -26,7 +26,7 @@ CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_ARCH} CFLAGS+=-fno-builtin -# Uncomment this if you want libpthread to contain debug information for +# Uncomment this if you want libkse to contain debug information for # thread locking. CFLAGS+=-D_LOCK_DEBUG WARNS?=2 @@ -38,7 +38,7 @@ WARNS?=2 # Enable extra internal consistancy checks. CFLAGS+=-D_PTHREADS_INVARIANTS -Wall -VERSION_MAP=${.CURDIR}/pthread.map +VERSION_MAP=${.CURDIR}/kse.map PRECIOUSLIB= @@ -47,7 +47,7 @@ PRECIOUSLIB= .include "${.CURDIR}/sys/Makefile.inc" .include "${.CURDIR}/thread/Makefile.inc" -.if ${DEFAULT_THREAD_LIB} == "libpthread" || ${MK_LIBTHR} == "no" +.if ${DEFAULT_THREAD_LIB} == "libkse" || ${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/pthread.map b/lib/libkse/kse.map similarity index 99% rename from lib/libpthread/pthread.map rename to lib/libkse/kse.map index 1f2787ca25fd..e8888df5fba7 100644 --- a/lib/libpthread/pthread.map +++ b/lib/libkse/kse.map @@ -1,6 +1,4 @@ -/* - * $FreeBSD$ - */ +/* $FreeBSD$ */ /* * Use the same naming scheme as libc. diff --git a/lib/libkse/test/guard_b.exp b/lib/libkse/test/guard_b.exp index 8e5b9e426a21..cc6747094a15 100644 --- a/lib/libkse/test/guard_b.exp +++ b/lib/libkse/test/guard_b.exp @@ -1,3 +1,4 @@ +# $FreeBSD$ Test begin No overflow: Overflow: diff --git a/lib/libkse/test/hello_d.exp b/lib/libkse/test/hello_d.exp index 802992c4220d..47be080f357a 100644 --- a/lib/libkse/test/hello_d.exp +++ b/lib/libkse/test/hello_d.exp @@ -1 +1,2 @@ +# $FreeBSD$ Hello world diff --git a/lib/libkse/test/join_leak_d.exp b/lib/libkse/test/join_leak_d.exp index 369a88dd2404..a54de72b8908 100644 --- a/lib/libkse/test/join_leak_d.exp +++ b/lib/libkse/test/join_leak_d.exp @@ -1,2 +1,3 @@ +# $FreeBSD$ Test begin Test end diff --git a/lib/libkse/test/mutex_d.exp b/lib/libkse/test/mutex_d.exp index de8a4e42d8e2..dd2f7bd1e526 100644 --- a/lib/libkse/test/mutex_d.exp +++ b/lib/libkse/test/mutex_d.exp @@ -1,3 +1,4 @@ +# $FreeBSD$ Testing pthread_mutex_init -------------------------- diff --git a/lib/libkse/test/sem_d.exp b/lib/libkse/test/sem_d.exp index b0de3da1f5e6..cd86f1241109 100644 --- a/lib/libkse/test/sem_d.exp +++ b/lib/libkse/test/sem_d.exp @@ -1,3 +1,4 @@ +# $FreeBSD$ Test begin Got semaphore Got semaphore diff --git a/lib/libkse/test/sigsuspend_d.exp b/lib/libkse/test/sigsuspend_d.exp index 901fa50dd2d1..03c9a727799e 100644 --- a/lib/libkse/test/sigsuspend_d.exp +++ b/lib/libkse/test/sigsuspend_d.exp @@ -1,3 +1,4 @@ +# $FreeBSD$ -> Suspender thread signal handler caught signal 16 Sigsuspend woke up by signal 16 -> Suspender thread signal handler caught signal 16 diff --git a/lib/libkse/test/sigwait_d.exp b/lib/libkse/test/sigwait_d.exp index 2e9b2c492525..b9245be31f0e 100644 --- a/lib/libkse/test/sigwait_d.exp +++ b/lib/libkse/test/sigwait_d.exp @@ -1,3 +1,4 @@ +# $FreeBSD$ Sigwait caught signal 16 Sigwait caught signal 16 Sigwait caught signal 30 diff --git a/lib/libpthread/Makefile b/lib/libpthread/Makefile deleted file mode 100644 index ed80d758acca..000000000000 --- a/lib/libpthread/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# $FreeBSD$ -# -# All library objects contain FreeBSD revision strings by default; they may be -# excluded as a space-saving measure. To produce a library that does -# not contain these strings, add -DSTRIP_FBSDID (see ) to CFLAGS -# below. Note, there are no IDs for syscall stubs whose sources are generated. -# To included legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS -# (for system call stubs) to CFLAGS below. -DSYSLIBC_SCCS affects just the -# system call stubs. - -.include - -.if (${DEFAULT_THREAD_LIB} == "libpthread" || ${MK_LIBTHR} == "no") && \ - ${SHLIBDIR} == "/usr/lib" -SHLIBDIR= /lib -.endif - -LIB=kse -SHLIB_MAJOR= 3 -CFLAGS+=-DPTHREAD_KERNEL -CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/thread \ - -I${.CURDIR}/../../include -CFLAGS+=-I${.CURDIR}/arch/${MACHINE_ARCH}/include -CFLAGS+=-I${.CURDIR}/sys -CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf -CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_ARCH} -CFLAGS+=-fno-builtin - -# Uncomment this if you want libpthread to contain debug information for -# thread locking. -CFLAGS+=-D_LOCK_DEBUG -WARNS?=2 - -# Uncomment this if you want to build a 1:1 threading mode library -# however it is no longer strictly conformed to POSIX -# CFLAGS+=-DSYSTEM_SCOPE_ONLY - -# Enable extra internal consistancy checks. -CFLAGS+=-D_PTHREADS_INVARIANTS -Wall - -VERSION_MAP=${.CURDIR}/pthread.map - -PRECIOUSLIB= - -.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc" -.include "${.CURDIR}/support/Makefile.inc" -.include "${.CURDIR}/sys/Makefile.inc" -.include "${.CURDIR}/thread/Makefile.inc" - -.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 -.endif -.if ${MK_PROFILE} != "no" -SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a -.endif -.endif - -.include diff --git a/sbin/ggate/Makefile b/sbin/ggate/Makefile index 7ab5ccb9aede..e889f2fafad3 100644 --- a/sbin/ggate/Makefile +++ b/sbin/ggate/Makefile @@ -6,7 +6,7 @@ SUBDIR= ${_ggatec} \ ${_ggated} \ ggatel -.if ${MK_LIBTHR} != "no" || ${MK_LIBPTHREAD} != "no" +.if ${MK_LIBPTHREAD} != "no" && (${MK_LIBTHR} != "no" || ${MK_LIBKSE} != "no") _ggatec= ggatec _ggated= ggated .endif diff --git a/share/man/man3/Makefile b/share/man/man3/Makefile index fcc94ef3dfbc..5ff093fb887f 100644 --- a/share/man/man3/Makefile +++ b/share/man/man3/Makefile @@ -146,7 +146,7 @@ MLINKS+= tree.3 RB_EMPTY.3 \ tree.3 SPLAY_RIGHT.3 \ tree.3 SPLAY_ROOT.3 -.if ${MK_LIBPTHREAD} != "no" || ${MK_LIBTHR} != "no" +.if ${MK_LIBPTHREAD} != "no" && (${MK_LIBTHR} != "no" || ${MK_LIBKSE} != "no") PTHREAD_MAN= pthread.3 \ pthread_atfork.3 \ pthread_attr.3 \ diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 68c94570794b..3a38aeff7660 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -379,10 +379,10 @@ support. On amd64, set to not build 32-bit library set and a .Nm ld-elf32.so.1 runtime linker. -.It Va WITHOUT_LIBPTHREAD -.\" from FreeBSD: src/tools/build/options/WITHOUT_LIBPTHREAD,v 1.1 2006/03/21 07:50:50 ru Exp +.It Va WITHOUT_LIBKSE +.\" from FreeBSD: src/tools/build/options/WITHOUT_LIBKSE,v 1.1 2006/03/21 07:50:50 obrien Exp Set to not build the -.Nm libpthread +.Nm libkse (M:N threading) library. .It Va WITHOUT_LIBTHR @@ -391,6 +391,15 @@ Set to not build the .Nm libthr (1:1 threading) library. +.It Va WITHOUT_LIBPTHREAD +.\" from FreeBSD: src/tools/build/options/WITHOUT_LIBPTHREAD,v 1.1 2006/03/21 07:50:50 ru Exp +Set to not build either of the +.Nm libpthread +providing libraries ( +.Nm libthr +(1:1) & +.Nm libkse +(M:N)). .It Va WITHOUT_LOCALES .\" from FreeBSD: src/tools/build/options/WITHOUT_LOCALES,v 1.1 2006/03/21 07:50:50 ru Exp Set to not build localization files; see diff --git a/share/mk/bsd.compat.mk b/share/mk/bsd.compat.mk index dfa5dfc53e2d..5c3a8755b8f0 100644 --- a/share/mk/bsd.compat.mk +++ b/share/mk/bsd.compat.mk @@ -16,6 +16,7 @@ NOINFOCOMPRESS:NO_INFOCOMPRESS \ NOINSTALLLIB:NO_INSTALLLIB \ NOLIBPTHREAD:NO_LIBPTHREAD \ + NOLIBKSE:NO_LIBKSE \ NOLIBTHR:NO_LIBTHR \ NOLINT:NO_LINT \ NOMAN:NO_MAN \ diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index b3f431bad661..92f3b3b0a219 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -239,6 +239,7 @@ WITHOUT_${var}= KERBEROS \ LIB32 \ LIBPTHREAD \ + LIBKSE \ LIBTHR \ LOCALES \ LPR \ @@ -328,6 +329,7 @@ WITH_IDEA= KVM \ LIB32 \ LIBPTHREAD \ + LIBKSE \ LIBTHR \ LOCALES \ LPR \ diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 87550da48101..a5e004bc4eb7 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -904,7 +904,7 @@ OLD_FILES+=usr/share/man/man8/ktutil.8.gz # to be filled in #.endif -#.if ${MK_LIBPTHREAD} == no +#.if ${MK_LIBKSE} == no # to be filled in #.endif diff --git a/tools/build/options/WITHOUT_LIBKSE b/tools/build/options/WITHOUT_LIBKSE new file mode 100644 index 000000000000..28a3fd8a2aed --- /dev/null +++ b/tools/build/options/WITHOUT_LIBKSE @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build the +.Nm libpthread +(M:N threading) +library. diff --git a/tools/build/options/WITHOUT_LIBPTHREAD b/tools/build/options/WITHOUT_LIBPTHREAD index 28a3fd8a2aed..88320c0aa321 100644 --- a/tools/build/options/WITHOUT_LIBPTHREAD +++ b/tools/build/options/WITHOUT_LIBPTHREAD @@ -1,5 +1,8 @@ .\" $FreeBSD$ -Set to not build the +Set to not build either of the .Nm libpthread -(M:N threading) -library. +providing libraries ( +.Nm libthr +(1:1) & +.Nm libkse +(M:N)). diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 90cab4c7e5f9..ebc5d4c3715b 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -260,7 +260,7 @@ _calendar= calendar .if ${MK_OPENSSL} != "no" _chkey= chkey _newkey= newkey -.if ${MK_LIBTHR} != "no" || ${MK_LIBPTHREAD} != "no" +.if ${MK_LIBPTHREAD} != "no" && (${MK_LIBTHR} != "no" || ${MK_LIBKSE} != "no") _csup= csup .endif .endif diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index 066ffa09e53a..c4bfd256ed3a 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -268,7 +268,7 @@ _ypset= ypset _authpf= authpf .endif -.if ${MK_LIBTHR} != "no" || ${MK_LIBPTHREAD} != "no" +.if ${MK_LIBPTHREAD} != "no" && (${MK_LIBTHR} != "no" || ${MK_LIBKSE} != "no") _pppctl= pppctl .endif @@ -277,7 +277,7 @@ _lpr= lpr .endif .if ${MK_NS_CACHING} != "no" -.if ${MK_LIBTHR} != "no" || ${MK_LIBPTHREAD} != "no" +.if ${MK_LIBPTHREAD} != "no" && (${MK_LIBTHR} != "no" || ${MK_LIBKSE} != "no") _nscd= nscd .endif .endif diff --git a/usr.sbin/ngctl/Makefile b/usr.sbin/ngctl/Makefile index cf17d2eb8005..1a9e50b74676 100644 --- a/usr.sbin/ngctl/Makefile +++ b/usr.sbin/ngctl/Makefile @@ -13,7 +13,7 @@ WARNS?= 3 NGCTL_NO_LIBEDIT= .endif -.if ${MK_LIBTHR} == "no" && ${MK_LIBPTHREAD} == "no" +.if ${MK_LIBPTHREAD} == "no" && ${MK_LIBTHR} == "no" && ${MK_LIBKSE} NGCTL_NO_LIBEDIT= .endif