From patchwork Wed Apr 8 22:17:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Pan2 via Gcc-patches" X-Patchwork-Id: 1268365 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=xZCXHjqv; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48yJZ35XcNz9sPF for ; Thu, 9 Apr 2020 08:18:01 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2BFE73887016; Wed, 8 Apr 2020 22:17:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2BFE73887016 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1586384278; bh=XDMtfh2di5bj+VYjf3lldr/G5TW3xrH8+JiyZO5TegU=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=xZCXHjqvWCCsdZH1BVgCA20kC/HMZWTydwKszyTLUTLDE63fLOI2k8zwpzhNJNckS bWhB5uKTG5Y7kuTo5VQ8KLwADNmmf+0WkGaMCetnXbBNBfezN3GDF8VBviSul7Pv+/ q6hE13Xidi8Bch84s8MOzyJfswF54iHm/Lagu5AI= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by sourceware.org (Postfix) with ESMTPS id 15224385BF81 for ; Wed, 8 Apr 2020 22:17:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 15224385BF81 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 48yJYq44t7zQlGv; Thu, 9 Apr 2020 00:17:51 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter01.heinlein-hosting.de (spamfilter01.heinlein-hosting.de [80.241.56.115]) (amavisd-new, port 10030) with ESMTP id VRUHYKyAHK5Z; Thu, 9 Apr 2020 00:17:48 +0200 (CEST) To: gcc-patches@gcc.gnu.org Subject: [committed] libphobos: Remove --enable-thread-lib configure option. Date: Thu, 9 Apr 2020 00:17:44 +0200 Message-Id: <20200408221744.31014-1-ibuclaw@gdcproject.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: A706C1768 X-Rspamd-Score: 0.39 / 15.00 / 15.00 X-Spam-Status: No, score=-28.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Iain Buclaw via Gcc-patches From: "Li, Pan2 via Gcc-patches" Reply-To: Iain Buclaw Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Hi, This is another old option that doesn't make sense as a configurable. So the option has been removed, and the check for AC_SEARCH_LIBS moved into the main configure.ac file. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. --- libphobos/ChangeLog: * configure: Regenerate. * configure.ac: Use AC_SEARCH_LIBS for pthread_create. * m4/druntime/libraries.m4: Remove DRUNTIME_LIBRARIES_THREAD. --- libphobos/configure | 78 ++---------------------------- libphobos/configure.ac | 2 +- libphobos/m4/druntime/libraries.m4 | 26 ---------- 3 files changed, 4 insertions(+), 102 deletions(-) diff --git a/libphobos/configure b/libphobos/configure index 108518d86aa..f458ad3b086 100755 --- a/libphobos/configure +++ b/libphobos/configure @@ -835,7 +835,6 @@ enable_libtool_lock with_gcc_major_version_only enable_werror enable_druntime_gc -enable_thread_lib with_libatomic with_libbacktrace with_target_system_zlib @@ -1485,9 +1484,6 @@ Optional Features: --disable-libtool-lock avoid locking (might break parallel builds) --enable-werror turns on -Werror [default=no] --enable-druntime-gc enable D runtime garbage collector (default: yes) - --enable-thread-lib= - specify linker option for the system thread library - (default: autodetect) --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory @@ -11646,7 +11642,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11649 "configure" +#line 11645 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11752,7 +11748,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11755 "configure" +#line 11751 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14480,17 +14476,7 @@ if test "$ac_res" != no; then : fi - - enable_thread_lib=yes - # Check whether --enable-thread-lib was given. -if test "${enable_thread_lib+set}" = set; then : - enableval=$enable_thread_lib; -fi - - - if test "x$enable_thread_lib" = "xyes"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_create" >&5 + { $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 ${ac_cv_search_pthread_create+:} false; then : $as_echo_n "(cached) " >&6 @@ -14534,64 +14520,6 @@ ac_res=$ac_cv_search_pthread_create if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -fi - - -else - - if test "x$enable_thread_lib" = "xno"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread library" >&5 -$as_echo_n "checking for thread library... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 -$as_echo "disabled" >&6; } - -else - - as_ac_Lib=`$as_echo "ac_cv_lib_$enable_thread_lib''_pthread_create" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -l$enable_thread_lib" >&5 -$as_echo_n "checking for pthread_create in -l$enable_thread_lib... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-l$enable_thread_lib $LIBS" -cat > conftest.$ac_ext <<_ACEOF -module mod; - extern(C) int pthread_create(); - -extern(C) int main() { - pthread_create(); return 0; -} -_ACEOF -if ac_fn_d_try_link "$LINENO"; then : - eval "$as_ac_Lib=yes" -else - eval "$as_ac_Lib=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_LIB$enable_thread_lib" | $as_tr_cpp` 1 -_ACEOF - - LIBS="-l$enable_thread_lib $LIBS" - -else - - as_fn_error $? "Thread library not found" "$LINENO" 5 - -fi - - -fi - fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cosf" >&5 diff --git a/libphobos/configure.ac b/libphobos/configure.ac index 594d2001b06..e6148f07519 100644 --- a/libphobos/configure.ac +++ b/libphobos/configure.ac @@ -133,7 +133,7 @@ DRUNTIME_LIBRARIES_CLIB WITH_LOCAL_DRUNTIME([ AC_LANG_PUSH([D]) AC_SEARCH_LIBS([malloc], [c]) - DRUNTIME_LIBRARIES_THREAD + AC_SEARCH_LIBS([pthread_create], [pthread]) AC_SEARCH_LIBS([cosf], [m]) AC_SEARCH_LIBS([clock_gettime], [rt]) DRUNTIME_ENABLE_ATOMIC_BUILTINS diff --git a/libphobos/m4/druntime/libraries.m4 b/libphobos/m4/druntime/libraries.m4 index a7aab4dd88b..9e8e210df5a 100644 --- a/libphobos/m4/druntime/libraries.m4 +++ b/libphobos/m4/druntime/libraries.m4 @@ -3,32 +3,6 @@ # -# DRUNTIME_LIBRARIES_THREAD -# ------------------------- -# Allow specifying the thread library to link with or autodetect -# Add thread library to LIBS if necessary. -AC_DEFUN([DRUNTIME_LIBRARIES_THREAD], -[ - enable_thread_lib=yes - AC_ARG_ENABLE(thread-lib, - AC_HELP_STRING([--enable-thread-lib=], - [specify linker option for the system thread library (default: autodetect)])) - - AS_IF([test "x$enable_thread_lib" = "xyes"], [ - AC_SEARCH_LIBS([pthread_create], [pthread]) - ], [ - AS_IF([test "x$enable_thread_lib" = "xno"], [ - AC_MSG_CHECKING([for thread library]) - AC_MSG_RESULT([disabled]) - ], [ - AC_CHECK_LIB([$enable_thread_lib], [pthread_create], [], [ - AC_MSG_ERROR([Thread library not found]) - ]) - ]) - ]) -]) - - # DRUNTIME_LIBRARIES_DLOPEN # ----------------------- # Autodetect and add dl library to LIBS if necessary.