public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 4/5] sim: build: change AC_CHECK_LIB to AC_SEARCH_LIBS
Date: Thu,  3 Nov 2022 17:04:02 +0700	[thread overview]
Message-ID: <20221103100403.26278-4-vapier@gentoo.org> (raw)
In-Reply-To: <20221103100403.26278-1-vapier@gentoo.org>

With more C libraries moving functions entirely into the main -lc,
change the AC_CHECK_LIB calls to AC_SEARCH_LIBS so we look in there
first and avoid extra linkage when possible.
---
 sim/config.h.in           |  12 --
 sim/configure             | 235 +++++++++++++++++++++++---------------
 sim/m4/sim_ac_platform.m4 |  10 +-
 3 files changed, 150 insertions(+), 107 deletions(-)

diff --git a/sim/m4/sim_ac_platform.m4 b/sim/m4/sim_ac_platform.m4
index 92fb00a3d795..74ac7fe14d45 100644
--- a/sim/m4/sim_ac_platform.m4
+++ b/sim/m4/sim_ac_platform.m4
@@ -145,12 +145,12 @@ AC_TYPE_UID_T
 LT_INIT
 
 dnl Libraries.
-AC_CHECK_LIB(socket, bind)
-AC_CHECK_LIB(nsl, gethostbyname)
-AC_CHECK_LIB(m, fabs)
-AC_CHECK_LIB(m, log2)
+AC_SEARCH_LIBS([bind], [socket])
+AC_SEARCH_LIBS([gethostbyname], [nsl])
+AC_SEARCH_LIBS([fabs], [m])
+AC_SEARCH_LIBS([log2], [m])
 
-AC_CHECK_LIB(dl, dlopen)
+AC_SEARCH_LIBS([dlopen], [dl])
 if test "${ac_cv_lib_dl_dlopen}" = "yes"; then
   PKG_CHECK_MODULES(SDL, sdl2, [dnl
     SDL_CFLAGS="${SDL_CFLAGS} -DHAVE_SDL=2"
-- 
2.38.1


  parent reply	other threads:[~2022-11-03 11:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-03 10:03 [PATCH 1/5] sim: build: switch to libtool for linking Mike Frysinger
2022-11-03 10:04 ` [PATCH 2/5] sim: build: switch to bfd & opcodes libtool linker scripts Mike Frysinger
2022-11-03 10:04 ` [PATCH 3/5] sim: build: drop duplicate $(LIBS) usage Mike Frysinger
2022-11-03 10:04 ` Mike Frysinger [this message]
2022-11-03 10:04 ` [PATCH 5/5] sim: drop -lm from SIM_EXTRA_LIBS Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221103100403.26278-4-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).