* config/mips/mips.h (SUBTARGET_ASM_DEBUGGING_SPEC): Move
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 30 May 2003 12:02:45 +0000 (12:02 +0000)
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 30 May 2003 12:02:45 +0000 (12:02 +0000)
-mdebug/-no-mdebug switches ...
(MDEBUG_ASM_SPEC): ... here.
Use only with gas.
(EXTRA_SPECS): Initialize mdebug_asm_spec.

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

gcc/ChangeLog
gcc/config/mips/mips.h

index 3e60d81..0282c04 100644 (file)
@@ -1,3 +1,11 @@
+2003-05-30  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
+
+       * config/mips/mips.h (SUBTARGET_ASM_DEBUGGING_SPEC): Move
+       -mdebug/-no-mdebug switches ...
+       (MDEBUG_ASM_SPEC): ... here.
+       Use only with gas.
+       (EXTRA_SPECS): Initialize mdebug_asm_spec.
+
 2003-05-29  Matt Kraai  <kraai@alumni.cmu.edu>
 
        * gthr-gnat.c: Remove #undef UNUSED.
index 2f1a4ee..bda524f 100644 (file)
@@ -1103,9 +1103,18 @@ extern int mips_abi;
 %{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} \
 %{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3} \
 %{gcoff:-g} %{gcoff0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3} \
-%{!gdwarf*:-mdebug} %{gdwarf*:-no-mdebug}"
+%(mdebug_asm_spec)"
 #endif
 
+/* Beginning with gas 2.13, -mdebug must be passed to correctly handle COFF
+   and stabs debugging info.  */
+#if ((TARGET_CPU_DEFAULT | TARGET_DEFAULT) & MASK_GAS) != 0
+/* GAS */
+#define MDEBUG_ASM_SPEC "%{!gdwarf*:-mdebug} %{gdwarf*:-no-mdebug}"
+#else /* not GAS */
+#define MDEBUG_ASM_SPEC ""
+#endif /* not GAS */
+
 /* SUBTARGET_ASM_SPEC is always passed to the assembler.  It may be
    overridden by subtargets.  */
 
@@ -1234,6 +1243,7 @@ extern int mips_abi;
   { "subtarget_mips_as_asm_spec", SUBTARGET_MIPS_AS_ASM_SPEC },        \
   { "subtarget_asm_optimizing_spec", SUBTARGET_ASM_OPTIMIZING_SPEC },  \
   { "subtarget_asm_debugging_spec", SUBTARGET_ASM_DEBUGGING_SPEC },    \
+  { "mdebug_asm_spec", MDEBUG_ASM_SPEC },                              \
   { "subtarget_asm_spec", SUBTARGET_ASM_SPEC },                                \
   { "asm_abi_default_spec", ASM_ABI_DEFAULT_SPEC },                    \
   { "endian_spec", ENDIAN_SPEC },                                      \