From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 26B2F1F461 for ; Fri, 21 Jun 2019 09:22:42 +0000 (UTC) Received: from localhost ([::1]:56588 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1heFkk-0003Ck-UU for normalperson@yhbt.net; Fri, 21 Jun 2019 05:22:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43941) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1heFke-00036y-Jw for bug-gnulib@gnu.org; Fri, 21 Jun 2019 05:22:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1heFkb-0006yP-Ge for bug-gnulib@gnu.org; Fri, 21 Jun 2019 05:22:32 -0400 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::11]:26788) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1heFkZ-0006v9-P0 for bug-gnulib@gnu.org; Fri, 21 Jun 2019 05:22:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1561108944; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=OJIy5hT5LAkPe0jZdKq0GE87y2tK7KSx747baFW1M30=; b=Tt9V6FFyA6D2fCcOMRhj2/3Jq+SzQUJraHUbDtO5nfx36s5+8ko6MOVVaa5Gh6xAbZ ZqjntQefOLupBy0hkeVpXM2gn4zBIKYCsj4uN6hBSoZlOTBkyBiq8TzZGBo5wzre0fi8 a9XtadJwkuLY3PolIlrdl2zdVheJndA9IBHcMeAwuu3VqpdijVFBVqJx4jcxXMPAgz04 ONxMDsCL9lrtjsRG6/OUXOEoNv9QBPqXWFaypa9CCmwQkFw4y5EK/3D3Ppn/WROZF5XG qwj24YwTwRdC/qVdVHBn/CY32h8eqLqlcimTmxyq15OHKtPzBscqQeFSeQ08p4wOHq8Z dANQ== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOGaf0y5RW" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 44.24 DYNA|AUTH) with ESMTPSA id J01134v5L9MKIf9 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Fri, 21 Jun 2019 11:22:20 +0200 (CEST) From: Bruno Haible To: bug-gnulib@gnu.org Subject: Re: [PATCH] ISO C 11 threads implementation Date: Fri, 21 Jun 2019 11:22:19 +0200 Message-ID: <2390361.ka3A4sCGK2@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-145-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <4934999.OEDBPbr2Oh@omega> References: <2006820.U7yMURXysu@omega> <4934999.OEDBPbr2Oh@omega> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:238:20a:202:5300::11 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" A small simplification. 2019-06-20 Bruno Haible threads-h: Simplify link dependencies. * m4/threads.m4 (gl_THREADS_H): Bail out if Pth threading is requested. Don't set LTLIBSTDTHREAD. * modules/thrd (Link): Simplify accordingly. * modules/mtx (Link): Likewise. * modules/cnd (Link): Likewise. * modules/tss (Link): Likewise. * modules/threads (Link): Likewise. diff --git a/m4/threads.m4 b/m4/threads.m4 index 3a921c0..87e97f3 100644 --- a/m4/threads.m4 +++ b/m4/threads.m4 @@ -1,4 +1,4 @@ -# threads.m4 serial 2 +# threads.m4 serial 3 dnl Copyright (C) 2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -11,6 +11,12 @@ AC_DEFUN([gl_THREADS_H], AC_REQUIRE([gl_THREADLIB_BODY]) AC_REQUIRE([gl_YIELD]) + if test "$gl_use_threads" = pth; then + AC_MSG_ERROR([You cannot use --enable-threads=pth with the gnulib module 'threads-h'.]) + fi + dnl Now, since $gl_use_threads is not 'pth', $LTLIBMULTITHREAD and + dnl $LIBMULTITHREAD have the same value. Only system libraries are needed. + gl_CHECK_NEXT_HEADERS([threads.h]) if test $ac_cv_header_threads_h = yes; then HAVE_THREADS_H=1 @@ -47,7 +53,6 @@ AC_DEFUN([gl_THREADS_H], case "$host_os" in mingw*) LIBSTDTHREAD= - LTLIBSTDTHREAD= ;; *) if test $ac_cv_header_threads_h = yes; then @@ -58,26 +63,21 @@ AC_DEFUN([gl_THREADS_H], AC_CHECK_FUNCS([thrd_create]) if test $ac_cv_func_thrd_create = yes; then LIBSTDTHREAD= - LTLIBSTDTHREAD= else AC_CHECK_LIB([stdthreads], [thrd_create], [ LIBSTDTHREAD='-lstdthreads -lpthread' - LTLIBSTDTHREAD='-lstdthreads -lpthread' ], [ dnl Guess that thrd_create is in libpthread. LIBSTDTHREAD="$LIBMULTITHREAD" - LTLIBSTDTHREAD="$LTLIBMULTITHREAD" ]) fi else dnl Libraries needed by thrd.c, mtx.c, cnd.c, tss.c. LIBSTDTHREAD="$LIBMULTITHREAD $YIELD_LIB" - LTLIBSTDTHREAD="$LTLIBMULTITHREAD $YIELD_LIB" fi ;; esac AC_SUBST([LIBSTDTHREAD]) - AC_SUBST([LTLIBSTDTHREAD]) AH_VERBATIM([thread_local], [/* The _Thread_local keyword of C11. */ diff --git a/modules/cnd b/modules/cnd index 635a4224..6870479 100644 --- a/modules/cnd +++ b/modules/cnd @@ -22,7 +22,7 @@ Include: Link: -$(LTLIBSTDTHREAD) when linking with libtool, $(LIBSTDTHREAD) otherwise +$(LIBSTDTHREAD) License: LGPLv2+ diff --git a/modules/mtx b/modules/mtx index a1d2a8a..ade00b2 100644 --- a/modules/mtx +++ b/modules/mtx @@ -25,7 +25,7 @@ Include: Link: -$(LTLIBSTDTHREAD) when linking with libtool, $(LIBSTDTHREAD) otherwise +$(LIBSTDTHREAD) License: LGPLv2+ diff --git a/modules/thrd b/modules/thrd index 3fd6063..388e0ea 100644 --- a/modules/thrd +++ b/modules/thrd @@ -24,7 +24,7 @@ Include: Link: -$(LTLIBSTDTHREAD) when linking with libtool, $(LIBSTDTHREAD) otherwise +$(LIBSTDTHREAD) License: LGPLv2+ diff --git a/modules/threads b/modules/threads index 2693bd5..18391c1 100644 --- a/modules/threads +++ b/modules/threads @@ -18,7 +18,7 @@ Include: Link: -$(LTLIBSTDTHREAD) when linking with libtool, $(LIBSTDTHREAD) otherwise +$(LIBSTDTHREAD) License: LGPLv2+ diff --git a/modules/tss b/modules/tss index 4a28200..d751724 100644 --- a/modules/tss +++ b/modules/tss @@ -21,7 +21,7 @@ Include: Link: -$(LTLIBSTDTHREAD) when linking with libtool, $(LIBSTDTHREAD) otherwise +$(LIBSTDTHREAD) License: LGPLv2+