aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormmitchel <>2007-05-09 04:21:36 +0000
committermmitchel <>2007-05-09 04:21:36 +0000
commit14e1d8d7829694c604cbf8661f5818d81ab60978 (patch)
treefbbbc42d50b1443261a77091b9a93eeb544cce2e
parent7ad9bd42ee3db9ca2c30f9700bdb23b03193e194 (diff)
* libstdc++-v3/libsupc++/cxxabi.h (_GLIBCXX_NOTHROW): New macro.
(__cxa_atexit): Use it. * testsuite/lib/libstdc++.exp (v3_target_compile_as_c): For installed-tree testing, search more include directories.
-rw-r--r--libstdc++-v3/ChangeLog12
-rw-r--r--libstdc++-v3/libsupc++/cxxabi.h12
-rw-r--r--libstdc++-v3/testsuite/lib/libstdc++.exp10
3 files changed, 29 insertions, 5 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index a7f62f99ed6..2e8282eba07 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,11 @@
+2007-05-07 Mark Mitchell <mark@codesourcery.com>
+
+ * libstdc++-v3/libsupc++/cxxabi.h (_GLIBCXX_NOTHROW): New macro.
+ (__cxa_atexit): Use it.
+
+ * testsuite/lib/libstdc++.exp (v3_target_compile_as_c): For
+ installed-tree testing, search more include directories.
+
2007-05-08 Benjamin Kosnik <bkoz@redhat.com>
* include/std/type_traits (make_signed): Remove specializations
@@ -94,8 +102,12 @@
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Likewise.
+>>>>>>> .r124554
2007-05-07 Mark Mitchell <mark@codesourcery.com>
+ * testsuite/lib/libstdc++.exp (v3_target_compile_as_c): For
+ installed-tree testing, search more include directories.
+
* testsuite/22_locale/num_put/put/char/14220.cc: XFAIL on Solaris
2.10.
* testsuite/22_locale/num_put/put/wchar_t/14220.cc: Likewise.
diff --git a/libstdc++-v3/libsupc++/cxxabi.h b/libstdc++-v3/libsupc++/cxxabi.h
index 7f0307834d3..d75515e07c4 100644
--- a/libstdc++-v3/libsupc++/cxxabi.h
+++ b/libstdc++-v3/libsupc++/cxxabi.h
@@ -53,6 +53,12 @@
#include <cxxabi-forced.h>
#ifdef __cplusplus
+#define _GLIBCXX_NOTHROW throw()
+#else
+#define _GLIBCXX_NOTHROW __attribute__((nothrow))
+#endif
+
+#ifdef __cplusplus
namespace __cxxabiv1
{
extern "C"
@@ -137,11 +143,7 @@ namespace __cxxabiv1
// DSO destruction.
int
- __cxa_atexit(void (*)(void*), void*, void*)
-#ifdef __cplusplus
- throw ()
-#endif
- ;
+ __cxa_atexit(void (*)(void*), void*, void*) _GLIBCXX_NOTHROW;
int
__cxa_finalize(void*);
diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index b990f46bed5..7a27ad1977d 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -398,6 +398,9 @@ proc v3_target_compile_as_c { source dest type options } {
# the includes variable is not likely to include the necessary
# info.
if { ![file exists $flags_file] } {
+ # ??? We need a --print-include-dirs option to GCC, so that
+ # we can avoid these hacks. The heuristics here will not
+ # work with non-standard --with-includedir= options.
set version [remote_exec host ${cc} -dumpversion]
# Remove the trailing newline from the output.
set version [string trimright [lindex $version 1]]
@@ -406,6 +409,13 @@ proc v3_target_compile_as_c { source dest type options } {
set comp_base_dir [remote_exec host ${cc} --print-prog-name=cc1]
set comp_base_dir [lindex $comp_base_dir 1]
set comp_base_dir [file dirname [file dirname [file dirname [file dirname [file dirname $comp_base_dir]]]]]
+ # For a cross compiler, the header files will be located in a
+ # machine-specific subdirectory.
+ set crossbase "${comp_base_dir}/${machine}/include/c++/${version}"
+ set crosstarget "${crossbase}/${machine}"
+ set cc_final [concat $cc_final "-I$crossbase -I$crosstarget"]
+ # For a native compiler, the header files will be located at
+ # the top level.
set includesbase "${comp_base_dir}/include/c++/${version}"
set includestarget "${includesbase}/${machine}"
set cc_final [concat $cc_final "-I$includesbase -I$includestarget"]