diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-06-28 22:39:16 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-06-30 13:33:18 -0400 |
commit | b79efe264f9d2d4fc5b0491acd3258063b309723 (patch) | |
tree | 75808110808964a8813af7df9a5e8cf03b547dc7 /sim/m4 | |
parent | e7954ef5e5ed90fb7d28c013518f4c2e6bcd20a1 (diff) | |
download | gdb-b79efe264f9d2d4fc5b0491acd3258063b309723.zip gdb-b79efe264f9d2d4fc5b0491acd3258063b309723.tar.gz gdb-b79efe264f9d2d4fc5b0491acd3258063b309723.tar.bz2 |
sim: unify scache settings
The cgen scache module is enabled by every cgen port, and with the
same default value of 16k (which matches the common default value).
Let's pull this option out of the individual ports (via CPPFLAGS)
and into the common code (via config.h).
The object itself is compiled only for cgen ports atm, so that part
doesn't change. The scache code is initialized dynamically via the
modules.c logic. That's why the profile code needs an additional
CGEN_ARCH check.
This will allow us to collapse arch configure files more. Merging
the source files will require more future work, but integrating the
cgen & non-cgen worlds itself will take a lot.
Diffstat (limited to 'sim/m4')
-rw-r--r-- | sim/m4/sim_ac_option_scache.m4 | 24 | ||||
-rw-r--r-- | sim/m4/sim_ac_output.m4 | 1 |
2 files changed, 10 insertions, 15 deletions
diff --git a/sim/m4/sim_ac_option_scache.m4 b/sim/m4/sim_ac_option_scache.m4 index 20e3615..7ae883f 100644 --- a/sim/m4/sim_ac_option_scache.m4 +++ b/sim/m4/sim_ac_option_scache.m4 @@ -12,23 +12,19 @@ dnl GNU General Public License for more details. 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 -dnl The argument is the default cache size if none is specified. AC_DEFUN([SIM_AC_OPTION_SCACHE], -[ -default_sim_scache="ifelse([$1],,0,[$1])" +[dnl +AC_MSG_CHECKING([for sim cache size]) +sim_scache="16384" AC_ARG_ENABLE(sim-scache, [AS_HELP_STRING([--enable-sim-scache=size], [Specify simulator execution cache size])], [case "${enableval}" in - yes) sim_scache="-DWITH_SCACHE=${default_sim_scache}";; - no) sim_scache="-DWITH_SCACHE=0" ;; - [[0-9]]*) sim_scache="-DWITH_SCACHE=${enableval}";; - *) AC_MSG_ERROR("Bad value $enableval passed to --enable-sim-scache"); - sim_scache="";; -esac -if test x"$silent" != x"yes" && test x"$sim_scache" != x""; then - echo "Setting scache size = $sim_scache" 6>&1 -fi],[sim_scache="-DWITH_SCACHE=${default_sim_scache}"]) + yes) ;; + no) sim_scache="0";; + [[0-9]]*) sim_scache="${enableval}";; + *) AC_MSG_ERROR("Bad value $enableval passed to --enable-sim-scache");; +esac]) +AC_DEFINE_UNQUOTED([WITH_SCACHE], [$sim_scache], [Sim cache szie]) +AC_MSG_RESULT($sim_scache) ]) -AC_SUBST(sim_scache) diff --git a/sim/m4/sim_ac_output.m4 b/sim/m4/sim_ac_output.m4 index 100e2f9..3866213 100644 --- a/sim/m4/sim_ac_output.m4 +++ b/sim/m4/sim_ac_output.m4 @@ -47,7 +47,6 @@ dnl but always used by common/Make-common.in. So we have to subst here even dnl when the rest of the code is in the respective macros. AC_SUBST(sim_bitsize) AC_SUBST(sim_float) -AC_SUBST(sim_scache) AC_SUBST(sim_reserved_bits) dnl Used by common/Make-common.in to see which configure script created it. |