From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id md7kDatQzmoCoQIAWB0awg (envelope-from ) for ; Tue, 13 Oct 2026 11:39:23 -0400 Received: by simark.ca (Postfix, from userid 112) id 3370E1E051; Tue, 13 Oct 2026 11:39:23 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 63D5D1E04E for ; Tue, 13 Oct 2026 11:39:22 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 61E614BA79BB for ; Tue, 13 Oct 2026 15:39:21 +0000 (GMT) Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id A33DE4BA23EE for ; Tue, 13 Oct 2026 15:39:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A33DE4BA23EE Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A33DE4BA23EE Authentication-Results: sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1791905951; cv=none; b=Ls8Am83Q3bGO0lDBc/LOCPZ0MQL4uAuPCXbn2/i46H/+/n4LXvs704hcoNUf2KqFmo110hnVQ2nTQTpvKwTVyCYb8KXbyPHccU/cP7HR+iWk8I/+dA48TsxV1M0GFOBCWLlAFMGZKtn6tUCARw+Kv1jWjbKeNWAYSafVYTx60hE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1791905951; c=relaxed/simple; bh=goR17ebV1+CIjyYliHvQ1Cz1NOcn3Gt3YE3QAqjCEzc=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=lm9vL1iq2Er7gR6qDhdjR/kdkBNSWXQcVcPRvDy1AvY8UOgRFJXik2sjOm+bgYrKHHFQA5g6o/Fm/Lwg+XWpvwnZr4/Al+WO8ru16PzPdtKE8T19cGHfuLlPjKC2v1wVopJ+Km8TcUPB3Vp5WQe9R9m05aTiUDXf3S6kHVhfB9Y= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A33DE4BA23EE Received: by simark.ca (Postfix) id 2CAD01E06B; Tue, 13 Oct 2026 11:39:11 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 11/16] gdb: remove redundant dlopen library search Date: Tue, 13 Oct 2026 11:35:57 -0400 Message-ID: <20261013153657.1610298-12-simon.marchi@efficios.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261013153657.1610298-1-simon.marchi@efficios.com> References: <20261013153657.1610298-1-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org configure.ac searches for the library providing dlopen unconditionally, and then again when BFD supports ELF and plugins are enabled. The second search can't find anything new. Remove it. Regenerate configure. Change-Id: I48f415c93cd5d07716f144a07a52bbbe253d700a --- gdb/configure | 59 ------------------------------------------------ gdb/configure.ac | 4 ---- 2 files changed, 63 deletions(-) diff --git a/gdb/configure b/gdb/configure index 21168d43b68b..292065371510 100755 --- a/gdb/configure +++ b/gdb/configure @@ -31419,65 +31419,6 @@ if test "$gdb_cv_var_bfd_elf" = yes; then $as_echo "#define HAVE_ELF 1" >>confdefs.h - # -ldl is provided by bfd/Makefile.am (LIBDL) . - if test "$plugins" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 -$as_echo_n "checking for library containing dlopen... " >&6; } -if ${ac_cv_search_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -for ac_lib in '' dl; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_dlopen=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_dlopen+:} false; then : - break -fi -done -if ${ac_cv_search_dlopen+:} false; then : - -else - ac_cv_search_dlopen=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 -$as_echo "$ac_cv_search_dlopen" >&6; } -ac_res=$ac_cv_search_dlopen -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - fi bfd_supports_elf=yes all_binary_file_srcs="$all_binary_file_srcs \$(elf_SRCS)" fi diff --git a/gdb/configure.ac b/gdb/configure.ac index 890e2f2849de..192b1cbcbc31 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -2004,10 +2004,6 @@ if test "$gdb_cv_var_bfd_elf" = yes; then CONFIG_OBS="$CONFIG_OBS gcore-elf.o elf-none-tdep.o" AC_DEFINE(HAVE_ELF, 1, [Define if ELF support should be included.]) - # -ldl is provided by bfd/Makefile.am (LIBDL) . - if test "$plugins" = "yes"; then - AC_SEARCH_LIBS(dlopen, dl) - fi bfd_supports_elf=yes all_binary_file_srcs="$all_binary_file_srcs \$(elf_SRCS)" fi -- 2.56.0