aboutsummaryrefslogtreecommitdiff
path: root/sim/m4
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-06-18 01:58:00 -0400
committerMike Frysinger <vapier@gentoo.org>2021-06-19 01:01:21 -0400
commit07490bf81d2fc91676eb71b77e07f80f20fc1b54 (patch)
treeb73118abe465a0b848c4e0683e214c535c74fc88 /sim/m4
parent47399e9c455b0a634e4c3597c8d9a292cc4b1b0c (diff)
downloadgdb-07490bf81d2fc91676eb71b77e07f80f20fc1b54.zip
gdb-07490bf81d2fc91676eb71b77e07f80f20fc1b54.tar.gz
gdb-07490bf81d2fc91676eb71b77e07f80f20fc1b54.tar.bz2
sim: unify various library testing logic
Move these options up to the common dir so we only test & export them once across all ports.
Diffstat (limited to 'sim/m4')
-rw-r--r--sim/m4/sim_ac_common.m44
-rw-r--r--sim/m4/sim_ac_option_hardware.m44
-rw-r--r--sim/m4/sim_ac_platform.m46
3 files changed, 6 insertions, 8 deletions
diff --git a/sim/m4/sim_ac_common.m4 b/sim/m4/sim_ac_common.m4
index 088e097..f44e436 100644
--- a/sim/m4/sim_ac_common.m4
+++ b/sim/m4/sim_ac_common.m4
@@ -32,10 +32,6 @@ dnl to see if there are intl libraries we should link against.
ALL_LINGUAS=
ZW_GNU_GETTEXT_SISTER_DIR(../../intl)
-# Check for socket libraries
-AC_CHECK_LIB(socket, bind)
-AC_CHECK_LIB(nsl, gethostbyname)
-
# BFD conditionally uses zlib, so we must link it in if libbfd does, by
# using the same condition.
AM_ZLIB
diff --git a/sim/m4/sim_ac_option_hardware.m4 b/sim/m4/sim_ac_option_hardware.m4
index 22fa993..477ab26 100644
--- a/sim/m4/sim_ac_option_hardware.m4
+++ b/sim/m4/sim_ac_option_hardware.m4
@@ -61,10 +61,6 @@ else
if test x"$silent" != x"yes"; then
echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
fi
- dnl Some devices require extra libraries.
- case " $hardware " in
- *" cfi "*) AC_CHECK_LIB(m, log2);;
- esac
fi
])
AC_SUBST(sim_hw_cflags)
diff --git a/sim/m4/sim_ac_platform.m4 b/sim/m4/sim_ac_platform.m4
index c505c74..d2e1d36 100644
--- a/sim/m4/sim_ac_platform.m4
+++ b/sim/m4/sim_ac_platform.m4
@@ -141,4 +141,10 @@ AC_TYPE_PID_T
AC_TYPE_SIGNAL
AC_TYPE_SIZE_T
AC_TYPE_UID_T
+
+dnl Libraries.
+AC_CHECK_LIB(socket, bind)
+AC_CHECK_LIB(nsl, gethostbyname)
+AC_CHECK_LIB(m, fabs)
+AC_CHECK_LIB(m, log2)
])