sol2.h (CPLUSPLUS_CPP_SPEC): Define.
authorMark Mitchell <mark@codesourcery.com>
Wed, 16 May 2001 01:11:20 +0000 (01:11 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Wed, 16 May 2001 01:11:20 +0000 (01:11 +0000)
* config/sparc/sol2.h (CPLUSPLUS_CPP_SPEC): Define.

* porting.texi: Correct documentation about handling
_LARRGEFILE_SOURCE and its ilk.
* config/os/solaris/solaris2.5/bits/os_defines.h: Remove
definitions of _XOPEN_SOURCE, _LARGEFILE64_SOURCE, and
__EXTENSIONS__.
* config/os/solaris/solaris2.6/bits/os_defines.h: Likewise.
* config/os/solaris/solaris2.7/bits/os_defines.h: Likewise.

From-SVN: r42125

gcc/ChangeLog
gcc/config/sparc/sol2.h
libstdc++-v3/ChangeLog
libstdc++-v3/config/os/solaris/solaris2.5/bits/os_defines.h
libstdc++-v3/config/os/solaris/solaris2.6/bits/os_defines.h
libstdc++-v3/config/os/solaris/solaris2.7/bits/os_defines.h
libstdc++-v3/porting.texi

index 0ac1f3d36ee04549f8e0410dc9c8bddf567b0598..e1b1c6ab3d8399d4c12b30b11d0437301f7ca14c 100644 (file)
@@ -1,3 +1,7 @@
+2001-05-15  Mark Mitchell  <mark@codesourcery.com>
+
+       * config/sparc/sol2.h (CPLUSPLUS_CPP_SPEC): Define.
+
 2001-05-15  Geoffrey Keating  <geoffk@redhat.com>
 
        * objc/objc-act.c (handle_class_ref): Use rest_of_decl_compilation
index 5075f9a1013db4b03641115d9f2b880bb5a65b2e..bf0466d0499b9d0c36d8651addf9363193e9719f 100644 (file)
@@ -35,6 +35,28 @@ Boston, MA 02111-1307, USA.  */
 %{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__ \
+%{mcypress:} \
+%{msparclite:-D__sparclite__} \
+%{mf930:-D__sparclite__} %{mf934:-D__sparclite__} \
+%{mv8:-D__sparc_v8__} \
+%{msupersparc:-D__supersparc__ -D__sparc_v8__} \
+%{mcpu=sparclet:-D__sparclet__} %{mcpu=tsc701:-D__sparclet__} \
+%{mcpu=sparclite:-D__sparclite__} \
+%{mcpu=f930:-D__sparclite__} %{mcpu=f934:-D__sparclite__} \
+%{mcpu=v8:-D__sparc_v8__} \
+%{mcpu=supersparc:-D__supersparc__ -D__sparc_v8__} \
+%{mcpu=hypersparc:-D__hypersparc__ -D__sparc_v8__} \
+%{mcpu=sparclite86x:-D__sparclite86x__} \
+%{mcpu=v9:-D__sparc_v9__} \
+%{mcpu=ultrasparc:-D__sparc_v9__} \
+%{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:%(cpp_cpu_default)}}}}}}} \
+"
+
 /* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
    It's safe to pass -s always, even if -g is not used. */
 #undef ASM_SPEC
index 6d68629371696583ba7e48cafffe8c09498e5905..c427746f6485e9d050d5782aa3c0b1b2390bbcc1 100644 (file)
@@ -1,3 +1,13 @@
+2001-05-15  Mark Mitchell  <mark@codesourcery.com>
+
+       * porting.texi: Correct documentation about handling
+       _LARRGEFILE_SOURCE and its ilk.
+       * config/os/solaris/solaris2.5/bits/os_defines.h: Remove
+       definitions of _XOPEN_SOURCE, _LARGEFILE64_SOURCE, and 
+       __EXTENSIONS__.
+       * config/os/solaris/solaris2.6/bits/os_defines.h: Likewise.
+       * config/os/solaris/solaris2.7/bits/os_defines.h: Likewise.
+
 2001-05-15  Zack Weinberg  <zackw@stanford.edu>
        
         * testsuite/21_strings/inserters_extractors.cc,
index c947be7c6c86c80cb4c231e589f0a91e45a60b3d..4dd1fa21c4655872d7658a8a49adda379b88dead 100644 (file)
 #ifndef _GLIBCPP_OS_DEFINES
 #  define _GLIBCPP_OS_DEFINES
 
-// Need these to get sane definitions, esp. of 64-bit types and typedefs.
-#define _XOPEN_SOURCE        500
-#define _LARGEFILE64_SOURCE  1
-#define __EXTENSIONS__
-
 /* System-specific #define, typedefs, corrections, etc, go here.  This
    file will come before all others. */
 // These are typedefs which libio assumes are already in place (because
index c947be7c6c86c80cb4c231e589f0a91e45a60b3d..4dd1fa21c4655872d7658a8a49adda379b88dead 100644 (file)
 #ifndef _GLIBCPP_OS_DEFINES
 #  define _GLIBCPP_OS_DEFINES
 
-// Need these to get sane definitions, esp. of 64-bit types and typedefs.
-#define _XOPEN_SOURCE        500
-#define _LARGEFILE64_SOURCE  1
-#define __EXTENSIONS__
-
 /* System-specific #define, typedefs, corrections, etc, go here.  This
    file will come before all others. */
 // These are typedefs which libio assumes are already in place (because
index ec63697886bbd3c56835fe9751cfa77f042ff712..cb0afed3259a6305a5fa531d4fe654e4978d8210 100644 (file)
 #ifndef _GLIBCPP_OS_DEFINES
 #  define _GLIBCPP_OS_DEFINES
 
-// Need these to get sane definitions, esp. of 64-bit types and typedefs.
-#define _XOPEN_SOURCE        500
-#define _LARGEFILE_SOURCE    1
-#define _LARGEFILE64_SOURCE  1
-#define __EXTENSIONS__
-
 // These are typedefs which libio assumes are already in place (because
 // they really are, under Linux).
 #define __off_t     off_t
index 7d421713dc29317f66e3bd121cf4dbb9e3306a15..1315de3bbe52b2ca1a5a5d37967e2c6ee84cc445 100644 (file)
@@ -126,17 +126,20 @@ provide these macros.  Note that this file does not have to include a
 header file that defines @code{off_t}, or the other types; you simply
 have to provide the macros.
 
-In addition, several libstdc++-v3 source files unconditionally define the macro
-@code{_POSIX_SOURCE}.  On many systems, defining this macro causes large
-portions of the C library header files to be eliminated at preprocessing
-time.  Therefore, you may have to @code{#undef} this macro, or define
-other macros (like @code{_LARGEFILE_SOURCE} or @code{__EXTENSIONS__}).
-You won't know what macros to define or undefine at this point; you'll
-have to try compiling the library and seeing what goes wrong.  If you
-see errors about calling functions that have not been declared, look in
-your C library headers to see if the functions are declared there, and
-then figure out what macros you should but in @file{bits/os_defines.h}
-to make these declarations available.
+In addition, several libstdc++-v3 source files unconditionally define
+the macro @code{_POSIX_SOURCE}.  On many systems, defining this macro
+causes large portions of the C library header files to be eliminated
+at preprocessing time.  Therefore, you may have to @code{#undef} this
+macro, or define other macros (like @code{_LARGEFILE_SOURCE} or
+@code{__EXTENSIONS__}).  You won't know what macros to define or
+undefine at this point; you'll have to try compiling the library and
+seeing what goes wrong.  If you see errors about calling functions
+that have not been declared, look in your C library headers to see if
+the functions are declared there, and then figure out what macros you
+need to define.  You will need to add them to the
+@code{CPLUSPLUS_CPP_SPEC} macro in the GCC configuration file for your
+target.  It will not work to simply define these macros in
+@file{os_defines.h}.
 
 Finally, you should bracket the entire file in an include-guard, like
 this: