OSDN Git Service

PR target/36800
[pf3gnuchains/gcc-fork.git] / gcc / config / rs6000 / aix43.h
index 2c8900c..56b24a3 100644 (file)
@@ -1,35 +1,24 @@
 /* Definitions of target machine for GNU compiler,
    for IBM RS/6000 POWER running AIX version 4.3.
-   Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+   2007 Free Software Foundation, Inc.
    Contributed by David Edelsohn (edelsohn@gnu.org).
 
-This file is part of GNU CC.
+   This file is part of GCC.
 
-GNU CC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
+   GCC is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published
+   by the Free Software Foundation; either version 3, or (at your
+   option) any later version.
 
-GNU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
+   GCC is distributed in the hope that it will be useful, but WITHOUT
+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+   License for more details.
 
-You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING.  If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
-
-
-/* AIX 4.3 and above support 64-bit executables.  */
-#undef  SUBSUBTARGET_SWITCHES
-#define SUBSUBTARGET_SWITCHES                                  \
-  {"aix64",            MASK_64BIT | MASK_POWERPC64 | MASK_POWERPC,     \
-   N_("Compile for 64-bit pointers") },                                        \
-  {"aix32",            - (MASK_64BIT | MASK_POWERPC64),                \
-   N_("Compile for 32-bit pointers") },                                        \
-  {"pe",               0,                                              \
-   N_("Support message passing with the Parallel Environment") },
+   You should have received a copy of the GNU General Public License
+   along with GCC; see the file COPYING3.  If not see
+   <http://www.gnu.org/licenses/>.  */
 
 /* Sometimes certain combinations of command options do not make sense
    on a particular target machine.  You can define a macro
@@ -46,12 +35,18 @@ do {                                                                        \
   if (TARGET_64BIT && (target_flags & NON_POWERPC_MASKS))              \
     {                                                                  \
       target_flags &= ~NON_POWERPC_MASKS;                              \
-      warning ("-maix64 and POWER architecture are incompatible");     \
+      warning (0, "-maix64 and POWER architecture are incompatible");  \
     }                                                                  \
   if (TARGET_64BIT && ! TARGET_POWERPC64)                              \
     {                                                                  \
       target_flags |= MASK_POWERPC64;                                  \
-      warning ("-maix64 requires PowerPC64 architecture remain enabled"); \
+      warning (0, "-maix64 requires PowerPC64 architecture remain enabled"); \
+    }                                                                  \
+  if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128)                     \
+    {                                                                  \
+      rs6000_long_double_type_size = 64;                               \
+      if (rs6000_explicit_options.long_double)                         \
+       warning (0, "soft-float and long-double-128 are incompatible"); \
     }                                                                  \
   if (TARGET_POWERPC64 && ! TARGET_64BIT)                              \
     {                                                                  \
@@ -97,19 +92,12 @@ do {                                                                        \
 #define ASM_DEFAULT_SPEC "-mcom"
 
 #undef TARGET_OS_CPP_BUILTINS
-#define TARGET_OS_CPP_BUILTINS()      \
-  do                                  \
-    {                                 \
-      builtin_define ("_IBMR2");      \
-      builtin_define ("_POWER");      \
-      builtin_define ("_AIX");        \
-      builtin_define ("_AIX32");      \
-      builtin_define ("_AIX41");      \
-      builtin_define ("_AIX43");      \
-      builtin_define ("_LONG_LONG");  \
-      builtin_assert ("system=unix"); \
-      builtin_assert ("system=aix");  \
-    }                                 \
+#define TARGET_OS_CPP_BUILTINS()     \
+  do                                 \
+    {                                \
+      builtin_define ("_AIX43");     \
+      TARGET_OS_AIX_CPP_BUILTINS (); \
+    }                                \
   while (0)
 
 #undef CPP_SPEC
@@ -123,10 +111,7 @@ do {                                                                       \
    defined.  */
 #undef CPLUSPLUS_CPP_SPEC                      
 #define CPLUSPLUS_CPP_SPEC                     \
-  "-D_XOPEN_SOURCE=500                         \
-   -D_XOPEN_SOURCE_EXTENDED=1                  \
-   -D_LARGE_FILE_API                           \
-   -D_ALL_SOURCE                               \
+  "-D_ALL_SOURCE                               \
    %{maix64: -D__64BIT__}                      \
    %{mpe: -I/usr/lpp/ppe.poe/include}          \
    %{pthread: -D_THREAD_SAFE}"
@@ -137,6 +122,12 @@ do {                                                                       \
 #undef PROCESSOR_DEFAULT
 #define PROCESSOR_DEFAULT PROCESSOR_PPC604e
 
+/* AIX does not support Altivec.  */
+#undef  TARGET_ALTIVEC
+#define TARGET_ALTIVEC 0
+#undef  TARGET_ALTIVEC_ABI
+#define TARGET_ALTIVEC_ABI 0
+
 /* Define this macro as a C expression for the initializer of an
    array of string to tell the driver program which options are
    defaults for this target and thus do not need to be handled
@@ -188,3 +179,11 @@ do {                                                                       \
 
 #undef LD_INIT_SWITCH
 #define LD_INIT_SWITCH "-binitfini"
+
+/* The IBM AIX 4.x assembler doesn't support forward references in
+   .set directives.  We handle this by deferring the output of .set
+   directives to the end of the compilation unit.  */
+#define TARGET_DEFERRED_OUTPUT_DEFS(DECL,TARGET) true
+
+/* This target uses the aix64.opt file.  */
+#define TARGET_USES_AIX64_OPT 1