[binutils-gdb] sim: rx: move cycle-accurate settings to CPPFLAGS

Michael Frysinger vapier@sourceware.org
Mon Jun 14 00:33:46 GMT 2021


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0f318b8478699c4babdcb6cf1a5a2a06c1155086

commit 0f318b8478699c4babdcb6cf1a5a2a06c1155086
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sun Jun 13 01:32:33 2021 -0400

    sim: rx: move cycle-accurate settings to CPPFLAGS
    
    This is the last unique setting that rx has in its config.h, so by
    moving this to CPPFLAGS, we can drop its config.h entirely.

Diff:
---
 sim/rx/ChangeLog    |  7 +++++++
 sim/rx/Makefile.in  |  2 +-
 sim/rx/config.in    |  3 ---
 sim/rx/configure    | 10 +++++-----
 sim/rx/configure.ac |  3 ++-
 5 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog
index a368dc4bf6c..35a9791a112 100644
--- a/sim/rx/ChangeLog
+++ b/sim/rx/ChangeLog
@@ -1,3 +1,10 @@
+2021-06-13  Mike Frysinger  <vapier@gentoo.org>
+
+	* Makefile.in (SIM_EXTRA_CFLAGS): Set to @sim_cycle_accurate_flags@.
+	* configure.ac: Move CYCLE_ACCURATE define from AC_DEFINE to
+	AC_SUBST.
+	* config.in, configure: Regenerate.
+
 2021-06-12  Mike Frysinger  <vapier@gentoo.org>
 
 	* README.txt: Change cycle-stats to sim-profile.
diff --git a/sim/rx/Makefile.in b/sim/rx/Makefile.in
index 4008aac2619..799febd61b5 100644
--- a/sim/rx/Makefile.in
+++ b/sim/rx/Makefile.in
@@ -20,7 +20,7 @@
 
 ## COMMON_PRE_CONFIG_FRAG
 
-SIM_EXTRA_CFLAGS = -Wall
+SIM_EXTRA_CFLAGS = @sim_cycle_accurate_flags@
 
 SIM_RUN_OBJS = \
 	main.o \
diff --git a/sim/rx/config.in b/sim/rx/config.in
index fd650fd41c0..c3a5c27da56 100644
--- a/sim/rx/config.in
+++ b/sim/rx/config.in
@@ -3,9 +3,6 @@
 /* Define if building universal (internal helper macro) */
 #undef AC_APPLE_UNIVERSAL_BUILD
 
-/* --enable-cycle-accurate */
-#undef CYCLE_ACCURATE
-
 /* Define to 1 if translation of program messages to the user's native
    language is requested. */
 #undef ENABLE_NLS
diff --git a/sim/rx/configure b/sim/rx/configure
index 6700fb0595e..151def506a7 100755
--- a/sim/rx/configure
+++ b/sim/rx/configure
@@ -639,6 +639,7 @@ sim_endian
 sim_bitsize
 sim_alignment
 cgen_breaks
+sim_cycle_accurate_flags
 MAINT
 MAINTAINER_MODE_FALSE
 MAINTAINER_MODE_TRUE
@@ -10744,7 +10745,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10747 "configure"
+#line 10748 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10850,7 +10851,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10853 "configure"
+#line 10854 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11159,12 +11160,11 @@ fi
 echo enable_cycle_accurate is $enable_cycle_accurate
 
 if test "x${enable_cycle_accurate}" != xno; then
-
-$as_echo "#define CYCLE_ACCURATE 1" >>confdefs.h
-
+  sim_cycle_accurate_flags="-DCYCLE_ACCURATE"
 fi
 
 
+
 # Check whether --enable-werror was given.
 if test "${enable_werror+set}" = set; then :
   enableval=$enable_werror; case "${enableval}" in
diff --git a/sim/rx/configure.ac b/sim/rx/configure.ac
index b2725fea797..b4881f8488c 100644
--- a/sim/rx/configure.ac
+++ b/sim/rx/configure.ac
@@ -34,7 +34,8 @@ esac])
 echo enable_cycle_accurate is $enable_cycle_accurate
 
 if test "x${enable_cycle_accurate}" != xno; then
-  AC_DEFINE([CYCLE_ACCURATE], 1, [--enable-cycle-accurate])
+  sim_cycle_accurate_flags="-DCYCLE_ACCURATE"
 fi
+AC_SUBST(sim_cycle_accurate_flags)
 
 SIM_AC_OUTPUT


More information about the Gdb-cvs mailing list