* [PATCH 1/3] sim: unify various library testing logic
@ 2021-06-18 14:27 Mike Frysinger
2021-06-18 14:27 ` [PATCH 2/3] sim: mips: drop unused AC_PATH_X call Mike Frysinger
2021-06-18 14:27 ` [PATCH 3/3] sim: unify bfd library dependency testing logic Mike Frysinger
0 siblings, 2 replies; 3+ messages in thread
From: Mike Frysinger @ 2021-06-18 14:27 UTC (permalink / raw)
To: gdb-patches
Move these options up to the common dir so we only test & export
them once across all ports.
---
sim/aarch64/configure | 143 +----------------------
sim/arch-subdir.mk.in | 1 +
sim/arm/configure | 143 +----------------------
sim/avr/configure | 143 +----------------------
sim/bfin/configure | 143 +----------------------
sim/bpf/configure | 143 +----------------------
sim/common/Make-common.in | 2 +-
sim/config.h.in | 9 ++
sim/configure | 181 +++++++++++++++++++++++++++++
sim/cr16/configure | 143 +----------------------
sim/cris/configure | 143 +----------------------
sim/d10v/configure | 143 +----------------------
sim/erc32/configure | 143 +----------------------
sim/example-synacor/configure | 143 +----------------------
sim/frv/configure | 143 +----------------------
sim/ft32/configure | 143 +----------------------
sim/h8300/configure | 143 +----------------------
sim/iq2000/configure | 143 +----------------------
sim/lm32/configure | 143 +----------------------
sim/m32c/configure | 143 +----------------------
sim/m32r/configure | 143 +----------------------
sim/m4/sim_ac_common.m4 | 4 -
sim/m4/sim_ac_option_hardware.m4 | 4 -
sim/m4/sim_ac_platform.m4 | 6 +
sim/m68hc11/configure | 143 +----------------------
sim/mcore/configure | 143 +----------------------
sim/microblaze/configure | 143 +----------------------
sim/mips/configure | 189 +------------------------------
sim/mips/configure.ac | 2 -
sim/mn10300/configure | 143 +----------------------
sim/moxie/configure | 143 +----------------------
sim/msp430/configure | 143 +----------------------
sim/or1k/configure | 143 +----------------------
sim/pru/configure | 143 +----------------------
sim/riscv/configure | 143 +----------------------
sim/rl78/configure | 143 +----------------------
sim/rx/configure | 143 +----------------------
sim/sh/configure | 143 +----------------------
sim/v850/configure | 143 +----------------------
39 files changed, 260 insertions(+), 4428 deletions(-)
diff --git a/sim/arch-subdir.mk.in b/sim/arch-subdir.mk.in
index 6f9d4ad3c370..bc51fcaf9778 100644
--- a/sim/arch-subdir.mk.in
+++ b/sim/arch-subdir.mk.in
@@ -17,5 +17,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+COMMON_LIBS = @LIBS@
WARN_CFLAGS = @WARN_CFLAGS@
WERROR_CFLAGS = @WERROR_CFLAGS@
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index 51e4ca7b5ac7..245da2a0438f 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -249,7 +249,7 @@ BFD_LIB = ../../bfd/libbfd.a
OPCODES_LIB = ../../opcodes/libopcodes.a
LIBINTL = @LIBINTL@
LIBINTL_DEP = @LIBINTL_DEP@
-CONFIG_LIBS = @LIBS@ $(ZLIB)
+CONFIG_LIBS = $(COMMON_LIBS) @LIBS@ $(ZLIB)
LIBDEPS = $(BFD_LIB) $(OPCODES_LIB) $(LIBINTL_DEP) $(LIBIBERTY_LIB)
EXTRA_LIBS = $(BFD_LIB) $(OPCODES_LIB) $(LIBINTL) $(LIBIBERTY_LIB) \
$(CONFIG_LIBS) $(SIM_EXTRA_LIBS) $(LIBDL) $(LIBGNU) $(LIBGNU_EXTRA_LIBS)
diff --git a/sim/m4/sim_ac_common.m4 b/sim/m4/sim_ac_common.m4
index 088e0977f4f3..f44e43695703 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 22fa993f6a36..477ab2669093 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 c505c74e7af4..d2e1d360b4f5 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)
])
diff --git a/sim/mips/configure.ac b/sim/mips/configure.ac
index 88f06ee13c91..d7c402063954 100644
--- a/sim/mips/configure.ac
+++ b/sim/mips/configure.ac
@@ -410,6 +410,4 @@ SIM_AC_OPTION_HARDWARE(tx3904cpu tx3904irc tx3904tmr tx3904sio)
AC_PATH_X
-AC_CHECK_LIB(m, fabs)
-
SIM_AC_OUTPUT
--
2.31.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/3] sim: mips: drop unused AC_PATH_X call
2021-06-18 14:27 [PATCH 1/3] sim: unify various library testing logic Mike Frysinger
@ 2021-06-18 14:27 ` Mike Frysinger
2021-06-18 14:27 ` [PATCH 3/3] sim: unify bfd library dependency testing logic Mike Frysinger
1 sibling, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2021-06-18 14:27 UTC (permalink / raw)
To: gdb-patches
We don't use anything from X, so no sense in probing the env.
---
sim/mips/configure | 210 +-----------------------------------------
sim/mips/configure.ac | 3 -
2 files changed, 3 insertions(+), 210 deletions(-)
diff --git a/sim/mips/configure.ac b/sim/mips/configure.ac
index d7c402063954..d8ce2803aee6 100644
--- a/sim/mips/configure.ac
+++ b/sim/mips/configure.ac
@@ -407,7 +407,4 @@ AC_SUBST(sim_multi_obj)
#
SIM_AC_OPTION_HARDWARE(tx3904cpu tx3904irc tx3904tmr tx3904sio)
-
-AC_PATH_X
-
SIM_AC_OUTPUT
--
2.31.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 3/3] sim: unify bfd library dependency testing logic
2021-06-18 14:27 [PATCH 1/3] sim: unify various library testing logic Mike Frysinger
2021-06-18 14:27 ` [PATCH 2/3] sim: mips: drop unused AC_PATH_X call Mike Frysinger
@ 2021-06-18 14:27 ` Mike Frysinger
1 sibling, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2021-06-18 14:27 UTC (permalink / raw)
To: gdb-patches
Move these options up to the common dir so we only test & export
them once across all ports.
---
sim/Makefile.in | 99 +-
sim/aarch64/aclocal.m4 | 7 -
sim/aarch64/configure | 8567 ++-----------------------------
sim/aclocal.m4 | 7 +
sim/arch-subdir.mk.in | 2 +
sim/arm/aclocal.m4 | 7 -
sim/arm/configure | 8567 ++-----------------------------
sim/avr/aclocal.m4 | 7 -
sim/avr/configure | 8567 ++-----------------------------
sim/bfin/aclocal.m4 | 7 -
sim/bfin/configure | 8611 ++-----------------------------
sim/bpf/aclocal.m4 | 7 -
sim/bpf/configure | 8567 ++-----------------------------
sim/common/Make-common.in | 3 +-
sim/config.h.in | 7 +
sim/configure | 8630 ++++++++++++++++++++++++++++++--
sim/cr16/aclocal.m4 | 7 -
sim/cr16/configure | 8567 ++-----------------------------
sim/cris/aclocal.m4 | 7 -
sim/cris/configure | 8567 ++-----------------------------
sim/d10v/aclocal.m4 | 7 -
sim/d10v/configure | 8567 ++-----------------------------
sim/erc32/aclocal.m4 | 7 -
sim/erc32/configure | 8611 ++-----------------------------
sim/example-synacor/aclocal.m4 | 7 -
sim/example-synacor/configure | 8567 ++-----------------------------
sim/frv/aclocal.m4 | 7 -
sim/frv/configure | 8567 ++-----------------------------
sim/ft32/aclocal.m4 | 7 -
sim/ft32/configure | 8567 ++-----------------------------
sim/h8300/aclocal.m4 | 7 -
sim/h8300/configure | 8567 ++-----------------------------
sim/iq2000/aclocal.m4 | 7 -
sim/iq2000/configure | 8567 ++-----------------------------
sim/lm32/aclocal.m4 | 7 -
sim/lm32/configure | 8567 ++-----------------------------
sim/m32c/aclocal.m4 | 7 -
sim/m32c/configure | 8567 ++-----------------------------
sim/m32r/aclocal.m4 | 7 -
sim/m32r/configure | 8567 ++-----------------------------
sim/m4/sim_ac_common.m4 | 10 -
sim/m4/sim_ac_platform.m4 | 10 +
sim/m68hc11/aclocal.m4 | 7 -
sim/m68hc11/configure | 8567 ++-----------------------------
sim/mcore/aclocal.m4 | 7 -
sim/mcore/configure | 8567 ++-----------------------------
sim/microblaze/aclocal.m4 | 7 -
sim/microblaze/configure | 8567 ++-----------------------------
sim/mips/aclocal.m4 | 7 -
sim/mips/configure | 8561 ++-----------------------------
sim/mn10300/aclocal.m4 | 7 -
sim/mn10300/configure | 8567 ++-----------------------------
sim/moxie/aclocal.m4 | 7 -
sim/moxie/configure | 8567 ++-----------------------------
sim/msp430/aclocal.m4 | 7 -
sim/msp430/configure | 8567 ++-----------------------------
sim/or1k/aclocal.m4 | 7 -
sim/or1k/configure | 8567 ++-----------------------------
sim/pru/aclocal.m4 | 7 -
sim/pru/configure | 8567 ++-----------------------------
sim/riscv/aclocal.m4 | 7 -
sim/riscv/configure | 8567 ++-----------------------------
sim/rl78/aclocal.m4 | 7 -
sim/rl78/configure | 8567 ++-----------------------------
sim/rx/aclocal.m4 | 7 -
sim/rx/configure | 8567 ++-----------------------------
sim/sh/aclocal.m4 | 7 -
sim/sh/configure | 8567 ++-----------------------------
sim/v850/aclocal.m4 | 7 -
sim/v850/configure | 8567 ++-----------------------------
70 files changed, 21967 insertions(+), 252677 deletions(-)
diff --git a/sim/arch-subdir.mk.in b/sim/arch-subdir.mk.in
index bc51fcaf9778..c6d0884cd19f 100644
--- a/sim/arch-subdir.mk.in
+++ b/sim/arch-subdir.mk.in
@@ -17,6 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+zlibdir = @zlibdir@
+@PLUGINS_TRUE@LIBDL = @lt_cv_dlopen_libs@
COMMON_LIBS = @LIBS@
WARN_CFLAGS = @WARN_CFLAGS@
WERROR_CFLAGS = @WERROR_CFLAGS@
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index 245da2a0438f..f817f99d748d 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -242,10 +242,9 @@ BUILD_CFLAGS = $(CFLAGS_FOR_BUILD) $(CSEARCH)
COMMON_DEP_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH) $(SIM_EXTRA_CFLAGS)
-ZLIB = @zlibdir@ -lz
+ZLIB = $(zlibdir) -lz
LIBIBERTY_LIB = ../../libiberty/libiberty.a
BFD_LIB = ../../bfd/libbfd.a
-@PLUGINS_TRUE@LIBDL = @lt_cv_dlopen_libs@
OPCODES_LIB = ../../opcodes/libopcodes.a
LIBINTL = @LIBINTL@
LIBINTL_DEP = @LIBINTL_DEP@
diff --git a/sim/m4/sim_ac_common.m4 b/sim/m4/sim_ac_common.m4
index f44e43695703..b04d1c69150f 100644
--- a/sim/m4/sim_ac_common.m4
+++ b/sim/m4/sim_ac_common.m4
@@ -32,16 +32,6 @@ dnl to see if there are intl libraries we should link against.
ALL_LINGUAS=
ZW_GNU_GETTEXT_SISTER_DIR(../../intl)
-# BFD conditionally uses zlib, so we must link it in if libbfd does, by
-# using the same condition.
-AM_ZLIB
-
-# BFD uses libdl when when plugins enabled.
-AC_PLUGINS
-AM_CONDITIONAL(PLUGINS, test "$plugins" = yes)
-LT_INIT([dlopen])
-AC_SUBST(lt_cv_dlopen_libs)
-
dnl We don't use automake, but we still want to support
dnl --enable-maintainer-mode.
AM_MAINTAINER_MODE
diff --git a/sim/m4/sim_ac_platform.m4 b/sim/m4/sim_ac_platform.m4
index d2e1d360b4f5..87ebe6a9c2e3 100644
--- a/sim/m4/sim_ac_platform.m4
+++ b/sim/m4/sim_ac_platform.m4
@@ -142,6 +142,16 @@ AC_TYPE_SIGNAL
AC_TYPE_SIZE_T
AC_TYPE_UID_T
+dnl BFD conditionally uses zlib, so we must link it in if libbfd does, by
+dnl using the same condition.
+AM_ZLIB
+
+dnl BFD uses libdl when when plugins enabled.
+AC_PLUGINS
+AM_CONDITIONAL(PLUGINS, test "$plugins" = yes)
+LT_INIT([dlopen])
+AC_SUBST(lt_cv_dlopen_libs)
+
dnl Libraries.
AC_CHECK_LIB(socket, bind)
AC_CHECK_LIB(nsl, gethostbyname)
--
2.31.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-18 14:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18 14:27 [PATCH 1/3] sim: unify various library testing logic Mike Frysinger
2021-06-18 14:27 ` [PATCH 2/3] sim: mips: drop unused AC_PATH_X call Mike Frysinger
2021-06-18 14:27 ` [PATCH 3/3] sim: unify bfd library dependency testing logic Mike Frysinger
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).