This patch makes x86-64.h pass "--64" to the assembler when compiling
in 64-bit mode.

There are several advantages:

1. For a bi-arch compiler for which 32-bit code is the default, we no
   longer need to override ASM_SPEC.

2. We get earlier failure and better error messages from the assembler
   if the user tries to use a 64-bit compiler with a 32-bit assembler.

OK?

--
Mark Mitchell
CodeSourcery, LLC
[EMAIL PROTECTED]

2005-06-13  Mark Mitchell  <[EMAIL PROTECTED]>

        * config/i386/x86-64.h (ASM_SPEC): Explicitly pass --64 to the
        assembler in 64-bit mode.

Index: gcc/config/i386/x86-64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/x86-64.h,v
retrieving revision 1.9.10.1
diff -c -5 -p -r1.9.10.1 x86-64.h
*** gcc/config/i386/x86-64.h    31 Dec 2003 00:44:22 -0000      1.9.10.1
--- gcc/config/i386/x86-64.h    13 Jun 2005 15:50:35 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 47,57 ****
  #undef CC1_SPEC
  #define CC1_SPEC "%(cc1_cpu) %{profile:-p}"
  
  #undef ASM_SPEC
  #define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} \
!  %{Wa,*:%*} %{m32:--32}"
  
  #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
    asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
  
  /* This is used to align code labels according to Intel recommendations.  */
--- 47,57 ----
  #undef CC1_SPEC
  #define CC1_SPEC "%(cc1_cpu) %{profile:-p}"
  
  #undef ASM_SPEC
  #define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} \
!  %{Wa,*:%*} %{m32:--32} %{m64:--64}"
  
  #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
    asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
  
  /* This is used to align code labels according to Intel recommendations.  */

Reply via email to