[PATCH 4/5] sim: rx: merge with common configure script
Mike Frysinger
vapier@gentoo.org
Sun Jun 20 05:55:18 GMT 2021
Move the unique configure flag to acinclude.m4 so the common code
can include it, then delete the rx configure logic entirely.
---
sim/Makefile.in | 9 +-
sim/configure | 49 +-
sim/configure.ac | 5 +-
sim/rx/Makefile.in | 2 +-
sim/rx/{configure.ac => acinclude.m4} | 19 +-
sim/rx/aclocal.m4 | 15 -
sim/rx/configure | 2909 -------------------------
7 files changed, 61 insertions(+), 2947 deletions(-)
rename sim/rx/{configure.ac => acinclude.m4} (74%)
delete mode 100644 sim/rx/aclocal.m4
delete mode 100755 sim/rx/configure
diff --git a/sim/configure.ac b/sim/configure.ac
index 5e5273570a5f..8c29a3433e67 100644
--- a/sim/configure.ac
+++ b/sim/configure.ac
@@ -129,7 +129,7 @@ if test "${enable_sim}" != no; then
SIM_TARGET([pru*-*-*], [pru], [true])
SIM_TARGET([riscv*-*-*], [riscv], [false])
SIM_TARGET([rl78-*-*], [rl78], [true])
- SIM_TARGET([rx-*-*], [rx], [false])
+ SIM_TARGET([rx-*-*], [rx], [true])
SIM_TARGET([sh*-*-*], [sh], [true])
SIM_TARGET([sparc-*-rtems*|sparc-*-elf*], [erc32], [false])
SIM_TARGET([powerpc*-*-*], [ppc], [false])
@@ -167,5 +167,8 @@ AC_SUBST(sim_scache)
AC_SUBST(sim_default_model)
AC_SUBST(sim_reserved_bits)
+dnl Some arches have unique configure flags.
+m4_include([rx/acinclude.m4])
+
AC_CONFIG_FILES([arch-subdir.mk Makefile])
AC_OUTPUT
diff --git a/sim/rx/Makefile.in b/sim/rx/Makefile.in
index b1023dd2b9cf..5426cc0dd5d7 100644
--- a/sim/rx/Makefile.in
+++ b/sim/rx/Makefile.in
@@ -20,7 +20,7 @@
## COMMON_PRE_CONFIG_FRAG
-SIM_EXTRA_CFLAGS = @sim_rx_cycle_accurate_flags@
+SIM_EXTRA_CFLAGS = @SIM_RX_CYCLE_ACCURATE_FLAGS@
SIM_RUN_OBJS = \
main.o \
diff --git a/sim/rx/configure.ac b/sim/rx/acinclude.m4
similarity index 74%
rename from sim/rx/configure.ac
rename to sim/rx/acinclude.m4
index 2f012f981487..b0df3a71dc9e 100644
--- a/sim/rx/configure.ac
+++ b/sim/rx/acinclude.m4
@@ -1,10 +1,5 @@
-dnl Process this file with autoconf to produce a configure script.
-
-dnl Copyright (C) 2005-2021 Free Software Foundation, Inc.
-dnl Contributed by Red Hat, Inc.
-dnl
-dnl This file is part of the GNU simulators.
-dnl
+dnl Copyright (C) 1997-2021 Free Software Foundation, Inc.
+dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 3 of the License, or
@@ -18,9 +13,7 @@ dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
dnl
-AC_INIT(Makefile.in)
-AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
-
+dnl NB: This file is included in sim/configure, so keep settings namespaced.
AC_MSG_CHECKING([whether sim rx should be cycle accurate])
AC_ARG_ENABLE(sim-rx-cycle-accurate,
[AS_HELP_STRING([--disable-sim-rx-cycle-accurate],
@@ -30,11 +23,9 @@ yes | no) ;;
*) AC_MSG_ERROR(bad value ${enableval} given for --enable-sim-rx-cycle-accurate option) ;;
esac])
if test "x${enable_sim_rx_cycle_accurate}" != xno; then
- sim_rx_cycle_accurate_flags="-DCYCLE_ACCURATE"
+ SIM_RX_CYCLE_ACCURATE_FLAGS="-DCYCLE_ACCURATE"
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
-AC_SUBST(sim_rx_cycle_accurate_flags)
-
-SIM_AC_OUTPUT
+AC_SUBST(SIM_RX_CYCLE_ACCURATE_FLAGS)
--
2.31.1
More information about the Gdb-patches
mailing list