From d1fb5e1c0b2c50fce4934f3b604ea263c08ac8a8 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Thu, 22 Feb 2007 04:39:35 +0000 Subject: [PATCH] wrapper.exp (${tool}_maybe_build_wrapper): Allow the caller to set options for compiling testglue. * lib/wrapper.exp (${tool}_maybe_build_wrapper): Allow the caller to set options for compiling testglue. * lib/g++.exp (g++_init): Compile testglue with -fexceptions. * lib/obj-c++.exp (obj-c++_init): Likewise. * testsuite/lib/libstdc++.exp (libstdc++_init): Compile testglue with -fexceptions. From-SVN: r122217 --- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/lib/g++.exp | 2 +- gcc/testsuite/lib/obj-c++.exp | 2 +- gcc/testsuite/lib/wrapper.exp | 11 ++++++++--- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/testsuite/lib/libstdc++.exp | 2 +- 6 files changed, 23 insertions(+), 6 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index acf266dd8d3..282d205d54d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2007-02-21 Mark Mitchell + + * lib/wrapper.exp (${tool}_maybe_build_wrapper): Allow the caller + to set options for compiling testglue. + * lib/g++.exp (g++_init): Compile testglue with -fexceptions. + * lib/obj-c++.exp (obj-c++_init): Likewise. + 2007-02-21 Eric Botcazou * gnat.dg/derived_aggregate.adb: New test. diff --git a/gcc/testsuite/lib/g++.exp b/gcc/testsuite/lib/g++.exp index 700cc5819e9..5e3a09838f6 100644 --- a/gcc/testsuite/lib/g++.exp +++ b/gcc/testsuite/lib/g++.exp @@ -221,7 +221,7 @@ proc g++_init { args } { unset gluefile } - g++_maybe_build_wrapper "${tmpdir}/g++-testglue.o" + g++_maybe_build_wrapper "${tmpdir}/g++-testglue.o" "-fexceptions" if {![info exists CXXFLAGS]} { set CXXFLAGS "" diff --git a/gcc/testsuite/lib/obj-c++.exp b/gcc/testsuite/lib/obj-c++.exp index 8913b319283..3927e76c0f8 100644 --- a/gcc/testsuite/lib/obj-c++.exp +++ b/gcc/testsuite/lib/obj-c++.exp @@ -239,7 +239,7 @@ proc obj-c++_init { args } { unset gluefile } - obj-c++_maybe_build_wrapper "${tmpdir}/obj-c++-testglue.o" + obj-c++_maybe_build_wrapper "${tmpdir}/obj-c++-testglue.o" "-fexceptions" set ALWAYS_OBJCXXFLAGS "" diff --git a/gcc/testsuite/lib/wrapper.exp b/gcc/testsuite/lib/wrapper.exp index 48c31e68ebe..c61a21d7021 100644 --- a/gcc/testsuite/lib/wrapper.exp +++ b/gcc/testsuite/lib/wrapper.exp @@ -16,20 +16,25 @@ # This file contains GCC-specifics for status wrappers for test programs. -# ${tool}_maybe_build_wrapper -- Build wrapper object if the target needs it. +# ${tool}_maybe_build_wrapper -- Build wrapper object if the target +# needs it. FILENAME is the path to the wrapper file. If there are +# additional arguments, they are command-line options to provide to +# the compiler when compiling FILENAME. -proc ${tool}_maybe_build_wrapper { filename } { +proc ${tool}_maybe_build_wrapper { filename args } { global gluefile wrap_flags if { [target_info needs_status_wrapper] != "" \ && [target_info needs_status_wrapper] != "0" \ && ![info exists gluefile] } { set saved_wrap_compile_flags [target_info wrap_compile_flags] + set flags [join $args " "] # The wrapper code may contain code that gcc objects on. This # became true for dejagnu-1.4.4. The set of warnings and code # that gcc objects on may change, so just make sure -w is always # passed to turn off all warnings. - set_currtarget_info wrap_compile_flags "$saved_wrap_compile_flags -w" + set_currtarget_info wrap_compile_flags \ + "$saved_wrap_compile_flags -w $flags" set result [build_wrapper $filename] set_currtarget_info wrap_compile_flags "$saved_wrap_compile_flags" if { $result != "" } { diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index ba0a40b31f1..04ed3a8de03 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2007-02-20 Mark Mitchell + + * testsuite/lib/libstdc++.exp (libstdc++_init): Compile testglue + with -fexceptions. + 2007-02-20 Paolo Carlini PR libstdc++/28080 (partial) diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index 9308fa562c3..3557d13637f 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -225,7 +225,7 @@ proc libstdc++_init { testfile } { v3track PCH_CXXFLAGS 2 } - libstdc++_maybe_build_wrapper "${objdir}/testglue.o" + libstdc++_maybe_build_wrapper "${objdir}/testglue.o" "-fexceptions" } # Callback for cleanup routines. -- 2.30.2