diff gcc/config/i386/netware.c @ 36:855418dad1a3

gcc-4.4-20091020
author e075725
date Tue, 22 Dec 2009 21:19:31 +0900
parents a06113de4d67
children f6334be47118
line wrap: on
line diff
--- a/gcc/config/i386/netware.c	Thu Sep 24 13:21:57 2009 +0900
+++ b/gcc/config/i386/netware.c	Tue Dec 22 21:19:31 2009 +0900
@@ -30,6 +30,7 @@
 #include "flags.h"
 #include "tm_p.h"
 #include "toplev.h"
+#include "langhooks.h"
 #include "ggc.h"
 
 /* Return string which is the function name, identified by ID, modified
@@ -179,16 +180,15 @@
 {
   default_encode_section_info (decl, rtl, first);
 
-  if (first
-      && TREE_CODE (decl) == FUNCTION_DECL
+  if (TREE_CODE (decl) == FUNCTION_DECL
       /* Do not change the identifier if a verbatim asmspec
 	 or if stdcall suffix already added.  */
       && *IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)) != '*'
-      && !strchr (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)), '@'))
+      && !strchr (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)), '@')
+      /* FIXME:  Imported stdcall names are not modified by the Ada frontend.
+	 Check and decorate the RTL name now.  */
+      && strcmp (lang_hooks.name, "GNU Ada") == 0)
     {
-      /* FIXME: In Ada, and perhaps other language frontends,
-	 imported stdcall names may not yet have been modified.
-	 Check and do it know.  */
       rtx symbol = XEXP (rtl, 0);
       tree new_id;
       tree old_id = DECL_ASSEMBLER_NAME (decl);
@@ -196,14 +196,7 @@
       gcc_assert (GET_CODE (symbol) == SYMBOL_REF);
 
       if ((new_id = i386_nlm_maybe_mangle_decl_assembler_name (decl, old_id)))
-	{
-	  /* These attributes must be present on first declaration,
-	     change_decl_assembler_name will warn if they are added
-	     later and the decl has been referenced, but duplicate_decls
-	     should catch the mismatch first.  */
-	  change_decl_assembler_name (decl, new_id);
-	  XSTR (symbol, 0) = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
-	}
+	XSTR (symbol, 0) = IDENTIFIER_POINTER (new_id);
     }
 }
 
@@ -233,24 +226,3 @@
     }
   return name;
 }
-
-/* Sometimes certain combinations of command options do not make
-   sense on a particular target machine.  You can define a macro
-   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
-   defined, is executed once just after all the command options have
-   been parsed.
-
-   Don't use this macro to turn on various extra optimizations for
-   `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */
-
-void
-netware_override_options (void)
-{
-  override_options ();
-
-  if (flag_pic)
-    {
-      error ("-fPIC and -fpic are not supported for this target");
-      flag_pic = 0;
-    }
-}