(ASM_SPEC): If GNU as is the default, then pass -g to the assembler if -malpha-as.
authorRichard Kenner <kenner@gcc.gnu.org>
Thu, 19 Oct 1995 23:01:42 +0000 (19:01 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Thu, 19 Oct 1995 23:01:42 +0000 (19:01 -0400)
(ASM_SPEC): If GNU as is the default, then pass -g to the assembler if
-malpha-as.  If GNU as is not the default, then pass -g to the
assembler is not -mgas.

From-SVN: r10478

gcc/config/alpha/alpha.h

index 27ccb5088fd0b3fd92409c9b00f85502d19d8e62..d8ace7abfd318dd2d3e8e57857b07254a3b1c3c8 100644 (file)
@@ -42,15 +42,6 @@ Boston, MA 02111-1307, USA.  */
 
 #define SIGNED_CHAR_SPEC "%{funsigned-char:-D__CHAR_UNSIGNED__}"
 
-/* No point in running CPP on our assembler output.  */
-/* In OSF/1 v3.2c, the assembler by default does not output file names which
-   causes mips-tfile to fail.  Passing -g to the assembler fixes this problem.
-   ??? Stricly speaking, we only need -g if the user specifies -g.  Passing
-   it always means that we get slightly larger than necessary object files
-   if the user does not specify -g.  If we don't pass -g, then mips-tfile
-   will need to be fixed to work in this case.  */
-#define ASM_SPEC "-g -nocpp %{pg}"
-
 /* Under OSF/1, -p and -pg require -lprof1.  */
 
 #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} %{a:-lprof2} -lc"
@@ -2022,6 +2013,20 @@ do {                                                     \
 
 #define PUT_SDB_EPILOGUE_END(NAME)
 
+/* No point in running CPP on our assembler output.  */
+#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GAS) != 0
+/* Don't pass -g to GNU as, because some versions don't accept this option.  */
+#define ASM_SPEC "%{malpha-as:-g} -nocpp %{pg}"
+#else
+/* In OSF/1 v3.2c, the assembler by default does not output file names which
+   causes mips-tfile to fail.  Passing -g to the assembler fixes this problem.
+   ??? Stricly speaking, we only need -g if the user specifies -g.  Passing
+   it always means that we get slightly larger than necessary object files
+   if the user does not specify -g.  If we don't pass -g, then mips-tfile
+   will need to be fixed to work in this case.  */
+#define ASM_SPEC "%{!mgas:-g} -nocpp %{pg}"
+#endif
+
 /* Specify to run a post-processor, mips-tfile after the assembler
    has run to stuff the ecoff debug information into the object file.
    This is needed because the Alpha assembler provides no way