ppc sim: Allow --sysroot command-line option
authorJoel Brobecker <brobecker@gnat.com>
Wed, 8 Jun 2011 16:44:20 +0000 (16:44 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Wed, 8 Jun 2011 16:44:20 +0000 (16:44 +0000)
There was a recent change that cuased the "target sim" command
to add a --sysroot option to the argument vector passed down to
the simulator.  This caused a failure in the powerpc simulator,
as it did not recognize it.  This patch fixes the problem by adding
support for the --sysroot option (it ignores it).

sim/ppc/ChangeLog:

        * psim.c (psim_options): Accept and ignore `--sysroot=...'.

sim/ppc/ChangeLog
sim/ppc/psim.c

index 2b9017a..2536fa4 100644 (file)
@@ -1,3 +1,7 @@
+2011-06-08  Joel Brobecker  <brobecker@adacore.com>
+
+       * psim.c (psim_options): Accept and ignore `--sysroot=...'.
+
 2011-06-03  Joel Brobecker  <brobecker@adacore.com>  (obvious fix)
 
        From Stephen Kitt  <steve@sk2.org>
index c311794..076a50c 100644 (file)
@@ -357,6 +357,10 @@ psim_options(device *root,
         }
        else if (strcmp (argv[argp], "--help") == 0)
          psim_usage (0, 1);
+       else if (strncmp (argv[argp], "--sysroot=",
+                         sizeof ("--sysroot=")) == 0)
+         /* Ignore this option.  */
+         p = argv[argp] + strlen(argv[argp]) - 1;
        else if (strcmp (argv[argp], "--version") == 0)
          {
            extern const char version[];