PTHREAD_CFLAGS/PTHREAD_LIBS clean test (Re: libpthread vs
libthr.)
Norikatsu Shigemura
nork at FreeBSD.org
Sun Nov 26 02:55:53 PST 2006
On Sun, 26 Nov 2006 11:53:11 +0900
Norikatsu Shigemura <nork at FreeBSD.org> wrote:
> In the case you said (echo WITHOUT_LIBPTHREAD=yes >> /etc/src.conf),
> we cannot get libkse.*. Because lib/libpthread is omitted in
> lib/Makefile:-(.
Oops, it is right that we cannot get libkse.*. ru is right.
I'm sorry.
Because, however, I cannot test PTHREAD_CFLAGS/PTHREAD_LIBS clean.
So I modifed like following patches.
--- usr.bin/Makefile.orig Tue Aug 22 12:22:17 2006
+++ usr.bin/Makefile Sun Nov 26 12:12:09 2006
@@ -266,7 +266,7 @@
.if ${MK_LIBTHR} != "no"
_csup= csup
.endif
-.elif ${MK_LIBPTHREAD} != "no"
+.elif ${MK_LIBPTHREAD} != "no" || ${MK_LIBTHR} != "no"
_csup= csup
.endif
.endif
--- usr.bin/csup/Makefile.orig Tue Mar 14 12:53:50 2006
+++ usr.bin/csup/Makefile Sun Nov 26 12:17:33 2006
@@ -30,7 +30,7 @@
CFLAGS+= -DHAVE_FFLAGS -DNDEBUG
WARNS?= 6
-DPADD= ${LIBCRYPTO} ${LIBZ} ${LIBPTHREAD}
-LDADD= -lcrypto -lz -lpthread
+DPADD= ${LIBCRYPTO} ${LIBZ} ${LIBTHR}
+LDADD= -lcrypto -lz -lthr
.include <bsd.prog.mk>
--- usr.sbin/Makefile.orig Wed Nov 15 23:57:05 2006
+++ usr.sbin/Makefile Sun Nov 26 12:11:18 2006
@@ -305,7 +305,7 @@
_mptable= mptable
_ndiscvt= ndiscvt
_pnpinfo= pnpinfo
-.if ${MK_LIBPTHREAD} != "no"
+.if ${MK_LIBPTHREAD} != "no" || ${MK_LIBTHR} != "no"
_pppctl= pppctl
.endif
_sicontrol= sicontrol
--- usr.sbin/cached/Makefile.orig Fri Apr 28 21:03:37 2006
+++ usr.sbin/cached/Makefile Sun Nov 26 12:19:43 2006
@@ -9,8 +9,8 @@
config.c query.c mp_ws_query.c mp_rs_query.c singletons.c protocol.c \
parser.c
CFLAGS+= -DCONFIG_PATH="\"${PREFIX}/etc/cached.conf\""
-DPADD+=${LIBM} ${LIBPTHREAD} ${LIBUTIL}
-LDADD+=${LIBM} ${LIBPTHREAD} ${LIBUTIL}
+DPADD+=${LIBM} ${LIBTHR} ${LIBUTIL}
+LDADD+=${LIBM} ${LIBTHR} ${LIBUTIL}
LDFLAGS+= -Xlinker --export-dynamic
.PATH: ${.CURDIR}/agents
--- usr.sbin/ngctl/Makefile.orig Mon Aug 7 23:17:05 2006
+++ usr.sbin/ngctl/Makefile Sun Nov 26 12:27:36 2006
@@ -16,8 +16,8 @@
.if !defined(NGCTL_NO_LIBEDIT)
CFLAGS+= -DEDITLINE
-DPADD+= ${LIBPTHREAD} ${LIBEDIT} ${LIBTERMCAP}
-LDADD+= -pthread -ledit -ltermcap
+DPADD+= ${LIBTHR} ${LIBEDIT} ${LIBTERMCAP}
+LDADD+= -lthr -ledit -ltermcap
.endif
.include <bsd.prog.mk>
--- usr.sbin/pppctl/Makefile.orig Sun Feb 1 02:28:09 2004
+++ usr.sbin/pppctl/Makefile Sun Nov 26 12:22:34 2006
@@ -3,7 +3,7 @@
PROG= pppctl
MAN= pppctl.8
-DPADD= ${LIBPTHREAD} ${LIBEDIT} ${LIBTERMCAP}
-LDADD= -lpthread -ledit -ltermcap
+DPADD= ${LIBTHR} ${LIBEDIT} ${LIBTERMCAP}
+LDADD= -lthr -ledit -ltermcap
.include <bsd.prog.mk>
--- share/mk/bsd.libnames.mk.orig Sat Sep 30 20:32:46 2006
+++ share/mk/bsd.libnames.mk Sun Nov 26 15:55:35 2006
@@ -119,6 +119,7 @@
LIBPCAP?= ${DESTDIR}${LIBDIR}/libpcap.a
LIBPMC?= ${DESTDIR}${LIBDIR}/libpmc.a
LIBPTHREAD?= ${DESTDIR}${LIBDIR}/libpthread.a
+LIBTHR?= ${DESTDIR}${LIBDIR}/libthr.a
LIBRADIUS?= ${DESTDIR}${LIBDIR}/libradius.a
LIBREADLINE?= ${DESTDIR}${LIBDIR}/libreadline.a
LIBROKEN?= ${DESTDIR}${LIBDIR}/libroken.a
--- lib/libpthread/Makefile.orig Sun Nov 26 00:59:59 2006
+++ lib/libpthread/Makefile Sun Nov 26 00:59:23 2006
@@ -7,7 +7,7 @@
# 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.
-.if ${MACHINE_ARCH} == "sparc64"
+.if ${MACHINE_ARCH} == "sparc64" || ${MK_LIBPTHREAD} == "no"
LIB=kse
.else
LIB=pthread
--- lib/Makefile.orig Sun Nov 26 19:48:02 2006
+++ lib/Makefile Sun Nov 26 19:47:06 2006
@@ -98,13 +98,13 @@
_libsmb= libsmb
.endif
-.if ${MK_LIBPTHREAD} != "no"
+#.if ${MK_LIBPTHREAD} != "no"
_libpthread= libpthread
-.endif
+#.endif
-.if ${MK_LIBTHR} != "no"
+#.if ${MK_LIBTHR} != "no"
_libthr= libthr
-.endif
+#.endif
.if ${MACHINE_ARCH} != "arm"
_libthread_db= libthread_db
More information about the freebsd-current
mailing list