lang-specs.h (objective-c-header): Use .gch not .pch; support -no-integrated-cpp.
authorGeoffrey Keating <geoffk@apple.com>
Fri, 7 Mar 2003 23:10:42 +0000 (23:10 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Fri, 7 Mar 2003 23:10:42 +0000 (23:10 +0000)
* objc/lang-specs.h (objective-c-header): Use .gch not .pch;
support -no-integrated-cpp.

* c-pch.c (get_ident): Use c_language_kind and flag_objc rather
than langhooks.name.

From-SVN: r63955

gcc/ChangeLog
gcc/c-pch.c
gcc/objc/lang-specs.h

index 1debc6929a16991e6de322d717cd5d49e3f707bc..0802120fbfd14f33637e3becb97bfbc88fca1d88 100644 (file)
@@ -1,3 +1,11 @@
+2003-03-07  Geoffrey Keating  <geoffk@apple.com>
+
+       * objc/lang-specs.h (objective-c-header): Use .gch not .pch;
+       support -no-integrated-cpp.
+
+       * c-pch.c (get_ident): Use c_language_kind and flag_objc rather
+       than langhooks.name.
+
 2003-03-07  Michael Matz  <matz@suse.de>
 
        * df.h (enum df_ref_flags.DF_REF_STRIPPED): New.
index 7e67248a325869f540a3bcf7106570bb30dc03c0..d8c6b9e87adf606cab28b7dda52fe7b6481db00b 100644 (file)
@@ -52,14 +52,10 @@ get_ident()
   static const char template[IDENT_LENGTH] = "gpch.010";
   
   memcpy (result, template, IDENT_LENGTH);
-  if (strcmp (lang_hooks.name, "GNU C") == 0)
-    result[4] = 'C';
-  else if (strcmp (lang_hooks.name, "GNU C++") == 0)
-    result[4] = '+';
-  else if (strcmp (lang_hooks.name, "GNU Objective-C") == 0)
-    result[4] = 'o';
-  else if (strcmp (lang_hooks.name, "GNU Objective-C++") == 0)
-    result[4] = 'O';
+  if (c_language == clk_c)
+    result[4] = flag_objc ? 'o' : 'C';
+  else if (c_language == clk_cplusplus)
+    result[4] = flag_objc ? 'O' : '+';
   else
     abort ();
   return result;
index 379547f789e6febaddba094e2a0767ecdaf746fc..0e7a46f5dae31f7ce0bab123a30c0fde1aa90469 100644 (file)
@@ -44,11 +44,11 @@ Boston, MA 02111-1307, USA.  */
       %{!E:%{!M:%{!MM:\
        %{traditional|ftraditional|traditional-cpp:\
 %eGNU Objective C no longer supports traditional compilation}\
-       %{save-temps:cc1obj -E %(cpp_options) %b.mi \n\
+       %{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) %b.mi \n\
            cc1obj -fpreprocessed %b.mi %(cc1_options) %{gen-decls}\
-                        -o %g.s %{!o*:--output-pch=%i.pch}\
+                        -o %g.s %{!o*:--output-pch=%i.gch}\
                         %W{o*:--output-pch=%*}%V}\
-       %{!save-temps:\
+       %{!save-temps:%{!no-integrated-cpp:\
            cc1obj %(cpp_unique_options) %(cc1_options) %{gen-decls}\
-                        -o %g.s %{!o*:--output-pch=%i.pch}\
-                        %W{o*:--output-pch=%*}%V}}}}", 0},
+                        -o %g.s %{!o*:--output-pch=%i.gch}\
+                        %W{o*:--output-pch=%*}%V}}}}}", 0},