]> gcc.gnu.org Git - gcc.git/commitdiff
re PR libstdc++/22203 (std::numeric_limits<int>::traps is wrong on PPC)
authorPaolo Carlini <pcarlini@suse.de>
Sat, 5 Nov 2005 09:42:01 +0000 (09:42 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sat, 5 Nov 2005 09:42:01 +0000 (09:42 +0000)
2005-11-05  Paolo Carlini  <pcarlini@suse.de>

PR libstdc++/22203
* include/bits/c++config: Include cpu_defines.h.
* include/Makefile.am: Add cpu_defines.h to host_headers.
* configure.host: Add cpu_defines_dir.
* configure.ac: Use it.
* config/cpu/powerpc/cpu_defines.h: New.
* config/cpu/generic/cpu_defines.h: Likewise.
* configure: Regenerate.
* Makefile.in: Likewise.
* include/Makefile.in: Likewise.
* libmath/Makefile.in: Likewise.
* libsupc++/Makefile.in: Likewise.
* po/Makefile.in: Likewise.
* src/Makefile.in: Likewise.
* testsuite/Makefile.in: Likewise.

From-SVN: r106524

15 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/Makefile.in
libstdc++-v3/config/cpu/generic/cpu_defines.h [new file with mode: 0644]
libstdc++-v3/config/cpu/powerpc/cpu_defines.h [new file with mode: 0644]
libstdc++-v3/configure
libstdc++-v3/configure.ac
libstdc++-v3/configure.host
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/include/bits/c++config
libstdc++-v3/libmath/Makefile.in
libstdc++-v3/libsupc++/Makefile.in
libstdc++-v3/po/Makefile.in
libstdc++-v3/src/Makefile.in
libstdc++-v3/testsuite/Makefile.in

index ab1f558a0327092817956e905402ac18eee962ac..2dfb62d6551a988a08990d4a30183dbea6c9312e 100644 (file)
@@ -1,3 +1,21 @@
+2005-11-05  Paolo Carlini  <pcarlini@suse.de>
+
+       PR libstdc++/22203
+       * include/bits/c++config: Include cpu_defines.h.
+       * include/Makefile.am: Add cpu_defines.h to host_headers.
+       * configure.host: Add cpu_defines_dir.
+       * configure.ac: Use it.
+       * config/cpu/powerpc/cpu_defines.h: New.
+       * config/cpu/generic/cpu_defines.h: Likewise.
+       * configure: Regenerate.
+       * Makefile.in: Likewise.
+       * include/Makefile.in: Likewise.
+       * libmath/Makefile.in: Likewise.
+       * libsupc++/Makefile.in: Likewise.
+       * po/Makefile.in: Likewise.
+       * src/Makefile.in: Likewise.    
+       * testsuite/Makefile.in: Likewise.
+
 2005-11-03  Paolo Carlini  <pcarlini@suse.de>
 
        * include/ext/sso_string_base.h (__sso_string_base<>::_M_swap):
index 8e2b79cf8ba165233479cffa2fb283144cd5e6db..9b73b290eb4209ac07cef34e22f30dfb14a21d46 100644 (file)
@@ -115,6 +115,7 @@ CMONEY_CC = @CMONEY_CC@
 CNUMERIC_CC = @CNUMERIC_CC@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CPU_DEFINES_SRCDIR = @CPU_DEFINES_SRCDIR@
 CSTDIO_H = @CSTDIO_H@
 CTIME_CC = @CTIME_CC@
 CTIME_H = @CTIME_H@
diff --git a/libstdc++-v3/config/cpu/generic/cpu_defines.h b/libstdc++-v3/config/cpu/generic/cpu_defines.h
new file mode 100644 (file)
index 0000000..0fea9bd
--- /dev/null
@@ -0,0 +1,33 @@
+// Specific definitions for generic platforms  -*- C++ -*-
+
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library 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.
+
+// This library 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 this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#ifndef _GLIBCXX_CPU_DEFINES
+#define _GLIBCXX_CPU_DEFINES 1
+
+#endif
diff --git a/libstdc++-v3/config/cpu/powerpc/cpu_defines.h b/libstdc++-v3/config/cpu/powerpc/cpu_defines.h
new file mode 100644 (file)
index 0000000..95cc498
--- /dev/null
@@ -0,0 +1,36 @@
+// Specific definitions for generic platforms  -*- C++ -*-
+
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library 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.
+
+// This library 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 this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#ifndef _GLIBCXX_CPU_DEFINES
+#define _GLIBCXX_CPU_DEFINES 1
+
+// Integer divide instructions don't trap on PowerPC.
+#define __glibcxx_integral_traps false
+
+#endif
index 3e4f1aa34d87f3f39b82bf728133b056bb77b5ad..bcd9c511922531b2f5b13d0035f11a5c26084d38 100755 (executable)
@@ -309,7 +309,7 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libtool_VERSION multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar glibcxx_builddir glibcxx_srcdir toplevel_srcdir CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LN_S AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBTOOL CXXCPP CPPFLAGS enable_shared enable_static GLIBCXX_HOSTED_TRUE GLIBCXX_HOSTED_FALSE GLIBCXX_BUILD_PCH_TRUE GLIBCXX_BUILD_PCH_FALSE glibcxx_PCHFLAGS CSTDIO_H BASIC_FILE_H BASIC_FILE_CC CPP EGREP check_msgfmt glibcxx_MOFILES glibcxx_POFILES glibcxx_localedir USE_NLS CLOCALE_H CMESSAGES_H CCODECVT_CC CCOLLATE_CC CCTYPE_CC CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_H CTIME_CC CLOCALE_CC CLOCALE_INTERNAL_H ALLOCATOR_H ALLOCATOR_NAME C_INCLUDE_DIR GLIBCXX_C_HEADERS_C_TRUE GLIBCXX_C_HEADERS_C_FALSE GLIBCXX_C_HEADERS_C_STD_TRUE GLIBCXX_C_HEADERS_C_STD_FALSE GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE DEBUG_FLAGS GLIBCXX_BUILD_DEBUG_TRUE GLIBCXX_BUILD_DEBUG_FALSE EXTRA_CXX_FLAGS glibcxx_thread_h WERROR SECTION_FLAGS SECTION_LDFLAGS OPT_LDFLAGS LIBMATHOBJS LIBICONV SYMVER_MAP port_specific_symbol_files ENABLE_SYMVERS_GNU_TRUE ENABLE_SYMVERS_GNU_FALSE ENABLE_SYMVERS_DARWIN_EXPORT_TRUE ENABLE_SYMVERS_DARWIN_EXPORT_FALSE baseline_dir ATOMICITY_SRCDIR ATOMIC_WORD_SRCDIR ABI_TWEAKS_SRCDIR OS_INC_SRCDIR glibcxx_prefixdir gxx_include_dir glibcxx_toolexecdir glibcxx_toolexeclibdir GLIBCXX_INCLUDES TOPLEVEL_INCLUDES OPTIMIZE_CXXFLAGS WARN_FLAGS LIBSUPCXX_PICFLAGS LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libtool_VERSION multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar glibcxx_builddir glibcxx_srcdir toplevel_srcdir CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LN_S AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBTOOL CXXCPP CPPFLAGS enable_shared enable_static GLIBCXX_HOSTED_TRUE GLIBCXX_HOSTED_FALSE GLIBCXX_BUILD_PCH_TRUE GLIBCXX_BUILD_PCH_FALSE glibcxx_PCHFLAGS CSTDIO_H BASIC_FILE_H BASIC_FILE_CC CPP EGREP check_msgfmt glibcxx_MOFILES glibcxx_POFILES glibcxx_localedir USE_NLS CLOCALE_H CMESSAGES_H CCODECVT_CC CCOLLATE_CC CCTYPE_CC CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_H CTIME_CC CLOCALE_CC CLOCALE_INTERNAL_H ALLOCATOR_H ALLOCATOR_NAME C_INCLUDE_DIR GLIBCXX_C_HEADERS_C_TRUE GLIBCXX_C_HEADERS_C_FALSE GLIBCXX_C_HEADERS_C_STD_TRUE GLIBCXX_C_HEADERS_C_STD_FALSE GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE DEBUG_FLAGS GLIBCXX_BUILD_DEBUG_TRUE GLIBCXX_BUILD_DEBUG_FALSE EXTRA_CXX_FLAGS glibcxx_thread_h WERROR SECTION_FLAGS SECTION_LDFLAGS OPT_LDFLAGS LIBMATHOBJS LIBICONV SYMVER_MAP port_specific_symbol_files ENABLE_SYMVERS_GNU_TRUE ENABLE_SYMVERS_GNU_FALSE ENABLE_SYMVERS_DARWIN_EXPORT_TRUE ENABLE_SYMVERS_DARWIN_EXPORT_FALSE baseline_dir ATOMICITY_SRCDIR ATOMIC_WORD_SRCDIR CPU_DEFINES_SRCDIR ABI_TWEAKS_SRCDIR OS_INC_SRCDIR glibcxx_prefixdir gxx_include_dir glibcxx_toolexecdir glibcxx_toolexeclibdir GLIBCXX_INCLUDES TOPLEVEL_INCLUDES OPTIMIZE_CXXFLAGS WARN_FLAGS LIBSUPCXX_PICFLAGS LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -88342,6 +88342,7 @@ done
 # Propagate the target-specific source directories through the build chain.
 ATOMICITY_SRCDIR=config/${atomicity_dir}
 ATOMIC_WORD_SRCDIR=config/${atomic_word_dir}
+CPU_DEFINES_SRCDIR=config/${cpu_defines_dir}
 OS_INC_SRCDIR=config/${os_include_dir}
 ABI_TWEAKS_SRCDIR=config/${abi_tweaks_dir}
 
@@ -88349,6 +88350,7 @@ ABI_TWEAKS_SRCDIR=config/${abi_tweaks_dir}
 
 
 
+
 # Determine cross-compile flags and AM_CONDITIONALs.
 #AC_SUBST(GLIBCXX_IS_NATIVE)
 #AM_CONDITIONAL(CANADIAN, test $CANADIAN = yes)
@@ -89472,6 +89474,7 @@ s,@ENABLE_SYMVERS_DARWIN_EXPORT_FALSE@,$ENABLE_SYMVERS_DARWIN_EXPORT_FALSE,;t t
 s,@baseline_dir@,$baseline_dir,;t t
 s,@ATOMICITY_SRCDIR@,$ATOMICITY_SRCDIR,;t t
 s,@ATOMIC_WORD_SRCDIR@,$ATOMIC_WORD_SRCDIR,;t t
+s,@CPU_DEFINES_SRCDIR@,$CPU_DEFINES_SRCDIR,;t t
 s,@ABI_TWEAKS_SRCDIR@,$ABI_TWEAKS_SRCDIR,;t t
 s,@OS_INC_SRCDIR@,$OS_INC_SRCDIR,;t t
 s,@glibcxx_prefixdir@,$glibcxx_prefixdir,;t t
index fc31bc68b6e267ea96f0a6f5d0ec875056b7e0b9..986c0ef39faa2b2d912703755c1ac297dfbc6008 100644 (file)
@@ -284,10 +284,12 @@ GLIBCXX_CONFIGURE_TESTSUITE
 # Propagate the target-specific source directories through the build chain.
 ATOMICITY_SRCDIR=config/${atomicity_dir}
 ATOMIC_WORD_SRCDIR=config/${atomic_word_dir}
+CPU_DEFINES_SRCDIR=config/${cpu_defines_dir}
 OS_INC_SRCDIR=config/${os_include_dir}
 ABI_TWEAKS_SRCDIR=config/${abi_tweaks_dir}
 AC_SUBST(ATOMICITY_SRCDIR)
 AC_SUBST(ATOMIC_WORD_SRCDIR)
+AC_SUBST(CPU_DEFINES_SRCDIR)
 AC_SUBST(ABI_TWEAKS_SRCDIR)
 AC_SUBST(OS_INC_SRCDIR)
 
index d12e964bddbdde1fe21b1c2a88f443543cf9cd78..f7a710911112e37a846b1b2b814aa6f4cea8c597 100644 (file)
@@ -39,6 +39,9 @@
 #   atomic_word_dir        location of atomic_word.h
 #                          defaults to generic.
 #
+#   cpu_defines_dir        location of cpu_defines.h
+#                          defaults to generic.
+#
 # It possibly modifies the following variables:
 #
 #   OPT_LDFLAGS            extra flags to pass when linking the library, of
@@ -64,6 +67,7 @@
 c_model=c_std
 c_compatibility=no
 atomic_word_dir=cpu/generic
+cpu_defines_dir=cpu/generic
 
 # HOST-SPECIFIC OVERRIDES
 # Set any CPU-dependent bits.
@@ -123,6 +127,14 @@ case "${host_cpu}" in
     ;;
 esac
 
+# Set specific CPU overrides for cpu_defines_dir. Most can just use generic.
+# THIS TABLE IS SORTED.  KEEP IT THAT WAY.
+case "${host_cpu}" in
+  powerpc*)
+    cpu_defines_dir=cpu/powerpc
+    ;;
+esac
+
 # Now look for the file(s) usually tied to a CPU model, and make
 # default choices for those if they haven't been explicitly set
 # already.  
index ed39973ee3a600b77f1baf2428c641ea18388c33..0120543646bf3f0e184bb63ae6466a578f442e4a 100644 (file)
@@ -618,7 +618,8 @@ host_headers = \
        ${host_srcdir}/ctype_noninline.h \
        ${host_srcdir}/os_defines.h \
        ${glibcxx_srcdir}/$(ATOMIC_WORD_SRCDIR)/atomic_word.h \
-       ${glibcxx_srcdir}/$(ABI_TWEAKS_SRCDIR)/cxxabi_tweaks.h
+       ${glibcxx_srcdir}/$(ABI_TWEAKS_SRCDIR)/cxxabi_tweaks.h \
+       ${glibcxx_srcdir}/$(CPU_DEFINES_SRCDIR)/cpu_defines.h   
 
 # Non-installed host_header files.
 COMPATIBILITY_H = config/abi/compatibility.h
index 7b8b7e7679dc294560d20554b0ebe6225aa670f4..cfdfdf2283eb49eaa945b2f9d069bd203f2b1b3f 100644 (file)
@@ -83,6 +83,7 @@ CMONEY_CC = @CMONEY_CC@
 CNUMERIC_CC = @CNUMERIC_CC@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CPU_DEFINES_SRCDIR = @CPU_DEFINES_SRCDIR@
 CSTDIO_H = @CSTDIO_H@
 CTIME_CC = @CTIME_CC@
 CTIME_H = @CTIME_H@
@@ -826,7 +827,8 @@ host_headers = \
        ${host_srcdir}/ctype_noninline.h \
        ${host_srcdir}/os_defines.h \
        ${glibcxx_srcdir}/$(ATOMIC_WORD_SRCDIR)/atomic_word.h \
-       ${glibcxx_srcdir}/$(ABI_TWEAKS_SRCDIR)/cxxabi_tweaks.h
+       ${glibcxx_srcdir}/$(ABI_TWEAKS_SRCDIR)/cxxabi_tweaks.h \
+       ${glibcxx_srcdir}/$(CPU_DEFINES_SRCDIR)/cpu_defines.h   
 
 
 # Non-installed host_header files.
index 75b7236964d603ca9e8b20f9e7ac7dd66820a255..eb8dc798f0b4727eb273215b8d00372252ab5135 100644 (file)
@@ -34,6 +34,9 @@
 // Pick up any OS-specific definitions.
 #include <bits/os_defines.h>
 
+// Pick up any CPU-specific definitions.
+#include <bits/cpu_defines.h>
+
 // Debug mode support. Debug mode basic_string is not allowed to be
 // associated with std, because of locale and exception link
 // dependence.
index 5b2637773de0ef40c31f760bef6a6f45d155fc52..af3d6c1fc7c5676e17dab23b367f3a7ca7c41b1a 100644 (file)
@@ -98,6 +98,7 @@ CMONEY_CC = @CMONEY_CC@
 CNUMERIC_CC = @CNUMERIC_CC@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CPU_DEFINES_SRCDIR = @CPU_DEFINES_SRCDIR@
 CSTDIO_H = @CSTDIO_H@
 CTIME_CC = @CTIME_CC@
 CTIME_H = @CTIME_H@
index 6c6eebf616bf30e560bd107c0022c31d5cc5c193..44d57cc2e4c8f54d14eb85f98c8ceefbc3b46d42 100644 (file)
@@ -139,6 +139,7 @@ CMONEY_CC = @CMONEY_CC@
 CNUMERIC_CC = @CNUMERIC_CC@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CPU_DEFINES_SRCDIR = @CPU_DEFINES_SRCDIR@
 CSTDIO_H = @CSTDIO_H@
 CTIME_CC = @CTIME_CC@
 CTIME_H = @CTIME_H@
index 766eec77e258b1bcf4574978d4328049537f2d7e..6252acf03621874fcdf082acaefeb6abb703c6b0 100644 (file)
@@ -83,6 +83,7 @@ CMONEY_CC = @CMONEY_CC@
 CNUMERIC_CC = @CNUMERIC_CC@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CPU_DEFINES_SRCDIR = @CPU_DEFINES_SRCDIR@
 CSTDIO_H = @CSTDIO_H@
 CTIME_CC = @CTIME_CC@
 CTIME_H = @CTIME_H@
index 44811e88d03db1392ce25fa1f80d0ab47aa42727..84207702b36147b8a65ac7ba708579952272ecae 100644 (file)
@@ -117,6 +117,7 @@ CMONEY_CC = @CMONEY_CC@
 CNUMERIC_CC = @CNUMERIC_CC@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CPU_DEFINES_SRCDIR = @CPU_DEFINES_SRCDIR@
 CSTDIO_H = @CSTDIO_H@
 CTIME_CC = @CTIME_CC@
 CTIME_H = @CTIME_H@
index 168f2074f373d1daf014db7874bd4d6e20e9f3df..dcfb5f8069607d90a2fcc48e8e4b2ffabf320545 100644 (file)
@@ -87,6 +87,7 @@ CMONEY_CC = @CMONEY_CC@
 CNUMERIC_CC = @CNUMERIC_CC@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CPU_DEFINES_SRCDIR = @CPU_DEFINES_SRCDIR@
 CSTDIO_H = @CSTDIO_H@
 CTIME_CC = @CTIME_CC@
 CTIME_H = @CTIME_H@
This page took 0.081357 seconds and 5 git commands to generate.