config.gcc (i[34567]86-*-solaris2*): Add usegas.h to $tm_file if the target assembler...
authorRoger Sayle <roger@eyesopen.com>
Fri, 21 Jul 2006 05:31:33 +0000 (05:31 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Fri, 21 Jul 2006 05:31:33 +0000 (05:31 +0000)
* config.gcc (i[34567]86-*-solaris2*): Add usegas.h to $tm_file
if the target assembler is GNU binutils' gas.
* config/i386/sol2-10.h (ASM_SPEC): Check USE_GAS to determine
whether to pass GNU gas or native as command line options.

From-SVN: r115638

gcc/ChangeLog
gcc/config.gcc
gcc/config/i386/sol2-10.h

index 7163d753157c7dce8aa889332ec5dd5e4b20652f..597e1c14a7ac799be16f0ec4fd69221c59585bca 100644 (file)
@@ -1,3 +1,10 @@
+2006-07-20  Roger Sayle  <roger@eyesopen.com>
+
+       * config.gcc (i[34567]86-*-solaris2*): Add usegas.h to $tm_file
+       if the target assembler is GNU binutils' gas.
+       * config/i386/sol2-10.h (ASM_SPEC): Check USE_GAS to determine
+       whether to pass GNU gas or native as command line options.
+
 2006-07-20  Jason Merrill  <jason@redhat.com>
 
        * tree.c (remove_attribute): New fn.
index 6058972602ffc4793b48409a827a6d0669aa6b6b..058fef7975b1f579f0ad14e871950038c2fb6949 100644 (file)
@@ -1164,6 +1164,9 @@ i[34567]86-*-solaris2*)
        else
                tmake_file="$tmake_file t-slibgcc-sld"
        fi
+       if test x$gas = xyes; then
+               tm_file="usegas.h ${tm_file}"
+       fi
        case ${target} in
        *-*-solaris2.[789] | *-*-solaris2.1[0-9]*)
                tm_file="$tm_file tm-dwarf2.h"
index e120aa1b7622f5a29b5fd556eea9421101931ac5..af51b4cb37682cd8abcdde3c861af7a6ef8d7bc6 100644 (file)
@@ -22,9 +22,17 @@ Boston, MA 02110-1301, USA.  */
 #undef ASM_COMMENT_START
 #define ASM_COMMENT_START "/"
 
+/* binutils' GNU as understands --32 and --64, but the native Solaris
+   assembler requires -xarch=generic or -xarch=generic64 instead.  */
 #undef ASM_SPEC
+#ifdef USE_GAS
 #define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} " \
                 "%{Wa,*:%*} %{m32:--32} %{m64:--64} -s %(asm_cpu)"
+#else
+#define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} " \
+                "%{Wa,*:%*} %{m32:-xarch=generic} %{m64:-xarch=generic64} " \
+                "-s %(asm_cpu)"
+#endif
 
 #undef NO_PROFILE_COUNTERS