110d565efSmrg /* Definitions of target machine for GNU compiler, 210d565efSmrg for IBM RS/6000 POWER running AIX V5. 3*c7a68eb7Smrg Copyright (C) 2001-2018 Free Software Foundation, Inc. 410d565efSmrg Contributed by David Edelsohn (edelsohn@gnu.org). 510d565efSmrg 610d565efSmrg This file is part of GCC. 710d565efSmrg 810d565efSmrg GCC is free software; you can redistribute it and/or modify it 910d565efSmrg under the terms of the GNU General Public License as published 1010d565efSmrg by the Free Software Foundation; either version 3, or (at your 1110d565efSmrg option) any later version. 1210d565efSmrg 1310d565efSmrg GCC is distributed in the hope that it will be useful, but WITHOUT 1410d565efSmrg ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 1510d565efSmrg or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 1610d565efSmrg License for more details. 1710d565efSmrg 1810d565efSmrg You should have received a copy of the GNU General Public License 1910d565efSmrg along with GCC; see the file COPYING3. If not see 2010d565efSmrg <http://www.gnu.org/licenses/>. */ 2110d565efSmrg 2210d565efSmrg /* The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to 2310d565efSmrg get control in TARGET_OPTION_OVERRIDE. */ 2410d565efSmrg 2510d565efSmrg #define SUBTARGET_OVERRIDE_OPTIONS \ 2610d565efSmrg do { \ 2710d565efSmrg if (TARGET_64BIT && ! TARGET_POWERPC64) \ 2810d565efSmrg { \ 2910d565efSmrg rs6000_isa_flags |= OPTION_MASK_POWERPC64; \ 3010d565efSmrg warning (0, "-maix64 requires PowerPC64 architecture remain enabled"); \ 3110d565efSmrg } \ 3210d565efSmrg if (TARGET_POWERPC64 && ! TARGET_64BIT) \ 3310d565efSmrg { \ 3410d565efSmrg error ("-maix64 required: 64-bit computation with 32-bit addressing not yet supported"); \ 3510d565efSmrg } \ 36*c7a68eb7Smrg } while (0) 3710d565efSmrg 3810d565efSmrg #undef ASM_SPEC 3910d565efSmrg #define ASM_SPEC "-u %{maix64:-a64 %{!mcpu*:-mppc64}} %(asm_cpu)" 4010d565efSmrg 4110d565efSmrg /* Common ASM definitions used by ASM_SPEC amongst the various targets 4210d565efSmrg for handling -mcpu=xxx switches. */ 4310d565efSmrg #undef ASM_CPU_SPEC 4410d565efSmrg #define ASM_CPU_SPEC \ 4510d565efSmrg "%{!mcpu*: %{!maix64: \ 4610d565efSmrg %{!mpowerpc64: %(asm_default)} \ 4710d565efSmrg %{mpowerpc64: -mppc64}}} \ 4810d565efSmrg %{mcpu=power3: -m620} \ 4910d565efSmrg %{mcpu=power4: -m620} \ 5010d565efSmrg %{mcpu=powerpc: -mppc} \ 5110d565efSmrg %{mcpu=rs64a: -mppc} \ 5210d565efSmrg %{mcpu=601: -m601} \ 5310d565efSmrg %{mcpu=602: -mppc} \ 5410d565efSmrg %{mcpu=603: -m603} \ 5510d565efSmrg %{mcpu=603e: -m603} \ 5610d565efSmrg %{mcpu=604: -m604} \ 5710d565efSmrg %{mcpu=604e: -m604} \ 5810d565efSmrg %{mcpu=620: -m620} \ 5910d565efSmrg %{mcpu=630: -m620} \ 6010d565efSmrg %{mcpu=970: -m620} \ 6110d565efSmrg %{mcpu=G5: -m620}" 6210d565efSmrg 6310d565efSmrg #undef ASM_DEFAULT_SPEC 6410d565efSmrg #define ASM_DEFAULT_SPEC "-mppc" 6510d565efSmrg 6610d565efSmrg #undef TARGET_OS_CPP_BUILTINS 6710d565efSmrg #define TARGET_OS_CPP_BUILTINS() \ 6810d565efSmrg do \ 6910d565efSmrg { \ 7010d565efSmrg builtin_define ("_AIX43"); \ 7110d565efSmrg builtin_define ("_AIX51"); \ 7210d565efSmrg TARGET_OS_AIX_CPP_BUILTINS (); \ 7310d565efSmrg } \ 7410d565efSmrg while (0) 7510d565efSmrg 7610d565efSmrg #undef CPP_SPEC 7710d565efSmrg #define CPP_SPEC "%{posix: -D_POSIX_SOURCE} \ 7810d565efSmrg %{ansi: -D_ANSI_C_SOURCE} \ 7910d565efSmrg %{maix64: -D__64BIT__} \ 8010d565efSmrg %{mpe: -I%R/usr/lpp/ppe.poe/include} \ 8110d565efSmrg %{pthread: -D_THREAD_SAFE}" 8210d565efSmrg 8310d565efSmrg /* The GNU C++ standard library requires that these macros be 8410d565efSmrg defined. */ 8510d565efSmrg #undef CPLUSPLUS_CPP_SPEC 8610d565efSmrg #define CPLUSPLUS_CPP_SPEC \ 8710d565efSmrg "-D_ALL_SOURCE \ 8810d565efSmrg %{maix64: -D__64BIT__} \ 8910d565efSmrg %{mpe: -I%R/usr/lpp/ppe.poe/include} \ 9010d565efSmrg %{pthread: -D_THREAD_SAFE}" 9110d565efSmrg 9210d565efSmrg #undef TARGET_DEFAULT 9310d565efSmrg #define TARGET_DEFAULT 0 9410d565efSmrg 9510d565efSmrg #undef PROCESSOR_DEFAULT 9610d565efSmrg #define PROCESSOR_DEFAULT PROCESSOR_PPC604e 9710d565efSmrg 9810d565efSmrg /* AIX does not support Altivec. */ 9910d565efSmrg #undef TARGET_ALTIVEC 10010d565efSmrg #define TARGET_ALTIVEC 0 10110d565efSmrg #undef TARGET_ALTIVEC_ABI 10210d565efSmrg #define TARGET_ALTIVEC_ABI 0 10310d565efSmrg #undef TARGET_EXTRA_BUILTINS 10410d565efSmrg #define TARGET_EXTRA_BUILTINS 0 10510d565efSmrg 10610d565efSmrg 10710d565efSmrg /* Define this macro as a C expression for the initializer of an 10810d565efSmrg array of string to tell the driver program which options are 10910d565efSmrg defaults for this target and thus do not need to be handled 11010d565efSmrg specially when using `MULTILIB_OPTIONS'. 11110d565efSmrg 11210d565efSmrg Do not define this macro if `MULTILIB_OPTIONS' is not defined in 11310d565efSmrg the target makefile fragment or if none of the options listed in 11410d565efSmrg `MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */ 11510d565efSmrg 11610d565efSmrg #undef MULTILIB_DEFAULTS 11710d565efSmrg #define MULTILIB_DEFAULTS { "mcpu=common" } 11810d565efSmrg 11910d565efSmrg #undef LIB_SPEC 12010d565efSmrg #define LIB_SPEC "%{pg:-L%R/lib/profiled -L%R/usr/lib/profiled}\ 12110d565efSmrg %{p:-L%R/lib/profiled -L%R/usr/lib/profiled}\ 12210d565efSmrg %{!maix64:%{!shared:%{g*:-lg}}}\ 12310d565efSmrg %{mpe:-L%R/usr/lpp/ppe.poe/lib -lmpi -lvtd}\ 12410d565efSmrg %{pthread:-lpthreads} -lc" 12510d565efSmrg 12610d565efSmrg #undef LINK_SPEC 12710d565efSmrg #define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro}\ 12810d565efSmrg %{static:-bnso %(link_syscalls) } %{shared:-bM:SRE %{!e:-bnoentry}}\ 12910d565efSmrg %{!maix64:%{!shared:%{g*: %(link_libg) }}} %{maix64:-b64}\ 13010d565efSmrg %{mpe:-binitfini:poe_remote_main}" 13110d565efSmrg 13210d565efSmrg #undef STARTFILE_SPEC 13310d565efSmrg #define STARTFILE_SPEC "%{!shared:\ 13410d565efSmrg %{maix64:%{pg:gcrt0_64%O%s}%{!pg:%{p:mcrt0_64%O%s}%{!p:crt0_64%O%s}}}\ 13510d565efSmrg %{!maix64:\ 13610d565efSmrg %{pthread:%{pg:gcrt0_r%O%s}%{!pg:%{p:mcrt0_r%O%s}%{!p:crt0_r%O%s}}}\ 13710d565efSmrg %{!pthread:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}}}" 13810d565efSmrg 13910d565efSmrg /* AIX V5 typedefs ptrdiff_t as "long" while earlier releases used "int". */ 14010d565efSmrg 14110d565efSmrg #undef PTRDIFF_TYPE 14210d565efSmrg #define PTRDIFF_TYPE "long int" 14310d565efSmrg 14410d565efSmrg /* Type used for wchar_t, as a string used in a declaration. */ 14510d565efSmrg #undef WCHAR_TYPE 14610d565efSmrg #define WCHAR_TYPE (!TARGET_64BIT ? "short unsigned int" : "unsigned int") 14710d565efSmrg 14810d565efSmrg /* Width of wchar_t in bits. */ 14910d565efSmrg #undef WCHAR_TYPE_SIZE 15010d565efSmrg #define WCHAR_TYPE_SIZE (!TARGET_64BIT ? 16 : 32) 15110d565efSmrg 15210d565efSmrg /* AIX 4.2 and above provides initialization and finalization function 15310d565efSmrg support from linker command line. */ 15410d565efSmrg #undef HAS_INIT_SECTION 15510d565efSmrg #define HAS_INIT_SECTION 15610d565efSmrg 15710d565efSmrg #undef LD_INIT_SWITCH 15810d565efSmrg #define LD_INIT_SWITCH "-binitfini" 15910d565efSmrg 16010d565efSmrg /* This target uses the aix64.opt file. */ 16110d565efSmrg #define TARGET_USES_AIX64_OPT 1 16210d565efSmrg 16310d565efSmrg /* This target defines SUPPORTS_WEAK and TARGET_ASM_NAMED_SECTION, 16410d565efSmrg but does not have crtbegin/end. */ 16510d565efSmrg 16610d565efSmrg #define TARGET_AIX_VERSION 51 16710d565efSmrg 16810d565efSmrg #undef TARGET_LIBC_HAS_FUNCTION 16910d565efSmrg #define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function 170