OSDN Git Service

* gcc.c (DEFAULT_SWITCH_CURTAILS_COMPILATION): Add -E.
authorhainque <hainque@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Oct 2009 08:39:43 +0000 (08:39 +0000)
committerhainque <hainque@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Oct 2009 08:39:43 +0000 (08:39 +0000)
        (process_command): Handle -E as done with -c and -S.  Do not add
        the target executable suffix to the output file when -E is used.
        (main): Adjust error message accordingly.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152758 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/gcc.c

index e5564ac..bbb97ec 100644 (file)
@@ -1,3 +1,10 @@
+2009-10-14  Pascal Obry  <obry@adacore.com>
+
+       * gcc.c (DEFAULT_SWITCH_CURTAILS_COMPILATION): Add -E.
+       (process_command): Handle -E as done with -c and -S.  Do not add
+       the target executable suffix to the output file when -E is used.
+       (main): Adjust error message accordingly.
+
 2009-10-14  Alexandre Oliva  <aoliva@redhat.com>
 
        PR debug/41343
index 52fe227..78e0ce8 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -984,7 +984,7 @@ static struct user_specs *user_specs_head, *user_specs_tail;
 #ifdef HAVE_TARGET_EXECUTABLE_SUFFIX
 /* This defines which switches stop a full compilation.  */
 #define DEFAULT_SWITCH_CURTAILS_COMPILATION(CHAR) \
-  ((CHAR) == 'c' || (CHAR) == 'S')
+  ((CHAR) == 'c' || (CHAR) == 'S' || (CHAR) == 'E')
 
 #ifndef SWITCH_CURTAILS_COMPILATION
 #define SWITCH_CURTAILS_COMPILATION(CHAR) \
@@ -2000,7 +2000,7 @@ static int argbuf_index;
 
 static int have_o_argbuf_index = 0;
 
-/* Were the options -c or -S passed.  */
+/* Were the options -c, -S or -E passed.  */
 static int have_c = 0;
 
 /* Was the option -o passed.  */
@@ -4142,6 +4142,7 @@ process_command (int argc, const char **argv)
 
            case 'S':
            case 'c':
+           case 'E':
              if (p[1] == 0)
                {
                  have_c = 1;
@@ -4157,7 +4158,7 @@ process_command (int argc, const char **argv)
                {
                  int skip;
 
-                 /* Forward scan, just in case -S or -c is specified
+                 /* Forward scan, just in case -S, -E or -c is specified
                     after -o.  */
                  int j = i + 1;
                  if (p[1] == 0)
@@ -7304,7 +7305,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
     }
 
   if (!combine_inputs && have_c && have_o && lang_n_infiles > 1)
-   fatal ("cannot specify -o with -c or -S with multiple files");
+   fatal ("cannot specify -o with -c, -S or -E with multiple files");
 
   if (combine_flag && save_temps_flag)
     {