| Home | Sort by: relevance | last modified time | path |
| /src/tests/lib/libpthread/weak/ | |
| Makefile | 1.2.2.2 Thu Nov 20 18:46:41 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| Makefile.inc | 1.1.2.2 Thu Nov 20 18:46:41 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| t_pthread_weak_nothread.c | 1.1.2.2 Thu Nov 20 18:46:41 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| t_pthread_weak_threaded.c | 1.1.2.2 Thu Nov 20 18:46:41 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| /src/tests/lib/libpthread/weak/lib/ | |
| Makefile | 1.1.2.2 Thu Nov 20 18:46:47 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| h_pthread_weak.c | 1.1.2.2 Thu Nov 20 18:46:47 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| h_pthread_weak.h | 1.1.2.2 Thu Nov 20 18:46:47 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| /src/tests/usr.bin/cc/ | |
| t_pthread_abuse.sh | 1.1.2.2 Thu Nov 20 18:46:43 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| Makefile | 1.9.2.1 Thu Nov 20 18:46:43 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| /src/crypto/external/apache2/openssl/bin/ | |
| Makefile | 1.1.2.1 Thu Nov 20 18:46:47 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| /src/crypto/external/apache2/openssl/lib/libcrypto/ | |
| Makefile | 1.1.2.2 Thu Nov 20 18:46:44 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| thread.inc | 1.1.2.1 Thu Nov 20 18:46:44 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| /src/crypto/external/apache2/openssl/lib/libssl/ | |
| thread.inc | 1.1.2.1 Thu Nov 20 18:46:43 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| /src/crypto/external/bsd/netpgp/bin/ | |
| Makefile.inc | 1.1.2.1 Thu Nov 20 18:46:45 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| /src/lib/libpthread/ | |
| pthread_mi.expsym | 1.2.2.1 Thu Nov 20 18:46:42 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| pthread_attr.c | 1.21.6.1 Thu Nov 20 18:46:42 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| shlib_version | 1.20.2.1 Thu Nov 20 18:46:42 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| pthread.h | 1.41.18.1 Thu Nov 20 18:46:42 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| /src/tests/lib/libc/hash/ | |
| Makefile | 1.5.2.1 Thu Nov 20 18:46:45 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| /src/usr.bin/moduli/ | |
| Makefile.inc | 1.3.2.1 Thu Nov 20 18:46:42 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| /src/usr.bin/nbsvtool/ | |
| Makefile | 1.4.2.1 Thu Nov 20 18:46:42 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| /src/external/bsd/libfido2/bin/ | |
| Makefile.inc | 1.4.2.1 Thu Nov 20 18:46:46 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| /src/usr.bin/dc/ | |
| Makefile | 1.5.2.1 Thu Nov 20 18:46:43 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| /src/lib/libc/thread-stub/ | |
| thread-stub.c | 1.33.2.1 Thu Nov 20 18:46:47 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |
| /src/lib/libc/include/ | |
| reentrant.h | 1.23.2.1 Thu Nov 20 18:46:46 UTC 2025 martin Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread |