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)
This commit is contained in:
David E. O'Brien 2007-10-09 13:42:34 +00:00
parent 4306354df1
commit 65c045e964
27 changed files with 64 additions and 93 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -1,6 +1,4 @@
/*
* $FreeBSD$
*/
/* $FreeBSD$ */
/*
* Use the same naming scheme as libc.

View File

@ -1,3 +1,4 @@
# $FreeBSD$
Test begin
No overflow:
Overflow:

View File

@ -1 +1,2 @@
# $FreeBSD$
Hello world

View File

@ -1,2 +1,3 @@
# $FreeBSD$
Test begin
Test end

View File

@ -1,3 +1,4 @@
# $FreeBSD$
Testing pthread_mutex_init
--------------------------

View File

@ -1,3 +1,4 @@
# $FreeBSD$
Test begin
Got semaphore
Got semaphore

View File

@ -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

View File

@ -1,3 +1,4 @@
# $FreeBSD$
Sigwait caught signal 16
Sigwait caught signal 16
Sigwait caught signal 30

View File

@ -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>

View File

@ -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

View File

@ -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 \

View File

@ -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

View File

@ -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 \

View File

@ -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 \

View File

@ -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

View File

@ -0,0 +1,5 @@
.\" $FreeBSD$
Set to not build the
.Nm libpthread
(M:N threading)
library.

View File

@ -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)).

View File

@ -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

View File

@ -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

View File

@ -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