This is the mail archive of the gcc-patches@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: Is -T meaningful as an assembler option?


Hi all,

Sandra Loosemore wrote:
Mark Mitchell wrote:

Yes, I think that's the best plan, but I don't think it's as bad as you
do.  And, there's nothing that says you have to do all targets to make
progress here.  I'd suggest:

1. In config/svr4.h:

* Define SVR4_ASM_SPEC like so:

#ifndef USE_GAS
#define SVR4_ASM_SPEC <its current value>
#else
#define SVR4_ASM_SPEC <its current value without -T>

* Define ASM_SPEC to SVR4_ASM_SPEC

2. In config/rs6000/sysv4.h, in the midst of the big string, do:

#define ASM_SPEC "%(asm_cpu) \

%{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}} " \
  SVR4_ASM_SPEC \
 "%{mrelocatable} %{mrelocatable-lib} %{fpic|fpie|fPIC|fPIE:-K PIC}
  ..."

This is backwards-compatible in that configurations including
config/svr4.h still work as before -- except that they no longer pass -T
to GAS, which is good, since that doesn't work.  The Power bug is then
fixed.  Other configurations using config/svr4.h that are overriding
ASM_SPEC can, if they want, update to use SVR4_ASM_SPEC as above to
avoid code duplication.

OK, the attached patch does that. I've also removed some other options that don't make sense for GAS, and added a blurb about -T to invoke.texi.


OK to commit? I regression-tested the patch on a 4.3 powerpc-eabi configuration but was unable to get the same configuration (without the patch) to build at all from mainline head. It's getting an unrecognizable insn error while building libgcc; I don't really have the time or target-specific knowledge to track that down right now. :-(

This patch breaks those powerpc targets which do not include svr4.h, namely powerpc*-*-freebsd*, powerpc-*-netbsd* and powerpc-*-lynxos*.


Is the patchlet below ok to commit? At least on freebsd it compiles through.

Thanks,
Andreas


Index: config/rs6000/sysv4.h =================================================================== --- config/rs6000/sysv4.h (revision 141817) +++ config/rs6000/sysv4.h (working copy) @@ -583,6 +583,9 @@

 /* Pass various options to the assembler.  */
 /* Override svr4.h definition.  */
+#indef SVR4_ASM_SPEC
+#define SVR4_ASM_SPEC ""
+#endif
 #undef	ASM_SPEC
 #define	ASM_SPEC "%(asm_cpu) \
 %{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}}" \


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