* [patch libstdc++ testsuite]: Add new option dg-additional-options and make use of it for mingw targets
@ 2013-03-22 8:32 Kai Tietz
2013-03-22 20:00 ` Mike Stump
0 siblings, 1 reply; 2+ messages in thread
From: Kai Tietz @ 2013-03-22 8:32 UTC (permalink / raw)
To: GCC Patches; +Cc: libstdc++
Hi,
this patch adds option dg-additional-options for libstdc++-v3's testsuite and
make use of this option for some mingw-tests. Those tests are just possible for
pe-coff for static-library use. The shared version for pe-coff is
finally linked and therefore
no override of operators is possible within DLL.
ChangeLog
2013-03-22 Kai Tietz <ktietz@redhat.com>
* 18_support/50594.cc: For mingw-targets use only static
libstdc++-version.
* 19_diagnostics/error_category/operators/equal.cc
* 19_diagnostics/error_code/cons/1.cc
* 19_diagnostics/error_code/operators/bool.cc
* 19_diagnostics/error_code/operators/equal.cc
* 19_diagnostics/error_code/operators/not_equal.cc
* 19_diagnostics/error_condition/cons/1.cc
* 19_diagnostics/error_condition/operators/bool.cc
* 19_diagnostics/error_condition/operators/equal.cc
* 19_diagnostics/error_condition/operators/not_equal.cc
* 23_containers/set/requirements/exception/basic.cc
* 26_numerics/headers/cmath/c99_classification_macros_c.cc
* lib/dg-options.exp (dg-additional-options): New option.
Tested for i686-w64-mingw32, x86_64-w64-mingw32,
x86_64-unknown-linux-gnu. Ok for apply?
Regards,
Kai
Index: libstdc++-v3/testsuite/18_support/50594.cc
===================================================================
--- libstdc++-v3/testsuite/18_support/50594.cc (Revision 196898)
+++ libstdc++-v3/testsuite/18_support/50594.cc (Arbeitskopie)
@@ -1,4 +1,5 @@
// { dg-options "-fwhole-program" }
+// { dg-additional-options "-static-libstdc++" { target *-*-mingw* } }
// Copyright (C) 2011-2013 Free Software Foundation, Inc.
//
Index: libstdc++-v3/testsuite/19_diagnostics/error_category/operators/equal.cc
===================================================================
--- libstdc++-v3/testsuite/19_diagnostics/error_category/operators/equal.cc (Revision
196898)
+++ libstdc++-v3/testsuite/19_diagnostics/error_category/operators/equal.cc (Arbeitskopie)
@@ -1,4 +1,5 @@
// { dg-options "-std=gnu++0x" }
+// { dg-additional-options "-static-libgcc" { target *-*-mingw* } }
// 2007-08-22 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2007-2013 Free Software Foundation, Inc.
Index: libstdc++-v3/testsuite/19_diagnostics/error_code/cons/1.cc
===================================================================
--- libstdc++-v3/testsuite/19_diagnostics/error_code/cons/1.cc (Revision 196898)
+++ libstdc++-v3/testsuite/19_diagnostics/error_code/cons/1.cc (Arbeitskopie)
@@ -1,4 +1,5 @@
// { dg-options "-std=gnu++0x" }
+// { dg-additional-options "-static-libstdc++" { target *-*-mingw* } }
// 2007-08-22 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2007-2013 Free Software Foundation, Inc.
Index: libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool.cc
===================================================================
--- libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool.cc (Revision
196898)
+++ libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool.cc (Arbeitskopie)
@@ -1,4 +1,5 @@
// { dg-options "-std=gnu++0x" }
+// { dg-additional-options "-static-libstdc++" { target *-*-mingw* } }
// 2007-08-22 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2007-2013 Free Software Foundation, Inc.
Index: libstdc++-v3/testsuite/19_diagnostics/error_code/operators/equal.cc
===================================================================
--- libstdc++-v3/testsuite/19_diagnostics/error_code/operators/equal.cc (Revision
196898)
+++ libstdc++-v3/testsuite/19_diagnostics/error_code/operators/equal.cc (Arbeitskopie)
@@ -1,4 +1,5 @@
// { dg-options "-std=gnu++0x" }
+// { dg-additional-options "-static-libstdc++" { target *-*-mingw* } }
// 2007-08-22 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2007-2013 Free Software Foundation, Inc.
Index: libstdc++-v3/testsuite/19_diagnostics/error_code/operators/not_equal.cc
===================================================================
--- libstdc++-v3/testsuite/19_diagnostics/error_code/operators/not_equal.cc (Revision
196898)
+++ libstdc++-v3/testsuite/19_diagnostics/error_code/operators/not_equal.cc (Arbeitskopie)
@@ -1,4 +1,5 @@
// { dg-options "-std=gnu++0x" }
+// { dg-additional-options "-static-libstdc++" { target *-*-mingw* } }
// 2007-08-22 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2007-2013 Free Software Foundation, Inc.
Index: libstdc++-v3/testsuite/19_diagnostics/error_condition/cons/1.cc
===================================================================
--- libstdc++-v3/testsuite/19_diagnostics/error_condition/cons/1.cc (Revision
196898)
+++ libstdc++-v3/testsuite/19_diagnostics/error_condition/cons/1.cc (Arbeitskopie)
@@ -1,4 +1,5 @@
// { dg-options "-std=gnu++0x" }
+// { dg-additional-options "-static-libstdc++" { target *-*-mingw* } }
// Copyright (C) 2008-2013 Free Software Foundation, Inc.
//
Index: libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/bool.cc
===================================================================
--- libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/bool.cc (Revision
196898)
+++ libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/bool.cc (Arbeitskopie)
@@ -1,4 +1,5 @@
// { dg-options "-std=gnu++0x" }
+// { dg-additional-options "-static-libstdc++" { target *-*-mingw* } }
// Copyright (C) 2008-2013 Free Software Foundation, Inc.
//
Index: libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/equal.cc
===================================================================
--- libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/equal.cc (Revision
196898)
+++ libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/equal.cc (Arbeitskopie)
@@ -1,4 +1,5 @@
// { dg-options "-std=gnu++0x" }
+// { dg-additional-options "-static-libstdc++" { target *-*-mingw* } }
// Copyright (C) 2008-2013 Free Software Foundation, Inc.
//
Index: libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/not_equal.cc
===================================================================
--- libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/not_equal.cc (Revision
196898)
+++ libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/not_equal.cc (Arbeitskopie)
@@ -1,4 +1,5 @@
// { dg-options "-std=gnu++0x" }
+// { dg-additional-options "-static-libstdc++" { target *-*-mingw* } }
// Copyright (C) 2008-2013 Free Software Foundation, Inc.
//
Index: libstdc++-v3/testsuite/23_containers/set/requirements/exception/basic.cc
===================================================================
--- libstdc++-v3/testsuite/23_containers/set/requirements/exception/basic.cc (Revision
196898)
+++ libstdc++-v3/testsuite/23_containers/set/requirements/exception/basic.cc (Arbeitskopie)
@@ -1,4 +1,5 @@
// { dg-options "-std=gnu++0x" }
+// { dg-additional-options "-static-libstdc++" { target *-*-mingw* } }
// { dg-require-cstdint "" }
// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
Index: libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc
===================================================================
--- libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc (Revision
196898)
+++ libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc (Arbeitskopie)
@@ -20,8 +20,8 @@
// { dg-do compile }
// { dg-add-options no_pch }
-// { dg-xfail-if "" { { *-*-linux* *-*-darwin* *-*-solaris2.1[0-9]*
hppa*-*-hpux* } || { uclibc || newlib } } { "*" } { "" } }
-// { dg-excess-errors "" { target { { *-*-linux* *-*-darwin*
*-*-solaris2.1[0-9]* hppa*-*-hpux* } || { uclibc || newlib } } } }
+// { dg-xfail-if "" { { *-*-linux* *-*-darwin* *-*-solaris2.1[0-9]*
hppa*-*-hpux* *-*-mingw* } || { uclibc || newlib } } { "*" } { "" } }
+// { dg-excess-errors "" { target { { *-*-linux* *-*-darwin*
*-*-solaris2.1[0-9]* hppa*-*-hpux* *-*-mingw* } || { uclibc || newlib
} } } }
#include <math.h>
Index: libstdc++-v3/testsuite/lib/dg-options.exp
===================================================================
--- libstdc++-v3/testsuite/lib/dg-options.exp (Revision 196898)
+++ libstdc++-v3/testsuite/lib/dg-options.exp (Arbeitskopie)
@@ -218,3 +218,25 @@ proc add_options_for_no_pch { flags } {
# This forces any generated and possibly included PCH to be invalid.
return "-D__GLIBCXX__=99999999"
}
+
+# Like dg-options, but adds to the default options rather than replacing them.
+
+proc dg-additional-options { args } {
+ upvar dg-extra-tool-flags extra-tool-flags
+
+ if { [llength $args] > 3 } {
+ error "[lindex $args 0]: too many arguments"
+ return
+ }
+
+ if { [llength $args] >= 3 } {
+ switch [dg-process-target [lindex $args 2]] {
+ "S" { eval lappend extra-tool-flags [lindex $args 1] }
+ "N" { }
+ "F" { error "[lindex $args 0]: `xfail' not allowed here" }
+ "P" { error "[lindex $args 0]: `xfail' not allowed here" }
+ }
+ } else {
+ eval lappend extra-tool-flags [lindex $args 1]
+ }
+}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch libstdc++ testsuite]: Add new option dg-additional-options and make use of it for mingw targets
2013-03-22 8:32 [patch libstdc++ testsuite]: Add new option dg-additional-options and make use of it for mingw targets Kai Tietz
@ 2013-03-22 20:00 ` Mike Stump
0 siblings, 0 replies; 2+ messages in thread
From: Mike Stump @ 2013-03-22 20:00 UTC (permalink / raw)
To: Kai Tietz; +Cc: GCC Patches, libstdc++
On Mar 22, 2013, at 1:31 AM, Kai Tietz <ktietz70@googlemail.com> wrote:
> this patch adds option dg-additional-options for libstdc++-v3's testsuite and
> make use of this option for some mingw-tests. Those tests are just possible for
> pe-coff for static-library use. The shared version for pe-coff is
> finally linked and therefore
> no override of operators is possible within DLL.
> Ok for apply?
So, don't know if the libstdc++ want to ponder this any, but let me approve it, subject to overrides from the libstdc++ people and invite them to say if they like the general idea or if they like some other way to resolve the issue.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-22 20:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-22 8:32 [patch libstdc++ testsuite]: Add new option dg-additional-options and make use of it for mingw targets Kai Tietz
2013-03-22 20:00 ` Mike Stump
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).