OSDN Git Service

* config/s390/s390.h (TARGET_CPU_CPP_BUILTINS): New macro.
authoruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Jun 2002 15:55:10 +0000 (15:55 +0000)
committeruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Jun 2002 15:55:10 +0000 (15:55 +0000)
* config/s390/linux.h (TARGET_OS_CPP_BUILTINS): New macro.
(CPP_PREDEFINES, CPP_SPEC, CPP_ARCH31_SPEC, CPP_ARCH64_SPEC): Remove.
(EXTRA_SPECS): Remove cpp_arch31 and cpp_arch64.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54586 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/s390/linux.h
gcc/config/s390/s390.h

index 2910d4c..2fffb42 100644 (file)
@@ -1,3 +1,10 @@
+2002-06-13  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * config/s390/s390.h (TARGET_CPU_CPP_BUILTINS): New macro.
+       * config/s390/linux.h (TARGET_OS_CPP_BUILTINS): New macro.
+       (CPP_PREDEFINES, CPP_SPEC, CPP_ARCH31_SPEC, CPP_ARCH64_SPEC): Remove.
+       (EXTRA_SPECS): Remove cpp_arch31 and cpp_arch64.
+
 2002-06-13  Gabriel Dos Reis  <gdr@codesourcery.com>
 
        * tree-inline.c (expand_call_inline): Don' mess with _DECL
@@ -293,8 +300,6 @@ Wed Jun 12 01:50:28 CEST 2002  Jan Hubicka  <jh@suse.cz>
 
        * config/xtensa/t-xtensa (LIBGCC1_TEST, CROSS_LIBGCC1): Delete.
 
-2002-06-11  Ulrich Weigand  <uweigand@de.ibm.com>
-
        * config/s390/s390.c (emit_prologue): gen_store_multiple
        returns an insn now, not a pattern.
 
index 8e411b8..5088465 100644 (file)
@@ -50,19 +50,23 @@ Boston, MA 02111-1307, USA.  */
 
 /* Target specific preprocessor settings.  */
 
-#define CPP_PREDEFINES \
-  "-Dunix -Asystem(unix) -D__gnu_linux__ -Dlinux -Asystem(linux) -D__ELF__ \
-   -Acpu(s390) -Amachine(s390) -D__s390__"
+#define TARGET_OS_CPP_BUILTINS()               \
+  do                                           \
+    {                                          \
+      builtin_define_std ("linux");            \
+      builtin_define_std ("unix");             \
+      builtin_assert ("system=linux");         \
+      builtin_assert ("system=unix");          \
+      builtin_define ("__ELF__");              \
+      builtin_define ("__gnu_linux__");                \
+      if (flag_pic)                            \
+        {                                      \
+          builtin_define ("__PIC__");          \
+          builtin_define ("__pic__");          \
+        }                                      \
+    }                                          \
+  while (0)
 
-#define CPP_ARCH31_SPEC ""
-#define CPP_ARCH64_SPEC "-D__s390x__"
-
-#undef  CPP_SPEC
-#ifdef DEFAULT_TARGET_64BIT
-#define CPP_SPEC "%{!m31:%(cpp_arch64)}"
-#else
-#define CPP_SPEC "%{m64:%(cpp_arch64)}"
-#endif
 
 /* Target specific compiler settings.  */
 
@@ -118,8 +122,6 @@ Boston, MA 02111-1307, USA.  */
    is an initializer with a subgrouping for each command option.  */
 
 #define EXTRA_SPECS \
-  { "cpp_arch31",      CPP_ARCH31_SPEC },      \
-  { "cpp_arch64",      CPP_ARCH64_SPEC },      \
   { "link_arch31",     LINK_ARCH31_SPEC },     \
   { "link_arch64",     LINK_ARCH64_SPEC },     \
 
index 2e342ea..676a57d 100644 (file)
@@ -77,6 +77,17 @@ extern int target_flags;
    been parsed.  */
 #define OVERRIDE_OPTIONS override_options ()
 
+/* Target CPU builtins.  */
+#define TARGET_CPU_CPP_BUILTINS()                      \
+  do                                                   \
+    {                                                  \
+      builtin_assert ("cpu=s390");                     \
+      builtin_assert ("machine=s390");                 \
+      builtin_define ("__s390__");                     \
+      if (TARGET_64BIT)                                        \
+        builtin_define ("__s390x__");                  \
+    }                                                  \
+  while (0)
 
 /* Defines for real.c.  */
 #define IEEE_FLOAT 1