Is -T meaningful as an assembler option?

Sandra Loosemore sandra@codesourcery.com
Thu Oct 9 19:31:00 GMT 2008


I've been investigating a report that a command like

powerpc-eabi-gcc hello.c -T sim-hosted.ld

gives an assembler error from the -T option.  It works OK if you omit the space 
after -T, and the syntax works with or without spaces on arm-none-eabi, 
mips-sde-elf, and m68k-elf toolchains I've tried.

It looks to me like the problem is that powerpc and a number of other back ends 
are including %{T} in ASM_SPEC.  Is this supposed to be meaningful?  GAS only 
documents -T as an assembler option for VAX, and says it's deprecated.

I've also noted that invoke.texi does not document -T in its normal use as a 
linker option.  It's included in LINK_COMMAND_SPEC in gcc.c, so I assume this is 
the default interpretation for all targets.  It's typically required to specify 
a linker script with -T when building for bare-metal targets, so this seems like 
a fairly critical hole in the manual.

I'm willing to prepare a patch that removes %{T} from all ASM_SPECs and 
documents -T as a linker option, but....

(a) is this the right thing to do?
(b) is this appropriate to submit for stage 3?

-Sandra



More information about the Gcc-patches mailing list