OSDN Git Service

* config/alpha/osf.h (ASM_OUTPUT_WEAK_ALIAS, ASM_WEAKEN_LABEL,
[pf3gnuchains/gcc-fork.git] / gcc / config / alpha / osf.h
index 7f49585..250974c 100644 (file)
@@ -57,15 +57,20 @@ Boston, MA 02111-1307, USA.  */
 
 /* Pass "-G 8" to ld because Alpha's CC does.  Pass -O3 if we are
    optimizing, -O1 if we are not.  Pass -shared, -non_shared or
-   -call_shared as appropriate.  Also pass -pg.  */
+   -call_shared as appropriate.  Pass -hidden_symbol so that our
+   constructor and call-frame data structures are not accidentally
+   overridden.  */
 #define LINK_SPEC  \
   "-G 8 %{O*:-O3} %{!O*:-O1} %{static:-non_shared} \
-   %{!static:%{shared:-shared} %{!shared:-call_shared}} %{pg} %{taso} \
-   %{rpath*}"
+   %{!static:%{shared:-shared -hidden_symbol _GLOBAL_*} \
+   %{!shared:-call_shared}} %{pg} %{taso} %{rpath*}"
 
 #define STARTFILE_SPEC  \
   "%{!shared:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}"
 
+#define ENDFILE_SPEC \
+  "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s}"
+
 #define MD_STARTFILE_PREFIX "/usr/lib/cmplrs/cc/"
 
 #define ASM_FILE_START(FILE)                                   \
@@ -181,3 +186,26 @@ __enable_execute_stack (addr)                                              \
   (TARGET_GAS                                                               \
    ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4) \
    : DW_EH_PE_aligned)
+
+/* This is how we tell the assembler that a symbol is weak.  */
+
+#define ASM_OUTPUT_WEAK_ALIAS(FILE, NAME, VALUE)       \
+  do                                                   \
+    {                                                  \
+      ASM_GLOBALIZE_LABEL (FILE, NAME);                        \
+      fputs ("\t.weakext\t", FILE);                    \
+      assemble_name (FILE, NAME);                      \
+      if (VALUE)                                       \
+        {                                              \
+          fputc (' ', FILE);                           \
+          assemble_name (FILE, VALUE);                 \
+        }                                              \
+      fputc ('\n', FILE);                              \
+    }                                                  \
+  while (0)
+
+#define ASM_WEAKEN_LABEL(FILE, NAME) ASM_OUTPUT_WEAK_ALIAS(FILE, NAME, 0)
+
+/* Handle #pragma weak and #pragma pack.  */
+#undef HANDLE_SYSV_PRAGMA
+#define HANDLE_SYSV_PRAGMA 1