sim: rx: merge with common configure script

Move the unique configure flag to acinclude.m4 so the common code
can include it, then delete the rx configure logic entirely.
This commit is contained in:
Mike Frysinger 2021-06-20 01:04:34 -04:00
parent 36bb57e40c
commit e173c80fbb
9 changed files with 76 additions and 2947 deletions

View File

@ -1,3 +1,8 @@
2021-06-22 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Update rx SIM_TARGET call. Include rx/acinclude.m4.
* configure, Makefile.in: Regenerate.
2021-06-22 Mike Frysinger <vapier@gentoo.org>
* Makefile.am (SUBDIRS): Add $(SIM_SUBDIRS).

View File

@ -217,7 +217,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
$(top_srcdir)/m4/sim_ac_option_warnings.m4 \
$(top_srcdir)/m4/sim_ac_platform.m4 \
$(top_srcdir)/m4/sim_ac_toolchain.m4 \
$(top_srcdir)/configure.ac
$(top_srcdir)/rx/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
@ -231,8 +231,8 @@ CONFIG_CLEAN_FILES = Make-common.sim aarch64/Makefile.sim \
d10v/Makefile.sim ft32/Makefile.sim h8300/Makefile.sim \
m32c/Makefile.sim m68hc11/Makefile.sim mcore/Makefile.sim \
microblaze/Makefile.sim moxie/Makefile.sim msp430/Makefile.sim \
pru/Makefile.sim rl78/Makefile.sim sh/Makefile.sim \
example-synacor/Makefile.sim arch-subdir.mk
pru/Makefile.sim rl78/Makefile.sim rx/Makefile.sim \
sh/Makefile.sim example-synacor/Makefile.sim arch-subdir.mk
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
@ -714,6 +714,7 @@ SIM_COMMON_BUILD_FALSE = @SIM_COMMON_BUILD_FALSE@
SIM_COMMON_BUILD_TRUE = @SIM_COMMON_BUILD_TRUE@
SIM_INLINE = @SIM_INLINE@
SIM_PRIMARY_TARGET = @SIM_PRIMARY_TARGET@
SIM_RX_CYCLE_ACCURATE_FLAGS = @SIM_RX_CYCLE_ACCURATE_FLAGS@
SIM_SUBDIRS = @SIM_SUBDIRS@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
@ -966,6 +967,8 @@ pru/Makefile.sim: $(top_builddir)/config.status $(top_srcdir)/pru/Makefile.in
cd $(top_builddir) && $(SHELL) ./config.status $@
rl78/Makefile.sim: $(top_builddir)/config.status $(top_srcdir)/rl78/Makefile.in
cd $(top_builddir) && $(SHELL) ./config.status $@
rx/Makefile.sim: $(top_builddir)/config.status $(top_srcdir)/rx/Makefile.in
cd $(top_builddir) && $(SHELL) ./config.status $@
sh/Makefile.sim: $(top_builddir)/config.status $(top_srcdir)/sh/Makefile.in
cd $(top_builddir) && $(SHELL) ./config.status $@
example-synacor/Makefile.sim: $(top_builddir)/config.status $(top_srcdir)/example-synacor/Makefile.in

49
sim/configure vendored
View File

@ -638,6 +638,7 @@ enable_option_checking=no
ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
SIM_RX_CYCLE_ACCURATE_FLAGS
sim_reserved_bits
sim_default_model
sim_scache
@ -837,6 +838,7 @@ enable_sim_trace
enable_werror
enable_build_warnings
enable_sim_build_warnings
enable_sim_rx_cycle_accurate
'
ac_precious_vars='build_alias
host_alias
@ -858,7 +860,6 @@ mips
mn10300
or1k
riscv
rx
erc32
ppc
v850'
@ -1523,6 +1524,8 @@ Optional Features:
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
--disable-sim-rx-cycle-accurate
Disable cycle accurate simulation (faster runtime)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@ -12038,7 +12041,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 12041 "configure"
#line 12044 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -12144,7 +12147,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 12147 "configure"
#line 12150 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -13740,8 +13743,11 @@ subdirs="$subdirs bfin"
if test "${targ}" = "${target}"; then
SIM_PRIMARY_TARGET=rx
fi
subdirs="$subdirs rx"
ac_config_files="$ac_config_files rx/Makefile.sim:rx/Makefile.in"
ac_config_commands="$ac_config_commands rx/Makefile"
as_fn_append SIM_SUBDIRS " rx"
ac_config_commands="$ac_config_commands depdir-rx"
@ -14242,6 +14248,27 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sim rx should be cycle accurate" >&5
$as_echo_n "checking whether sim rx should be cycle accurate... " >&6; }
# Check whether --enable-sim-rx-cycle-accurate was given.
if test "${enable_sim_rx_cycle_accurate+set}" = set; then :
enableval=$enable_sim_rx_cycle_accurate; case "${enableval}" in
yes | no) ;;
*) as_fn_error $? "bad value ${enableval} given for --enable-sim-rx-cycle-accurate option" "$LINENO" 5 ;;
esac
fi
if test "x${enable_sim_rx_cycle_accurate}" != xno; then
SIM_RX_CYCLE_ACCURATE_FLAGS="-DCYCLE_ACCURATE"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
ac_config_files="$ac_config_files arch-subdir.mk Makefile"
cat >confcache <<\_ACEOF
@ -15339,6 +15366,8 @@ do
"rl78/Makefile.sim") CONFIG_FILES="$CONFIG_FILES rl78/Makefile.sim:rl78/Makefile.in" ;;
"rl78/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS rl78/Makefile" ;;
"depdir-rl78") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-rl78" ;;
"rx/Makefile.sim") CONFIG_FILES="$CONFIG_FILES rx/Makefile.sim:rx/Makefile.in" ;;
"rx/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS rx/Makefile" ;;
"depdir-rx") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-rx" ;;
"sh/Makefile.sim") CONFIG_FILES="$CONFIG_FILES sh/Makefile.sim:sh/Makefile.in" ;;
"sh/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS sh/Makefile" ;;
@ -16884,6 +16913,18 @@ $as_echo X"$file" |
rm -f rl78/Makesim1.tmp rl78/Makesim2.tmp
;;
"depdir-rl78":C) $SHELL $ac_aux_dir/mkinstalldirs rl78/$DEPDIR ;;
"rx/Makefile":C) sed -n \
-e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {
/^srcdir / { s:= := ../:; s:$:/rx:; }
p
}' \
<Make-common.sim >rx/Makesim1.tmp
sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >rx/Makesim2.tmp
sed -e '/^## COMMON_PRE_/ r rx/Makesim1.tmp' \
-e '/^## COMMON_POST_/ r rx/Makesim2.tmp' \
<rx/Makefile.sim >rx/Makefile
rm -f rx/Makesim1.tmp rx/Makesim2.tmp
;;
"depdir-rx":C) $SHELL $ac_aux_dir/mkinstalldirs rx/$DEPDIR ;;
"sh/Makefile":C) sed -n \
-e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {

View File

@ -137,7 +137,7 @@ if test "${enable_sim}" != no; then
SIM_TARGET([pru*-*-*], [pru])
SIM_TARGET([riscv*-*-*], [riscv], [true])
SIM_TARGET([rl78-*-*], [rl78])
SIM_TARGET([rx-*-*], [rx], [true])
SIM_TARGET([rx-*-*], [rx])
SIM_TARGET([sh*-*-*], [sh])
SIM_TARGET([sparc-*-rtems*|sparc-*-elf*], [erc32], [true])
SIM_TARGET([powerpc*-*-*], [ppc], [true])
@ -175,5 +175,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

View File

@ -1,3 +1,13 @@
2021-06-22 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_EXTRA_CFLAGS): Change to
@SIM_RX_CYCLE_ACCURATE_FLAGS@.
* configure.ac: Delete most content. Moved sim-rx-cycle-accurate
to ...
* acinclude.m4: ... here.
* aclocal.m4: Removed.
* configure: Removed.
2021-06-22 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.

View File

@ -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 \

View File

@ -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)

15
sim/rx/aclocal.m4 vendored
View File

@ -1,15 +0,0 @@
# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
# Copyright (C) 1996-2017 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_include([../m4/sim_ac_output.m4])

2909
sim/rx/configure vendored

File diff suppressed because it is too large Load Diff