OSDN Git Service

* config/xtensa/linux.h (TARGET_OS_CPP_BUILTINS): Back out previous
[pf3gnuchains/gcc-fork.git] / gcc / config / xtensa / linux.h
index c49bd13..1930bac 100644 (file)
@@ -1,6 +1,6 @@
 /* Xtensa Linux configuration.
    Derived from the configuration for GCC for Intel i386 running Linux.
-   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -19,6 +19,18 @@ along with GCC; see the file COPYING.  If not, write to the Free
 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 02111-1307, USA.  */
 
+#define TARGET_OS_CPP_BUILTINS()                               \
+  do {                                                         \
+    builtin_define_std ("linux");                              \
+    builtin_define_std ("unix");                               \
+    builtin_define ("__ELF__");                                        \
+    builtin_define ("__gnu_linux__");                          \
+    builtin_assert ("system=posix");                           \
+  } while (0)
+
+#undef SUBTARGET_CPP_SPEC
+#define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
+
 #undef TARGET_VERSION
 #define TARGET_VERSION fputs (" (Xtensa GNU/Linux with ELF)", stderr);
 
@@ -33,12 +45,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 #undef ASM_FINAL_SPEC
 
-#undef LIB_SPEC
-#define LIB_SPEC \
-  "%{shared: -lc} \
-   %{!shared: %{pthread:-lpthread} \
-   %{profile:-lc_p} %{!profile: -lc}}"
-
 #undef LINK_SPEC
 #define LINK_SPEC \
  "%{shared:-shared} \
@@ -49,11 +55,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
         %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
       %{static:-static}}}"
 
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES \
- "-D__XTENSA__ -D__ELF__ -Acpu=xtensa -Amachine=xtensa \
-  -Dunix -D__gnu_linux__ -Dlinux -Asystem=posix"
-
 #undef LOCAL_LABEL_PREFIX
 #define LOCAL_LABEL_PREFIX     "."