summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2007-10-09 13:42:34 +0000
committerobrien <obrien@FreeBSD.org>2007-10-09 13:42:34 +0000
commiteb3f6a9e7473ee9d6e8016ce8d9cc1e8286bdd98 (patch)
treec47a609d11ee2b49fc8234ffe6ee4e508318db84
parent8e21b1f738e3a7d52ec50aa5730787013a76a4d5 (diff)
downloadFreeBSD-src-eb3f6a9e7473ee9d6e8016ce8d9cc1e8286bdd98.zip
FreeBSD-src-eb3f6a9e7473ee9d6e8016ce8d9cc1e8286bdd98.tar.gz
Repo copy libpthreads to libkse.
This introduces the WITHOUT_LIBKSE nob, and changes WITHOUT_LIBPTHREADS to mean with neither threading libs. Approved by: re(kensmith)
-rw-r--r--Makefile.inc16
-rw-r--r--UPDATING10
-rw-r--r--cddl/lib/Makefile2
-rw-r--r--cddl/usr.bin/Makefile2
-rw-r--r--cddl/usr.sbin/Makefile2
-rw-r--r--lib/Makefile8
-rw-r--r--lib/libkse/Makefile10
-rw-r--r--lib/libkse/kse.map (renamed from lib/libpthread/pthread.map)4
-rw-r--r--lib/libkse/test/guard_b.exp1
-rw-r--r--lib/libkse/test/hello_d.exp1
-rw-r--r--lib/libkse/test/join_leak_d.exp1
-rw-r--r--lib/libkse/test/mutex_d.exp1
-rw-r--r--lib/libkse/test/sem_d.exp1
-rw-r--r--lib/libkse/test/sigsuspend_d.exp1
-rw-r--r--lib/libkse/test/sigwait_d.exp1
-rw-r--r--lib/libpthread/Makefile60
-rw-r--r--sbin/ggate/Makefile2
-rw-r--r--share/man/man3/Makefile2
-rw-r--r--share/man/man5/src.conf.515
-rw-r--r--share/mk/bsd.compat.mk1
-rw-r--r--share/mk/bsd.own.mk2
-rw-r--r--tools/build/mk/OptionalObsoleteFiles.inc2
-rw-r--r--tools/build/options/WITHOUT_LIBKSE5
-rw-r--r--tools/build/options/WITHOUT_LIBPTHREAD9
-rw-r--r--usr.bin/Makefile2
-rw-r--r--usr.sbin/Makefile4
-rw-r--r--usr.sbin/ngctl/Makefile2
27 files changed, 64 insertions, 93 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 19a2526..66816ce 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 107c031..9ba4ddc 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 138f607..f517dfe 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 2ca99cb..0ec5310 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 f8b81fc..5caee34 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 890c3bc..0f45151 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 ed80d75..7c7f8f2 100644
--- a/lib/libkse/Makefile
+++ b/lib/libkse/Makefile
@@ -10,13 +10,13 @@
.include <bsd.own.mk>
-.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
index 1f2787c..e8888df 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 8e5b9e4..cc67470 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 802992c..47be080 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 369a88d..a54de72 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 de8a4e4..dd2f7bd 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 b0de3da..cd86f12 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 901fa50..03c9a72 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 2e9b2c4..b9245be 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 ed80d75..0000000
--- 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 <sys/cdefs.h>) 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 <bsd.own.mk>
-
-.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 <bsd.lib.mk>
diff --git a/sbin/ggate/Makefile b/sbin/ggate/Makefile
index 7ab5ccb..e889f2f 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 fcc94ef..5ff093f 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 68c9457..3a38aef 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 dfa5dfc..5c3a875 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 b3f431b..92f3b3b 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 87550da..a5e004b 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 0000000..28a3fd8
--- /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 28a3fd8..88320c0 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 90cab4c..ebc5d4c 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 066ffa0..c4bfd25 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 cf17d2e..1a9e50b 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
OpenPOWER on IntegriCloud