OSDN Git Service

* config/i386/sol2.h (CPLUSPLUS_CPP_SPEC): Define.
[pf3gnuchains/gcc-fork.git] / gcc / config / i386 / sol2.h
index 43c74c3..99f0497 100644 (file)
@@ -1,5 +1,6 @@
 /* Target definitions for GNU compiler for Intel 80386 running Solaris 2
-   Copyright (C) 1993, 1995-8, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+   Free Software Foundation, Inc.
    Contributed by Fred Fish (fnf@cygnus.com).
 
 This file is part of GNU CC.
@@ -57,19 +58,38 @@ Boston, MA 02111-1307, USA.  */
    executed.  This macro forces the assembler to do the padding, since
    it knows what it is doing. */
 
-#define FORCE_INIT_SECTION_ALIGN asm (ALIGN_ASM_OP ## " 16")
+#define FORCE_INIT_SECTION_ALIGN asm (ALIGN_ASM_OP ## "16")
 #define FORCE_FINI_SECTION_ALIGN FORCE_INIT_SECTION_ALIGN
 
+/* Select a format to encode pointers in exception handling data.  CODE
+   is 0 for data, 1 for code labels, 2 for function pointers.  GLOBAL is
+   true if the symbol may be affected by dynamic relocations.  */
+#undef ASM_PREFERRED_EH_DATA_FORMAT
+#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)                      \
+  (flag_pic ? (GLOBAL ? DW_EH_PE_indirect : 0) | DW_EH_PE_datarel      \
+   : DW_EH_PE_absptr)
+
 /* Add "sun" to the list of symbols defined for SVR4.  */
 #undef CPP_PREDEFINES
 #define CPP_PREDEFINES \
-  "-Dunix -D__svr4__ -D__SVR4 -Dsun -Asystem(svr4)"
+  "-Dunix -D__svr4__ -D__SVR4 -Dsun -Asystem=svr4"
 
+/* Solaris 2/Intel as chokes on #line directives.  */
 #undef CPP_SPEC
-#define CPP_SPEC "%(cpp_cpu) \
-  %{pthreads:-D_REENTRANT -D_PTHREADS} \
-  %{!pthreads:%{threads:-D_REENTRANT -D_SOLARIS_THREADS}} \
-  %{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude}"
+#define CPP_SPEC \
+  "%{.S:-P} \
+   %(cpp_cpu) \
+   %{pthreads:-D_REENTRANT -D_PTHREADS} \
+   %{!pthreads:%{threads:-D_REENTRANT -D_SOLARIS_THREADS}} \
+   %{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude}"
+
+/* For C++ we need to add some additional macro definitions required
+   by the C++ standard library.  */
+#define CPLUSPLUS_CPP_SPEC "\
+-D_XOPEN_SOURCE=500 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 \
+-D__EXTENSIONS__ \
+%(cpp) \
+"
 
 #undef LIB_SPEC
 #define LIB_SPEC \
@@ -126,7 +146,7 @@ Boston, MA 02111-1307, USA.  */
    || (CHAR) == 'h' \
    || (CHAR) == 'z')
 
-#define STDC_0_IN_SYSTEM_HEADERS
+#define STDC_0_IN_SYSTEM_HEADERS 1
 
 #undef LOCAL_LABEL_PREFIX
 #define LOCAL_LABEL_PREFIX "."