This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
powerpc64-linux asm spec
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 10 Jul 2002 17:36:24 +0930
- Subject: powerpc64-linux asm spec
powerpc gas will soon be able to generate both ELF32 and ELF64,
controlled by -a32 and -a64. See
http://sources.redhat.com/ml/binutils/2002-07/msg00205.html
-a32 and -a64 have been accepted by gas for quite some time to select
xcoff or xcoff64 format, so specifying these options to an older gas
won't cause a problem.
* config/rs6000/linux64.h (ASM_SPEC): Define.
ASM_SPEC was taken from rs6000/sysv4.h, with a number of inappropriate
options removed. (Although I'm not too sure about %{n} and %{T},
what are they??) Note that placing %(asm_cpu) near the end is
deliberate. -mbig and suchlike on current powerpc64-gas, ie. without
the above binutils patch, wrongly select 32 bit assembly mode.
OK for mainline and branch? Tested building powerpc64-linux cross
with both old and new assemblers.
Index: gcc/config/rs6000/linux64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/linux64.h,v
retrieving revision 1.20
diff -u -p -r1.20 linux64.h
--- gcc/config/rs6000/linux64.h 10 Jul 2002 00:33:51 -0000 1.20
+++ gcc/config/rs6000/linux64.h 10 Jul 2002 07:46:48 -0000
@@ -39,6 +39,12 @@ Boston, MA 02111-1307, USA. */
#undef ASM_DEFAULT_SPEC
#define ASM_DEFAULT_SPEC "-mppc64"
+#undef ASM_SPEC
+#define ASM_SPEC "%{.s: %{mregnames} %{mno-regnames}} \
+%{.S: %{mregnames} %{mno-regnames}} \
+%{mlittle} %{mlittle-endian} %{mbig} %{mbig-endian} \
+%{v:-V} %{Qy:} %{!Qn:-Qy} -a64 %(asm_cpu) %{Wa,*:%*}"
+
/* 64-bit PowerPC Linux always has a TOC. */
#undef TARGET_NO_TOC
#define TARGET_NO_TOC 0
--
Alan Modra
IBM OzLabs - Linux Technology Centre