This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Explicitly pass --64 to assembler on AMD64 targets


Daniel Jacobowitz wrote:
On Mon, Jun 13, 2005 at 12:56:36PM -0700, Richard Henderson wrote:

On Mon, Jun 13, 2005 at 11:16:04AM -0700, Mark Mitchell wrote:

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

Well, this is the only way this patch applies, because...



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.

... this one isn't true. You won't get "--64" emitted from just "gcc z.c", only from "gcc -m64 z.c". Unless I'm missing something?


Right, I assume Mark meant "if you try to use foo-gcc -m64 with a
32-bit assembler".

Right.


That said, I guess I don't have a problem with this patch.

How would you feel about a patch that made us always pass --64 as appropriate, at least if the assembler in question is gas? I periodically bootstrap on a 64-bit kernel with a 32-bit root FS. But the assembler and linker are biarch, and the 64-bit libs are installed, so it's just the defaults that are wrong. If we were explicit, an x86_64-linux compiler would Just Work.

Which would be nice since that's what config.guess says to build :-)

I checked in the version RTH originally approved, after testing on x86_64-unknown-linux-gnu.


I would be in favor of making the mode always explicit, as you suggest -- but I would prefer that we not embed the assumption that the default mode is 64-bit mode in x86-64.h so that we can continue to use that file for 32-bit default compilers. (Perhaps it could go in biarch64.h, which assumes 64-bit mode to be the default already?) Or, at least, make it easy for a 32-bit default to override x86-64.h.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]