public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 3/3] sim: fix the PKGVERSION define
  2015-04-13  6:43 [PATCH 1/3] sim: switch to gdb version script Mike Frysinger
@ 2015-04-13  6:43 ` Mike Frysinger
  2015-04-13  6:43 ` [PATCH 2/3] sim: options: add --version support Mike Frysinger
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2015-04-13  6:43 UTC (permalink / raw)
  To: gdb-patches

This should be SIM, not GDB.

Committed.
---
 sim/arm/ChangeLog        | 4 ++++
 sim/arm/configure        | 4 ++--
 sim/avr/ChangeLog        | 4 ++++
 sim/avr/configure        | 4 ++--
 sim/bfin/ChangeLog       | 4 ++++
 sim/bfin/configure       | 4 ++--
 sim/common/ChangeLog     | 5 +++++
 sim/common/acinclude.m4  | 2 +-
 sim/common/configure     | 4 ++--
 sim/cr16/ChangeLog       | 4 ++++
 sim/cr16/configure       | 4 ++--
 sim/cris/ChangeLog       | 4 ++++
 sim/cris/configure       | 4 ++--
 sim/d10v/ChangeLog       | 4 ++++
 sim/d10v/configure       | 4 ++--
 sim/erc32/ChangeLog      | 4 ++++
 sim/erc32/configure      | 4 ++--
 sim/frv/ChangeLog        | 4 ++++
 sim/frv/configure        | 4 ++--
 sim/ft32/ChangeLog       | 4 ++++
 sim/ft32/configure       | 4 ++--
 sim/h8300/ChangeLog      | 4 ++++
 sim/h8300/configure      | 4 ++--
 sim/iq2000/ChangeLog     | 4 ++++
 sim/iq2000/configure     | 4 ++--
 sim/lm32/ChangeLog       | 4 ++++
 sim/lm32/configure       | 4 ++--
 sim/m32c/ChangeLog       | 4 ++++
 sim/m32c/configure       | 4 ++--
 sim/m32r/ChangeLog       | 4 ++++
 sim/m32r/configure       | 4 ++--
 sim/m68hc11/ChangeLog    | 4 ++++
 sim/m68hc11/configure    | 4 ++--
 sim/mcore/ChangeLog      | 4 ++++
 sim/mcore/configure      | 4 ++--
 sim/microblaze/ChangeLog | 4 ++++
 sim/microblaze/configure | 4 ++--
 sim/mips/ChangeLog       | 4 ++++
 sim/mips/configure       | 4 ++--
 sim/mn10300/ChangeLog    | 4 ++++
 sim/mn10300/configure    | 4 ++--
 sim/moxie/ChangeLog      | 4 ++++
 sim/moxie/configure      | 4 ++--
 sim/msp430/ChangeLog     | 4 ++++
 sim/msp430/configure     | 4 ++--
 sim/rl78/ChangeLog       | 4 ++++
 sim/rl78/configure       | 4 ++--
 sim/rx/ChangeLog         | 4 ++++
 sim/rx/configure         | 4 ++--
 sim/sh/ChangeLog         | 4 ++++
 sim/sh/configure         | 4 ++--
 sim/sh64/ChangeLog       | 4 ++++
 sim/sh64/configure       | 4 ++--
 sim/v850/ChangeLog       | 4 ++++
 sim/v850/configure       | 4 ++--
 55 files changed, 164 insertions(+), 55 deletions(-)

diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog
index 802e837..4078d71 100644
--- a/sim/arm/ChangeLog
+++ b/sim/arm/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure: Regenerate.
+
 2015-04-12  Mike Frysinger  <vapier@gentoo.org>
 
 	* Makefile.in (SIM_OBJS): Move wrapper.o to the start of the list.
diff --git a/sim/arm/configure b/sim/arm/configure
index ead6d3d..39f93ad 100755
diff --git a/sim/avr/ChangeLog b/sim/avr/ChangeLog
index 840ec0b..d8b2a29 100644
--- a/sim/avr/ChangeLog
+++ b/sim/avr/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure: Regenerate.
+
 2015-04-06  Mike Frysinger  <vapier@gentoo.org>
 
 	* Makefile.in (SIM_OBJS): Delete sim-engine.o and sim-hrw.o.
diff --git a/sim/avr/configure b/sim/avr/configure
index 092ef46..38d09c0 100755
diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog
index 7410729..cd73580 100644
--- a/sim/bfin/ChangeLog
+++ b/sim/bfin/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure: Regenerate.
+
 2015-04-06  Mike Frysinger  <vapier@gentoo.org>
 
 	* Makefile.in (SIM_OBJS): Delete sim-engine.o and sim-hrw.o.
diff --git a/sim/bfin/configure b/sim/bfin/configure
index 59723c2..5b9aaa2 100755
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index a7341f5..5c0667b 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,5 +1,10 @@
 2015-04-13  Mike Frysinger  <vapier@gentoo.org>
 
+	* acinclude.m4 (ACX_PKGVERSION): Change GDB to SIM.
+	* configure: Regenerate.
+
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
 	* sim-options.c: Include version.h.
 	(OPTIONS_VERSION): New enum.
 	(standard_options): Add "version".
diff --git a/sim/common/acinclude.m4 b/sim/common/acinclude.m4
index 6522fea..75ea8ea 100644
--- a/sim/common/acinclude.m4
+++ b/sim/common/acinclude.m4
@@ -235,7 +235,7 @@ if test x"$silent" != x"yes" && test x"$sim_profile" != x""; then
 fi],[sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1"])dnl
 AC_SUBST(sim_profile)
 
-ACX_PKGVERSION([GDB])
+ACX_PKGVERSION([SIM])
 ACX_BUGURL([http://www.gnu.org/software/gdb/bugs/])
 AC_DEFINE_UNQUOTED([PKGVERSION], ["$PKGVERSION"], [Additional package description])
 AC_DEFINE_UNQUOTED([REPORT_BUGS_TO], ["$REPORT_BUGS_TO"], [Bug reporting address])
diff --git a/sim/common/configure b/sim/common/configure
index b81c8a1..631ebac 100755
diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog
index 6e2d58c..272d7ca 100644
--- a/sim/cr16/ChangeLog
+++ b/sim/cr16/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure: Regenerate.
+
 2015-04-06  Mike Frysinger  <vapier@gentoo.org>
 
 	* Makefile.in (SIM_OBJS): Delete sim-engine.o.
diff --git a/sim/cr16/configure b/sim/cr16/configure
index ead6d3d..39f93ad 100755
diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog
index 0c56cb9..b69e20f 100644
--- a/sim/cris/ChangeLog
+++ b/sim/cris/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure: Regenerate.
+
 2015-04-06  Mike Frysinger  <vapier@gentoo.org>
 
 	* Makefile.in (SIM_OBJS): Delete sim-engine.o and sim-hrw.o.
diff --git a/sim/cris/configure b/sim/cris/configure
index f8e8340..6705a1b 100755
diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog
index 418f6ce..331f359 100644
--- a/sim/d10v/ChangeLog
+++ b/sim/d10v/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure: Regenerate.
+
 2015-04-06  Mike Frysinger  <vapier@gentoo.org>
 
 	* Makefile.in (SIM_OBJS): Delete sim-engine.o.
diff --git a/sim/d10v/configure b/sim/d10v/configure
index ead6d3d..39f93ad 100755
diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog
index 5879674..57c1932 100644
--- a/sim/erc32/ChangeLog
+++ b/sim/erc32/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure: Regenerate.
+
 2015-03-31  Mike Frysinger  <vapier@gentoo.org>
 
 	* config.in, configure: Regenerate.
diff --git a/sim/erc32/configure b/sim/erc32/configure
index a0f3228..bfe5dbb 100755
diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog
index 92e0dcb..9580c56 100644
--- a/sim/frv/ChangeLog
+++ b/sim/frv/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure: Regenerate.
+
 2015-04-06  Mike Frysinger  <vapier@gentoo.org>
 
 	* Makefile.in (SIM_OBJS): Delete sim-engine.o and sim-hrw.o.
diff --git a/sim/frv/configure b/sim/frv/configure
index 13ca7c3..50e50c2 100755
diff --git a/sim/ft32/ChangeLog b/sim/ft32/ChangeLog
index 2ae6060..f3208e6 100644
--- a/sim/ft32/ChangeLog
+++ b/sim/ft32/ChangeLog
@@ -1,5 +1,9 @@
 2015-04-13  Mike Frysinger  <vapier@gentoo.org>
 
+	* configure: Regenerate.
+
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
 	* interp.c (ft32_pc_get): Return the pc value.
 
 2015-04-12  Mike Frysinger  <vapier@gentoo.org>
diff --git a/sim/ft32/configure b/sim/ft32/configure
index 0d21f06..946f84f 100755
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog
index c0be32d..215a182 100644
--- a/sim/h8300/ChangeLog
+++ b/sim/h8300/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure: Regenerate.
+
 2015-04-06  Mike Frysinger  <vapier@gentoo.org>
 
 	* Makefile.in (SIM_OBJS): Delete sim-engine.o.
diff --git a/sim/h8300/configure b/sim/h8300/configure
index 97b396f..c273fc4 100755
diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog
index bc95baf..9da17e5 100644
--- a/sim/iq2000/ChangeLog
+++ b/sim/iq2000/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure: Regenerate.
+
 2015-04-06  Mike Frysinger  <vapier@gentoo.org>
 
 	* Makefile.in (SIM_OBJS): Delete sim-engine.o and sim-hrw.o.
diff --git a/sim/iq2000/configure b/sim/iq2000/configure
index 3561837..02ac1d5 100755
diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog
index 31e621f..fdb204b 100644
--- a/sim/lm32/ChangeLog
+++ b/sim/lm32/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure: Regenerate.
+
 2015-04-06  Mike Frysinger  <vapier@gentoo.org>
 
 	* Makefile.in (SIM_OBJS): Delete sim-engine.o and sim-hrw.o.
diff --git a/sim/lm32/configure b/sim/lm32/configure
index d908fca..3fa679c 100755
diff --git a/sim/m32c/ChangeLog b/sim/m32c/ChangeLog
index 814d2dc..de47b6d 100644
--- a/sim/m32c/ChangeLog
+++ b/sim/m32c/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure: Regenerate.
+
 2015-04-01  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure.ac: Call SIM_AC_OPTION_WARNINGS.
diff --git a/sim/m32c/configure b/sim/m32c/configure
index 99a06d1..1a1515f 100755
diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog
index e7d332f..2dcd3a0 100644
--- a/sim/m32r/ChangeLog
+++ b/sim/m32r/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure: Regenerate.
+
 2015-04-06  Mike Frysinger  <vapier@gentoo.org>
 
 	* Makefile.in (SIM_OBJS): Delete sim-engine.o and sim-hrw.o.
diff --git a/sim/m32r/configure b/sim/m32r/configure
index 417e24c..2145d6a 100755
diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog
index 73adccb..adedfc4 100644
--- a/sim/m68hc11/ChangeLog
+++ b/sim/m68hc11/ChangeLog
@@ -1,5 +1,9 @@
 2015-04-13  Mike Frysinger  <vapier@gentoo.org>
 
+	* configure: Regenerate.
+
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
 	* Makefile.in (SIM_OBJS): Add sim-cpu.o.
 	* interp.c (m68hc11_pc_get, m68hc11_pc_set): New functions.
 	(sim_open): Declare new local var i.  Call sim_cpu_alloc_all.
diff --git a/sim/m68hc11/configure b/sim/m68hc11/configure
index e66e89c..7bde7e4 100755
diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog
index cd32d7a..f8f29a8 100644
--- a/sim/mcore/ChangeLog
+++ b/sim/mcore/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure: Regenerate.
+
 2015-04-06  Mike Frysinger  <vapier@gentoo.org>
 
 	* Makefile.in (SIM_OBJS): Delete sim-engine.o.
diff --git a/sim/mcore/configure b/sim/mcore/configure
index ead6d3d..39f93ad 100755
diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog
index 5120267..7285fd7 100644
--- a/sim/microblaze/ChangeLog
+++ b/sim/microblaze/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure: Regenerate.
+
 2015-04-06  Mike Frysinger  <vapier@gentoo.org>
 
 	* Makefile.in (SIM_OBJS): Delete sim-engine.o.
diff --git a/sim/microblaze/configure b/sim/microblaze/configure
index ead6d3d..39f93ad 100755
diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog
index a962f84..7577dc6 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -1,5 +1,9 @@
 2015-04-13  Mike Frysinger  <vapier@gentoo.org>
 
+	* configure: Regenerate.
+
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
 	* Makefile.in (SIM_OBJS): Add sim-cpu.o.
 	* interp.c (mips_pc_get, mips_pc_set): New functions.
 	(sim_open): Declare new local var i.  Call sim_cpu_alloc_all.
diff --git a/sim/mips/configure b/sim/mips/configure
index 1abf98e..16367a8 100755
diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog
index dbeb0c7..87985d6 100644
--- a/sim/mn10300/ChangeLog
+++ b/sim/mn10300/ChangeLog
@@ -1,5 +1,9 @@
 2015-04-13  Mike Frysinger  <vapier@gentoo.org>
 
+	* configure: Regenerate.
+
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
 	* Makefile.in (MN10300_OBJS): Add sim-cpu.o.
 	* interp.c (mn10300_pc_get, mn10300_pc_set): New functions.
 	(sim_open): Declare new local var i.  Call sim_cpu_alloc_all.
diff --git a/sim/mn10300/configure b/sim/mn10300/configure
index a8303be..54425b1 100755
diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog
index e59cbfa..32b4f45 100644
--- a/sim/moxie/ChangeLog
+++ b/sim/moxie/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure: Regenerate.
+
 2015-04-06  Mike Frysinger  <vapier@gentoo.org>
 
 	* Makefile.in (SIM_OBJS): Delete sim-engine.o and sim-hrw.o.
diff --git a/sim/moxie/configure b/sim/moxie/configure
index 6417068..6540bcc 100755
diff --git a/sim/msp430/ChangeLog b/sim/msp430/ChangeLog
index 31e115c..9347ed5 100644
--- a/sim/msp430/ChangeLog
+++ b/sim/msp430/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure: Regenerate.
+
 2015-04-06  Mike Frysinger  <vapier@gentoo.org>
 
 	* Makefile.in (SIM_OBJS): Delete sim-engine.o and sim-hrw.o.
diff --git a/sim/msp430/configure b/sim/msp430/configure
index ff3e5bc..12f9ed4 100755
diff --git a/sim/rl78/ChangeLog b/sim/rl78/ChangeLog
index 0bf54ca..d515328 100644
--- a/sim/rl78/ChangeLog
+++ b/sim/rl78/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure: Regenerate.
+
 2015-03-31  Mike Frysinger  <vapier@gentoo.org>
 
 	* config.in, configure: Regenerate.
diff --git a/sim/rl78/configure b/sim/rl78/configure
index b0e2f08..2b074d5 100755
diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog
index e8c3e54..45e67c3 100644
--- a/sim/rx/ChangeLog
+++ b/sim/rx/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure: Regenerate.
+
 2015-03-31  Mike Frysinger  <vapier@gentoo.org>
 
 	* config.in, configure: Regenerate.
diff --git a/sim/rx/configure b/sim/rx/configure
index ab886c1..cffb1ba 100755
diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog
index 7b93524..23efac2 100644
--- a/sim/sh/ChangeLog
+++ b/sim/sh/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure: Regenerate.
+
 2015-04-06  Mike Frysinger  <vapier@gentoo.org>
 
 	* Makefile.in (SIM_OBJS): Delete sim-engine.o.
diff --git a/sim/sh/configure b/sim/sh/configure
index ead6d3d..39f93ad 100755
diff --git a/sim/sh64/ChangeLog b/sim/sh64/ChangeLog
index e6a17e0..574fbb1 100644
--- a/sim/sh64/ChangeLog
+++ b/sim/sh64/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure: Regenerate.
+
 2015-04-06  Mike Frysinger  <vapier@gentoo.org>
 
 	* Makefile.in (SIM_OBJS): Delete sim-engine.o and sim-hrw.o.
diff --git a/sim/sh64/configure b/sim/sh64/configure
index c31b447..b1d6a9c 100755
diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog
index 9a5e907..62c6ef0 100644
--- a/sim/v850/ChangeLog
+++ b/sim/v850/ChangeLog
@@ -1,5 +1,9 @@
 2015-04-13  Mike Frysinger  <vapier@gentoo.org>
 
+	* configure: Regenerate.
+
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
 	* Makefile.in (SIM_OBJS): Add sim-cpu.o.
 	* interp.c (v850_pc_get, v850_pc_set): New functions.
 	(sim_open): Declare new local var i.  Call sim_cpu_alloc_all.
diff --git a/sim/v850/configure b/sim/v850/configure
index 9926027..f631e0c 100755
-- 
2.3.5

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/3] sim: options: add --version support
  2015-04-13  6:43 [PATCH 1/3] sim: switch to gdb version script Mike Frysinger
  2015-04-13  6:43 ` [PATCH 3/3] sim: fix the PKGVERSION define Mike Frysinger
@ 2015-04-13  6:43 ` Mike Frysinger
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2015-04-13  6:43 UTC (permalink / raw)
  To: gdb-patches

The old run frontend had a --version option, but the new common
sim-options file does not.  Restore support for that so we can
get version info out of `run` when using the new frontend.

Committed.
---
 sim/common/ChangeLog     |  7 +++++++
 sim/common/sim-options.c | 11 +++++++++++
 2 files changed, 18 insertions(+)

diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 00a952e..a7341f5 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,5 +1,12 @@
 2015-04-13  Mike Frysinger  <vapier@gentoo.org>
 
+	* sim-options.c: Include version.h.
+	(OPTIONS_VERSION): New enum.
+	(standard_options): Add "version".
+	(standard_option_handler): Handle OPTIONS_VERSION.
+
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
 	* Makefile.in (version.o): Change to using create-version.sh from gdb.
 	(create-version.sh): Delete.
 
diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c
index 814edcf..f823143 100644
--- a/sim/common/sim-options.c
+++ b/sim/common/sim-options.c
@@ -33,6 +33,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "sim-options.h"
 #include "sim-io.h"
 #include "sim-assert.h"
+#include "version.h"
 
 #include "bfd.h"
 
@@ -105,6 +106,7 @@ typedef enum {
   OPTION_MEM_SIZE,
 #endif
   OPTION_HELP,
+  OPTION_VERSION,
 #ifdef SIM_H8300 /* FIXME: Should be movable to h8300 dir.  */
   OPTION_H8300H,
   OPTION_H8300S,
@@ -173,6 +175,9 @@ static const OPTION standard_options[] =
   { {"help", no_argument, NULL, OPTION_HELP},
       'H', NULL, "Print help information",
       standard_option_handler },
+  { {"version", no_argument, NULL, OPTION_VERSION},
+      '\0', NULL, "Print version information",
+      standard_option_handler },
 
   { {"architecture", required_argument, NULL, OPTION_ARCHITECTURE},
       '\0', "MACHINE", "Specify the architecture to use",
@@ -455,6 +460,12 @@ standard_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt,
       /* FIXME: 'twould be nice to do something similar if gdb.  */
       break;
 
+    case OPTION_VERSION:
+      sim_io_printf (sd, "GNU simulator %s%s\n", PKGVERSION, version);
+      if (STATE_OPEN_KIND (sd) == SIM_OPEN_STANDALONE)
+	exit (0);
+      break;
+
     case OPTION_SYSROOT:
       /* Don't leak memory in the odd event that there's lots of
 	 --sysroot=... options.  We treat "" specially since this
-- 
2.3.5

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/3] sim: switch to gdb version script
@ 2015-04-13  6:43 Mike Frysinger
  2015-04-13  6:43 ` [PATCH 3/3] sim: fix the PKGVERSION define Mike Frysinger
  2015-04-13  6:43 ` [PATCH 2/3] sim: options: add --version support Mike Frysinger
  0 siblings, 2 replies; 3+ messages in thread
From: Mike Frysinger @ 2015-04-13  6:43 UTC (permalink / raw)
  To: gdb-patches

Since the local create-version.sh already points directly into the gdb
source tree, we might as well use the gdb script directly too.

Committed.
---
 sim/common/ChangeLog         |  5 +++++
 sim/common/Make-common.in    |  5 +++--
 sim/common/create-version.sh | 38 --------------------------------------
 3 files changed, 8 insertions(+), 40 deletions(-)
 delete mode 100755 sim/common/create-version.sh

diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index bf7807c..00a952e 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-13  Mike Frysinger  <vapier@gentoo.org>
+
+	* Makefile.in (version.o): Change to using create-version.sh from gdb.
+	(create-version.sh): Delete.
+
 2015-04-06  Mike Frysinger  <vapier@gentoo.org>
 
 	* Make-common.in (SIM_NEW_COMMON_OBJS): Add sim-engine.o and sim-hrw.o.
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index 50db255..d42fea6 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -304,8 +304,9 @@ stamp-tvals: gentmap
 	$(SHELL) $(srcroot)/move-if-change tmp-tmap.c targ-map.c
 	touch stamp-tvals
 
-version.c: Makefile $(srccom)/create-version.sh ../../bfd/version.h ../../gdb/version.in
-	$(SHELL) $(srccom)/create-version.sh $(srcsim) $(host_alias) $(target_alias) version.c
+version.c: Makefile $(srcroot)/gdb/version.in $(srcroot)/bfd/version.h $(srcroot)/gdb/common/create-version.sh
+	$(SHELL) $(srcroot)/gdb/common/create-version.sh $(srcroot)/gdb \
+	    $(host_alias) $(target_alias) version.c
 
 #
 # Rules for building sim-* components.  Triggered by listing the corresponding
diff --git a/sim/common/create-version.sh b/sim/common/create-version.sh
deleted file mode 100755
index 84a6577..0000000
--- a/sim/common/create-version.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 1989-2015 Free Software Foundation, Inc.
-
-# This file is part of GDB.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Create version.c from $1/../gdb/version.in.
-# Please keep the same API as $1/../gdb/common/create-version.sh so
-# they can be called the same way, from e.g. $srcroot/src-release.
-# Usage:
-#    create-version.sh PATH-TO-SIM-SRCDIR HOST_ALIAS \
-#        TARGET_ALIAS OUTPUT-FILE-NAME
-
-srcdir="$1"
-host_alias="$2"
-target_alias="$3"
-output="$4"
-
-rm -f version.c-tmp $output version.tmp
-date=`sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$/\1/p' $srcdir/../bfd/version.h`
-sed -e "s/DATE/$date/" < $srcdir/../gdb/version.in > version.tmp
-echo '#include "version.h"' >> version.c-tmp
-echo 'const char version[] = "'"`sed q version.tmp`"'";' >> version.c-tmp
-mv version.c-tmp $output
-rm -f version.tmp
-- 
2.3.5

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-13  6:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-13  6:43 [PATCH 1/3] sim: switch to gdb version script Mike Frysinger
2015-04-13  6:43 ` [PATCH 3/3] sim: fix the PKGVERSION define Mike Frysinger
2015-04-13  6:43 ` [PATCH 2/3] sim: options: add --version support Mike Frysinger

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