aix41.h revision 146895
190075Sobrien/* Definitions of target machine for GNU compiler,
290075Sobrien   for IBM RS/6000 POWER running AIX version 4.1.
3132718Skan   Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003
490075Sobrien   Free Software Foundation, Inc.
590075Sobrien   Contributed by David Edelsohn (edelsohn@gnu.org).
690075Sobrien
7132718Skan   This file is part of GCC.
890075Sobrien
9132718Skan   GCC is free software; you can redistribute it and/or modify it
10132718Skan   under the terms of the GNU General Public License as published
11132718Skan   by the Free Software Foundation; either version 2, or (at your
12132718Skan   option) any later version.
1390075Sobrien
14132718Skan   GCC is distributed in the hope that it will be useful, but WITHOUT
15132718Skan   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16132718Skan   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
17132718Skan   License for more details.
1890075Sobrien
19132718Skan   You should have received a copy of the GNU General Public License
20132718Skan   along with GCC; see the file COPYING.  If not, write to the
21132718Skan   Free Software Foundation, 59 Temple Place - Suite 330, Boston,
22132718Skan   MA 02111-1307, USA.  */
2390075Sobrien
2490075Sobrien#undef  SUBSUBTARGET_SWITCHES
2590075Sobrien#define SUBSUBTARGET_SWITCHES		\
2690075Sobrien  {"pe",		0,					\
2790075Sobrien   N_("Support message passing with the Parallel Environment") },
2890075Sobrien
2990075Sobrien#undef ASM_SPEC
3090075Sobrien#define ASM_SPEC "-u %(asm_cpu)"
3190075Sobrien
3290075Sobrien#undef	ASM_DEFAULT_SPEC
3390075Sobrien#define ASM_DEFAULT_SPEC "-mcom"
3490075Sobrien
35117395Skan#undef TARGET_OS_CPP_BUILTINS
36117395Skan#define TARGET_OS_CPP_BUILTINS()      \
37117395Skan  do                                  \
38117395Skan    {                                 \
39117395Skan      builtin_define ("_IBMR2");      \
40117395Skan      builtin_define ("_POWER");      \
41117395Skan      builtin_define ("_AIX");        \
42117395Skan      builtin_define ("_AIX32");      \
43117395Skan      builtin_define ("_AIX41");      \
44117395Skan      builtin_define ("_LONG_LONG");  \
45117395Skan      builtin_assert ("system=unix"); \
46117395Skan      builtin_assert ("system=aix");  \
47117395Skan    }                                 \
48117395Skan  while (0)
4990075Sobrien
5090075Sobrien#undef CPP_SPEC
5190075Sobrien#define CPP_SPEC "%{posix: -D_POSIX_SOURCE}\
5290075Sobrien   %{ansi: -D_ANSI_C_SOURCE}\
5390075Sobrien   %{mpe: -I/usr/lpp/ppe.poe/include}\
54117395Skan   %{pthread: -D_THREAD_SAFE}"
5590075Sobrien
5690075Sobrien#undef TARGET_DEFAULT
5790075Sobrien#define TARGET_DEFAULT MASK_NEW_MNEMONICS
5890075Sobrien
5990075Sobrien#undef PROCESSOR_DEFAULT
6090075Sobrien#define PROCESSOR_DEFAULT PROCESSOR_PPC601
6190075Sobrien
6290075Sobrien/* Define this macro as a C expression for the initializer of an
6390075Sobrien   array of string to tell the driver program which options are
6490075Sobrien   defaults for this target and thus do not need to be handled
6590075Sobrien   specially when using `MULTILIB_OPTIONS'.
6690075Sobrien
6790075Sobrien   Do not define this macro if `MULTILIB_OPTIONS' is not defined in
6890075Sobrien   the target makefile fragment or if none of the options listed in
6990075Sobrien   `MULTILIB_OPTIONS' are set by default.  *Note Target Fragment::.  */
7090075Sobrien
7190075Sobrien#undef	MULTILIB_DEFAULTS
7290075Sobrien#define	MULTILIB_DEFAULTS { "mcpu=common" }
7390075Sobrien
7490075Sobrien#undef LIB_SPEC
7590075Sobrien#define LIB_SPEC "%{pg:-L/lib/profiled -L/usr/lib/profiled}\
7690075Sobrien   %{p:-L/lib/profiled -L/usr/lib/profiled} %{!shared:%{g*:-lg}}\
7790075Sobrien   %{mpe:-L/usr/lpp/ppe.poe/lib -lmpi -lvtd}\
7890075Sobrien   %{pthread: -L/usr/lib/threads -lpthreads -lc_r /usr/lib/libc.a}\
7990075Sobrien   %{!pthread: -lc}"
8090075Sobrien
8190075Sobrien#undef LINK_SPEC
8290075Sobrien#define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro} -bnodelcsect\
8390075Sobrien   %{static:-bnso %(link_syscalls) } %{!shared: %{g*: %(link_libg) }}\
8490075Sobrien   %{shared:-bM:SRE %{!e:-bnoentry}}"
8590075Sobrien
8690075Sobrien#undef STARTFILE_SPEC
8790075Sobrien#define STARTFILE_SPEC "%{!shared:\
8890075Sobrien   %{mpe:%{pg:/usr/lpp/ppe.poe/lib/gcrt0.o}\
8990075Sobrien         %{!pg:%{p:/usr/lpp/ppe.poe/lib/mcrt0.o}\
9090075Sobrien               %{!p:/usr/lpp/ppe.poe/lib/crt0.o}}}\
9190075Sobrien   %{!mpe:\
9290075Sobrien     %{pthread:%{pg:gcrt0_r%O%s}%{!pg:%{p:mcrt0_r%O%s}%{!p:crt0_r%O%s}}}\
9390075Sobrien     %{!pthread:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}}}"
9490075Sobrien
9590075Sobrien/* AIX 4 uses PowerPC nop (ori 0,0,0) instruction as call glue for PowerPC
9690075Sobrien   and "cror 31,31,31" for POWER architecture.  */
9790075Sobrien
9890075Sobrien#undef RS6000_CALL_GLUE
9990075Sobrien#define RS6000_CALL_GLUE "{cror 31,31,31|nop}"
10090075Sobrien
101146895Skan/* The IBM AIX 4.x assembler doesn't support forward references in
102146895Skan   .set directives.  We handle this by deferring the output of .set
103146895Skan   directives to the end of the compilation unit.  */
104146895Skan#define TARGET_DEFERRED_OUTPUT_DEFS(DECL,TARGET) true
105