aboutsummaryrefslogtreecommitdiff
path: root/sim/frv
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-01-09 04:09:35 -0500
committerMike Frysinger <vapier@gentoo.org>2016-01-10 18:54:41 -0500
commitce39bd389039d99458950b072550ab52f0a07a34 (patch)
tree2bd4218fe7cc847322b73d613065a6825e49bcda /sim/frv
parente19418e02e25ae4c62eb95547220897fa6aaf2e0 (diff)
downloadgdb-ce39bd389039d99458950b072550ab52f0a07a34.zip
gdb-ce39bd389039d99458950b072550ab52f0a07a34.tar.gz
gdb-ce39bd389039d99458950b072550ab52f0a07a34.tar.bz2
sim: move many common settings from CPPFLAGS to config.h
Rather than stuffing the command line with a bunch of -D flags, start moving things to config.h which is managed by autoheader. This makes the makefile a bit simpler and the build output tighter, and it makes the migration to automake easier as there are fewer vars to juggle. We'll want to move the other options out too, but it'll take more work.
Diffstat (limited to 'sim/frv')
-rw-r--r--sim/frv/ChangeLog4
-rw-r--r--sim/frv/config.in24
-rwxr-xr-xsim/frv/configure164
3 files changed, 124 insertions, 68 deletions
diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog
index 4382806..1642a26 100644
--- a/sim/frv/ChangeLog
+++ b/sim/frv/ChangeLog
@@ -1,5 +1,9 @@
2016-01-10 Mike Frysinger <vapier@gentoo.org>
+ * config.in, configure: Regenerate.
+
+2016-01-10 Mike Frysinger <vapier@gentoo.org>
+
* configure: Regenerate.
2016-01-10 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/frv/config.in b/sim/frv/config.in
index 6a83434..3fd3cde 100644
--- a/sim/frv/config.in
+++ b/sim/frv/config.in
@@ -3,6 +3,9 @@
/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIVERSAL_BUILD
+/* Sim debug setting */
+#undef DEBUG
+
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#undef ENABLE_NLS
@@ -176,6 +179,9 @@
/* Additional package description */
#undef PKGVERSION
+/* Sim profile settings */
+#undef PROFILE
+
/* Bug reporting address */
#undef REPORT_BUGS_TO
@@ -207,6 +213,24 @@
#endif
+/* Sim assert settings */
+#undef WITH_ASSERT
+
+/* Sim debug setting */
+#undef WITH_DEBUG
+
+/* Sim default environment */
+#undef WITH_ENVIRONMENT
+
+/* Sim profile settings */
+#undef WITH_PROFILE
+
+/* How to route I/O */
+#undef WITH_STDIO
+
+/* Sim trace settings */
+#undef WITH_TRACE
+
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
diff --git a/sim/frv/configure b/sim/frv/configure
index fb708ee..81da83c 100755
--- a/sim/frv/configure
+++ b/sim/frv/configure
@@ -608,10 +608,6 @@ CGEN_MAINT
REPORT_BUGS_TEXI
REPORT_BUGS_TO
PKGVERSION
-sim_profile
-sim_trace
-sim_stdio
-sim_debug
MAINT
MAINTAINER_MODE_FALSE
MAINTAINER_MODE_TRUE
@@ -686,8 +682,6 @@ CFLAGS
CC
WERROR_CFLAGS
WARN_CFLAGS
-sim_xor_endian
-sim_smp
sim_reserved_bits
sim_inline
sim_hw
@@ -698,9 +692,7 @@ sim_scache
sim_float
sim_endian
sim_bitsize
-sim_assert
sim_alignment
-sim_environment
target_alias
host_alias
build_alias
@@ -4041,10 +4033,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
# intl sister-directory configuration rules.
#
@@ -12852,7 +12840,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12855 "configure"
+#line 12843 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12958,7 +12946,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12961 "configure"
+#line 12949 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13226,124 +13214,164 @@ fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim debug setting" >&5
+$as_echo_n "checking for sim debug setting... " >&6; }
+sim_debug="0"
# Check whether --enable-sim-debug was given.
if test "${enable_sim_debug+set}" = set; then :
enableval=$enable_sim_debug; case "${enableval}" in
- yes) sim_debug="-DDEBUG=7 -DWITH_DEBUG=7";;
- no) sim_debug="-DDEBUG=0 -DWITH_DEBUG=0";;
- *) sim_debug="-DDEBUG='(${enableval})' -DWITH_DEBUG='(${enableval})'";;
+ yes) sim_debug="7";;
+ no) sim_debug="0";;
+ *) sim_debug="($enableval)";;
esac
-if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then
- echo "Setting sim debug = $sim_debug" 6>&1
fi
-else
- sim_debug=""
+if test "$sim_debug" != "0"; then
+
+cat >>confdefs.h <<_ACEOF
+#define DEBUG $sim_debug
+_ACEOF
+
fi
+cat >>confdefs.h <<_ACEOF
+#define WITH_DEBUG $sim_debug
+_ACEOF
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_debug" >&5
+$as_echo "$sim_debug" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim stdio debug behavior" >&5
+$as_echo_n "checking for sim stdio debug behavior... " >&6; }
+sim_stdio="0"
# Check whether --enable-sim-stdio was given.
if test "${enable_sim_stdio+set}" = set; then :
enableval=$enable_sim_stdio; case "${enableval}" in
- yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";;
- no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";;
- *) as_fn_error "\"Unknown value $enableval passed to --enable-sim-stdio\"" "$LINENO" 5; sim_stdio="";;
+ yes) sim_stdio="DO_USE_STDIO";;
+ no) sim_stdio="DONT_USE_STDIO";;
+ *) as_fn_error "Unknown value $enableval passed to --enable-sim-stdio" "$LINENO" 5;;
esac
-if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then
- echo "Setting stdio flags = $sim_stdio" 6>&1
-fi
-else
- sim_stdio=""
fi
+cat >>confdefs.h <<_ACEOF
+#define WITH_STDIO $sim_stdio
+_ACEOF
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_stdio" >&5
+$as_echo "$sim_stdio" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim trace settings" >&5
+$as_echo_n "checking for sim trace settings... " >&6; }
+sim_trace="~TRACE_debug"
# Check whether --enable-sim-trace was given.
if test "${enable_sim_trace+set}" = set; then :
enableval=$enable_sim_trace; case "${enableval}" in
- yes) sim_trace="-DWITH_TRACE=-1";;
- no) sim_trace="-DWITH_TRACE=0";;
+ yes) sim_trace="-1";;
+ no) sim_trace="0";;
[-0-9]*)
- sim_trace="-DWITH_TRACE='(${enableval})'";;
+ sim_trace="'(${enableval})'";;
[[:lower:]]*)
sim_trace=""
for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
if test x"$sim_trace" = x; then
- sim_trace="-DWITH_TRACE='(TRACE_$x"
+ sim_trace="(TRACE_$x"
else
sim_trace="${sim_trace}|TRACE_$x"
fi
done
- sim_trace="$sim_trace)'" ;;
+ sim_trace="$sim_trace)" ;;
esac
-if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then
- echo "Setting sim trace = $sim_trace" 6>&1
-fi
-else
- sim_trace=""
fi
+cat >>confdefs.h <<_ACEOF
+#define WITH_TRACE $sim_trace
+_ACEOF
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_trace" >&5
+$as_echo "$sim_trace" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim profile settings" >&5
+$as_echo_n "checking for sim profile settings... " >&6; }
+profile="1"
+sim_profile="-1"
# Check whether --enable-sim-profile was given.
if test "${enable_sim_profile+set}" = set; then :
enableval=$enable_sim_profile; case "${enableval}" in
- yes) sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1";;
- no) sim_profile="-DPROFILE=0 -DWITH_PROFILE=0";;
+ yes) profile="1" sim_profile="-1";;
+ no) profile="0" sim_profile="0";;
[-0-9]*)
- sim_profile="-DPROFILE='(${enableval})' -DWITH_PROFILE='(${enableval})'";;
+ profile="(${enableval})" sim_profile="(${enableval})";;
[a-z]*)
+ profile="1"
sim_profile=""
for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
if test x"$sim_profile" = x; then
- sim_profile="-DWITH_PROFILE='(PROFILE_$x"
+ sim_profile="(PROFILE_$x"
else
sim_profile="${sim_profile}|PROFILE_$x"
fi
done
- sim_profile="$sim_profile)'" ;;
+ sim_profile="$sim_profile)" ;;
esac
-if test x"$silent" != x"yes" && test x"$sim_profile" != x""; then
- echo "Setting sim profile = $sim_profile" 6>&1
-fi
-else
- sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1"
fi
+cat >>confdefs.h <<_ACEOF
+#define PROFILE $profile
+_ACEOF
+cat >>confdefs.h <<_ACEOF
+#define WITH_PROFILE $sim_profile
+_ACEOF
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_profile" >&5
+$as_echo "$sim_profile" >&6; }
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable sim asserts" >&5
+$as_echo_n "checking whether to enable sim asserts... " >&6; }
+sim_assert="1"
# Check whether --enable-sim-assert was given.
if test "${enable_sim_assert+set}" = set; then :
enableval=$enable_sim_assert; case "${enableval}" in
- yes) sim_assert="-DWITH_ASSERT=1";;
- no) sim_assert="-DWITH_ASSERT=0";;
- *) as_fn_error "\"--enable-sim-assert does not take a value\"" "$LINENO" 5; sim_assert="";;
+ yes) sim_assert="1";;
+ no) sim_assert="0";;
+ *) as_fn_error "--enable-sim-assert does not take a value" "$LINENO" 5;;
esac
-if test x"$silent" != x"yes" && test x"$sim_assert" != x""; then
- echo "Setting assert flags = $sim_assert" 6>&1
-fi
-else
- sim_assert=""
fi
+cat >>confdefs.h <<_ACEOF
+#define WITH_ASSERT $sim_assert
+_ACEOF
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_assert" >&5
+$as_echo "$sim_assert" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking default sim environment setting" >&5
+$as_echo_n "checking default sim environment setting... " >&6; }
+sim_environment="ALL_ENVIRONMENT"
# Check whether --enable-sim-environment was given.
if test "${enable_sim_environment+set}" = set; then :
enableval=$enable_sim_environment; case "${enableval}" in
- all | ALL) sim_environment="-DWITH_ENVIRONMENT=ALL_ENVIRONMENT";;
- user | USER) sim_environment="-DWITH_ENVIRONMENT=USER_ENVIRONMENT";;
- virtual | VIRTUAL) sim_environment="-DWITH_ENVIRONMENT=VIRTUAL_ENVIRONMENT";;
- operating | OPERATING) sim_environment="-DWITH_ENVIRONMENT=OPERATING_ENVIRONMENT";;
- *) as_fn_error "\"Unknown value $enableval passed to --enable-sim-environment\"" "$LINENO" 5;
- sim_environment="";;
+ all | ALL) sim_environment="ALL_ENVIRONMENT";;
+ user | USER) sim_environment="USER_ENVIRONMENT";;
+ virtual | VIRTUAL) sim_environment="VIRTUAL_ENVIRONMENT";;
+ operating | OPERATING) sim_environment="OPERATING_ENVIRONMENT";;
+ *) as_fn_error "Unknown value $enableval passed to --enable-sim-environment" "$LINENO" 5;;
esac
-if test x"$silent" != x"yes" && test x"$sim_environment" != x""; then
- echo "Setting sim environment = $sim_environment" 6>&1
-fi
-else
- sim_environment="-DWITH_ENVIRONMENT=ALL_ENVIRONMENT"
fi
+cat >>confdefs.h <<_ACEOF
+#define WITH_ENVIRONMENT $sim_environment
+_ACEOF
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_environment" >&5
+$as_echo "$sim_environment" >&6; }
+
sim_inline="-DDEFAULT_INLINE=0"
# Check whether --enable-sim-inline was given.