public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH/committed] sim: ppc: unify env settings too
Date: Sat, 12 Jun 2021 13:17:51 -0400	[thread overview]
Message-ID: <20210612171751.17055-1-vapier@gentoo.org> (raw)
In-Reply-To: <20210607053355.9965-3-vapier@gentoo.org>

The ppc port doesn't share a lot of the common logic, but there are
a few bits that bleed across.  Have it use the common configure for
environment settings too to avoid duplicate define errors after the
recent unification with the other ports.
---
 sim/ppc/ChangeLog    |  7 +++++++
 sim/ppc/config.in    |  3 ---
 sim/ppc/configure    | 26 +-------------------------
 sim/ppc/configure.ac | 17 +----------------
 sim/ppc/defs.h       | 14 +++++++++++++-
 sim/ppc/std-config.h |  1 +
 6 files changed, 23 insertions(+), 45 deletions(-)

diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index 9289b8ed2a72..fe7e7777d5bc 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,3 +1,10 @@
+2021-06-12  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure.ac: Delete sim-env configure option.
+	* defs.h: Include ../config.h.  Undefine PACKAGE* defines.
+	* std-config.h (ALL_ENVIRONMENT): Define.
+	* config.in, configure: Regenerate.
+
 2021-06-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* basics.h (NULL): Delete.
diff --git a/sim/ppc/config.in b/sim/ppc/config.in
index 1a256d939009..b7530f0081a8 100644
--- a/sim/ppc/config.in
+++ b/sim/ppc/config.in
@@ -325,9 +325,6 @@
 /* Sim assert settings */
 #undef WITH_ASSERT
 
-/* Sim default environment */
-#undef WITH_ENVIRONMENT
-
 /* How to route I/O */
 #undef WITH_STDIO
 
diff --git a/sim/ppc/configure b/sim/ppc/configure
index 1c2cfda37ed8..4781393e69e1 100755
--- a/sim/ppc/configure
+++ b/sim/ppc/configure
@@ -753,7 +753,6 @@ enable_sim_decode_mechanism
 enable_sim_default_model
 enable_sim_duplicate
 enable_sim_endian
-enable_sim_env
 enable_sim_filter
 enable_sim_float
 enable_sim_hardware
@@ -1416,7 +1415,6 @@ Optional Features:
   --enable-sim-default-model=which	Specify default PowerPC to model.
   --enable-sim-duplicate		Expand (duplicate) semantic functions.
   --enable-sim-endian=endian		Specify target byte endian orientation.
-  --enable-sim-env=env			Specify target environment (operating, virtual, user).
   --enable-sim-filter=rule		Specify filter rules.
   --enable-sim-float			Specify whether the target has hard, soft, altivec or e500 floating point.
   --enable-sim-hardware=list		Specify the hardware to be included in the build.
@@ -3536,28 +3534,6 @@ else
 fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking default sim environment setting" >&5
-$as_echo_n "checking default sim environment setting... " >&6; }
-sim_env="0"
-# Check whether --enable-sim-env was given.
-if test "${enable_sim_env+set}" = set; then :
-  enableval=$enable_sim_env; case "${enableval}" in
-  operating | os | oea)	sim_env="OPERATING_ENVIRONMENT";;
-  virtual | vea)	sim_env="VIRTUAL_ENVIRONMENT";;
-  user | uea)		sim_env="USER_ENVIRONMENT";;
-  no)			sim_env="0";;
-  *)			as_fn_error $? "Unknown value $enableval passed to --enable-sim-env" "$LINENO" 5;;
-esac
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define WITH_ENVIRONMENT $sim_env
-_ACEOF
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_env" >&5
-$as_echo "$sim_env" >&6; }
-
-
 # Check whether --enable-sim-filter was given.
 if test "${enable_sim_filter+set}" = set; then :
   enableval=$enable_sim_filter; case "${enableval}" in
@@ -4596,7 +4572,7 @@ if test "${enable_sim_monitor+set}" = set; then :
   no)		sim_monitor="-DWITH_MON=0";;
   instruction)	sim_monitor="-DWITH_MON=MONITOR_INSTRUCTION_ISSUE";;
   memory)	sim_monitor="-DWITH_MON=MONITOR_LOAD_STORE_UNIT";;
-  *)		as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-mon\"" "$LINENO" 5; sim_env="";;
+  *)		as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-mon\"" "$LINENO" 5;;
 esac
 if test x"$silent" != x"yes" && test x"$sim_monitor" != x""; then
   echo "Setting monitor flags = $sim_monitor" 6>&1
diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac
index 9bd0ab734eb0..8ff54d90658b 100644
--- a/sim/ppc/configure.ac
+++ b/sim/ppc/configure.ac
@@ -137,21 +137,6 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then
 fi],[sim_endian=""])dnl
 
 
-AC_MSG_CHECKING([default sim environment setting])
-sim_env="0"
-AC_ARG_ENABLE(sim-env,
-[  --enable-sim-env=env			Specify target environment (operating, virtual, user).],
-[case "${enableval}" in
-  operating | os | oea)	sim_env="OPERATING_ENVIRONMENT";;
-  virtual | vea)	sim_env="VIRTUAL_ENVIRONMENT";;
-  user | uea)		sim_env="USER_ENVIRONMENT";;
-  no)			sim_env="0";;
-  *)			AC_MSG_ERROR([Unknown value $enableval passed to --enable-sim-env]);;
-esac])dnl
-AC_DEFINE_UNQUOTED([WITH_ENVIRONMENT], [$sim_env], [Sim default environment])
-AC_MSG_RESULT($sim_env)
-
-
 AC_ARG_ENABLE(sim-filter,
 [  --enable-sim-filter=rule		Specify filter rules.],
 [case "${enableval}" in
@@ -457,7 +442,7 @@ AC_ARG_ENABLE(sim-monitor,
   no)		sim_monitor="-DWITH_MON=0";;
   instruction)	sim_monitor="-DWITH_MON=MONITOR_INSTRUCTION_ISSUE";;
   memory)	sim_monitor="-DWITH_MON=MONITOR_LOAD_STORE_UNIT";;
-  *)		AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-mon"); sim_env="";;
+  *)		AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-mon");;
 esac
 if test x"$silent" != x"yes" && test x"$sim_monitor" != x""; then
   echo "Setting monitor flags = $sim_monitor" 6>&1
diff --git a/sim/ppc/defs.h b/sim/ppc/defs.h
index 66e76d26dbad..9a89844adb70 100644
--- a/sim/ppc/defs.h
+++ b/sim/ppc/defs.h
@@ -20,7 +20,19 @@
 #ifndef DEFS_H
 #define DEFS_H
 
-/* Include sim's various configure tests.  */
+/* Include arch-specific sim's various configure tests.  */
 #include "config.h"
 
+/* Reset macros that our config.h will provide.  */
+#undef PACKAGE
+#undef PACKAGE_BUGREPORT
+#undef PACKAGE_NAME
+#undef PACKAGE_STRING
+#undef PACKAGE_TARNAME
+#undef PACKAGE_URL
+#undef PACKAGE_VERSION
+
+/* Include common sim's various configure tests.  */
+#include "../config.h"
+
 #endif
diff --git a/sim/ppc/std-config.h b/sim/ppc/std-config.h
index 7e6b8c2cf757..6cf7f27fe558 100644
--- a/sim/ppc/std-config.h
+++ b/sim/ppc/std-config.h
@@ -107,6 +107,7 @@ extern int current_target_byte_order;
    CURRENT_ENVIRONMENT specifies which of vea or oea is required for
    the current runtime. */
 
+#define ALL_ENVIRONMENT			0
 #define USER_ENVIRONMENT		1
 #define VIRTUAL_ENVIRONMENT		2
 #define OPERATING_ENVIRONMENT		3
-- 
2.31.1


  reply	other threads:[~2021-06-12 17:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07  5:33 [PATCH 1/7] sim: unify platform function & header tests Mike Frysinger
2021-06-07  5:33 ` [PATCH 2/7] sim: unify assert build settings Mike Frysinger
2021-06-07  5:33 ` [PATCH 3/7] sim: unify environment " Mike Frysinger
2021-06-12 17:17   ` Mike Frysinger [this message]
2021-06-07  5:33 ` [PATCH 4/7] sim: split debug/stdio/trace/profile options into dedicated m4 files Mike Frysinger
2021-06-07  5:33 ` [PATCH 5/7] sim: unify debug/stdio/trace/profile build settings Mike Frysinger
2021-06-13  0:09   ` [PATCH 5/7 v2] " Mike Frysinger
2021-06-07  5:33 ` [PATCH 6/7] sim: unify bug & package settings Mike Frysinger
2021-06-13  0:25   ` [PATCH 6/7 v2] " Mike Frysinger
2021-06-07  5:33 ` [PATCH 7/7] sim: overhaul alignment settings management Mike Frysinger
2021-06-13  1:19   ` [PATCH 7/7 v2] " Mike Frysinger
2021-06-12 18:40 ` [PATCH/committed] sim: ppc: unify header & function & type tests too Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210612171751.17055-1-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).