From c036189d4fef934b4137cb2a3a683c6dcd6d8716 Mon Sep 17 00:00:00 2001 From: joerg Date: Tue, 30 Apr 2013 22:28:22 +0000 Subject: [PATCH] When looking for a thread library, check using pthread_create, not pthread_join. --- sysutils/coreutils/distinfo | 3 +- sysutils/coreutils/patches/patch-configure | 73 ++++++++++++++++++++++ 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 sysutils/coreutils/patches/patch-configure diff --git a/sysutils/coreutils/distinfo b/sysutils/coreutils/distinfo index ce58534f17dd..b10a0e94e66e 100644 --- a/sysutils/coreutils/distinfo +++ b/sysutils/coreutils/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.22 2012/03/06 23:38:04 joerg Exp $ +$NetBSD: distinfo,v 1.23 2013/04/30 22:28:22 joerg Exp $ SHA1 (coreutils-8.13.tar.gz) = 83b7e25661c439ecac55e99ff0dd816b9ff478a5 RMD160 (coreutils-8.13.tar.gz) = fb24a15641581ba57482f4c1c1ecfc32752dbd9d Size (coreutils-8.13.tar.gz) = 11660808 bytes +SHA1 (patch-configure) = bfe96fde14c73b2836f539cc2e9dad3a77b05c4b SHA1 (patch-lib-fflush.c) = e52e0da2127c5debbb14e967b1e206226efdaa4a SHA1 (patch-lib-fseeko.c) = ab62b8c7faa9a601191475c040c7466e1bd52fe1 diff --git a/sysutils/coreutils/patches/patch-configure b/sysutils/coreutils/patches/patch-configure new file mode 100644 index 000000000000..4ddb91035c04 --- /dev/null +++ b/sysutils/coreutils/patches/patch-configure @@ -0,0 +1,73 @@ +$NetBSD: patch-configure,v 1.1 2013/04/30 22:28:22 joerg Exp $ + +--- configure.orig 2013-04-30 19:22:56.000000000 +0000 ++++ configure +@@ -38704,30 +38704,30 @@ fi + + LIB_PTHREAD= + if test $ac_cv_header_pthread_h = yes; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_join" >&5 +-$as_echo_n "checking for library containing pthread_join... " >&6; } +-if ${gl_cv_search_pthread_join+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_create" >&5 ++$as_echo_n "checking for library containing pthread_create... " >&6; } ++if ${gl_cv_search_pthread_create+:} false; then : + $as_echo_n "(cached) " >&6 + else + gl_saved_libs="$LIBS" +- gl_cv_search_pthread_join= ++ gl_cv_search_pthread_create= + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + int + main () + { +-pthread_join (pthread_self (), (void **) 0); ++pthread_create (NULL, NULL, NULL, NULL); + ; + return 0; + } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- gl_cv_search_pthread_join="none required" ++ gl_cv_search_pthread_create="none required" + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +- if test -z "$gl_cv_search_pthread_join"; then ++ if test -z "$gl_cv_search_pthread_create"; then + LIBS="-lpthread $gl_saved_libs" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +@@ -38735,13 +38735,13 @@ rm -f core conftest.err conftest.$ac_obj + int + main () + { +-pthread_join (pthread_self (), (void **) 0); ++pthread_create (NULL, NULL, NULL, NULL); + ; + return 0; + } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- gl_cv_search_pthread_join="-lpthread" ++ gl_cv_search_pthread_create="-lpthread" + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +@@ -38749,10 +38749,10 @@ rm -f core conftest.err conftest.$ac_obj + LIBS="$gl_saved_libs" + + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_search_pthread_join" >&5 +-$as_echo "$gl_cv_search_pthread_join" >&6; } +- if test "$gl_cv_search_pthread_join" != "none required"; then +- LIB_PTHREAD="$gl_cv_search_pthread_join" ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_search_pthread_create" >&5 ++$as_echo "$gl_cv_search_pthread_create" >&6; } ++ if test "$gl_cv_search_pthread_create" != "none required"; then ++ LIB_PTHREAD="$gl_cv_search_pthread_create" + fi + fi +