* [patch libstdc++]: Fix tests trying to override symbols in shared-library for mingw targets
@ 2013-01-18 10:17 Kai Tietz
2013-01-18 11:23 ` Jonathan Wakely
0 siblings, 1 reply; 4+ messages in thread
From: Kai Tietz @ 2013-01-18 10:17 UTC (permalink / raw)
To: GCC Patches; +Cc: libstdc++
Hi,
this patch addresses some of libstdc++'s testsuite regressions on
pe-coff targets due none-overridable symbols in DLL files.
ChangeLog
* 18_support/50594.cc: Force use of static libstdc++ for
mingw targets.
* 19_diagnostics/error_category/operators/equal.cc: Likewise.
* 19_diagnostics/error_code/cons/1.cc: Likewise.
* 19_diagnostics/error_code/operators/bool.cc: Likewise.
* 19_diagnostics/error_code/operators/equal.cc: Likewise.
* 19_diagnostics/error_condition/cons/1.cc: Likewise.
* 19_diagnostics/error_condition/operators/bool.cc: Likewise.
* 19_diagnostics/error_condition/operators/equal.cc: Likewise.
* 19_diagnostics/error_condition/operators/not_equal.cc: Likewise.
* 23_containers/set/requirements/exception/basic.cc: Likewise.
* lib/dg-options.exp (dg-additional-options): Likewise.
* 26_numerics/headers/cmath/c99_classification_macros_c.cc: Add mingw targets
as known to fail.
Tested for x86_64-w64-mingw32, i686-w64-mingw32, and
x86_64-unknown-linux-gnu. Ok for apply?
Regards,
Kai
Index: testsuite/18_support/50594.cc
===================================================================
--- testsuite/18_support/50594.cc (Revision 195288)
+++ testsuite/18_support/50594.cc (Arbeitskopie)
@@ -1,4 +1,5 @@
// { dg-options "-fwhole-program" }
+// { dg-additional-options "-static-libstdc++" { target *-*-mingw* } }
// Copyright (C) 2011 Free Software Foundation
//
Index: testsuite/19_diagnostics/error_category/operators/equal.cc
===================================================================
--- testsuite/19_diagnostics/error_category/operators/equal.cc (Revision 195288)
+++ 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, 2008, 2009 Free Software Foundation, Inc.
Index: testsuite/19_diagnostics/error_code/cons/1.cc
===================================================================
--- testsuite/19_diagnostics/error_code/cons/1.cc (Revision 195288)
+++ 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, 2008, 2009 Free Software Foundation, Inc.
Index: testsuite/19_diagnostics/error_code/operators/bool.cc
===================================================================
--- testsuite/19_diagnostics/error_code/operators/bool.cc (Revision 195288)
+++ 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, 2009 Free Software Foundation, Inc.
Index: testsuite/19_diagnostics/error_code/operators/equal.cc
===================================================================
--- testsuite/19_diagnostics/error_code/operators/equal.cc (Revision 195288)
+++ 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, 2008, 2009 Free Software Foundation, Inc.
Index: testsuite/19_diagnostics/error_code/operators/not_equal.cc
===================================================================
--- testsuite/19_diagnostics/error_code/operators/not_equal.cc (Revision 195288)
+++ 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, 2008, 2009 Free Software Foundation, Inc.
Index: testsuite/19_diagnostics/error_condition/cons/1.cc
===================================================================
--- testsuite/19_diagnostics/error_condition/cons/1.cc (Revision 195288)
+++ 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, 2009 Free Software Foundation, Inc.
//
Index: testsuite/19_diagnostics/error_condition/operators/bool.cc
===================================================================
--- testsuite/19_diagnostics/error_condition/operators/bool.cc (Revision 195288)
+++ 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, 2009 Free Software Foundation, Inc.
//
Index: testsuite/19_diagnostics/error_condition/operators/equal.cc
===================================================================
--- testsuite/19_diagnostics/error_condition/operators/equal.cc (Revision
195288)
+++ 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, 2009 Free Software Foundation, Inc.
//
Index: testsuite/19_diagnostics/error_condition/operators/not_equal.cc
===================================================================
--- testsuite/19_diagnostics/error_condition/operators/not_equal.cc (Revision
195288)
+++ 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, 2009 Free Software Foundation, Inc.
//
Index: testsuite/23_containers/set/requirements/exception/basic.cc
===================================================================
--- testsuite/23_containers/set/requirements/exception/basic.cc (Revision
195288)
+++ 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: testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc
===================================================================
--- testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc (Revision
195288)
+++ 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: testsuite/lib/dg-options.exp
===================================================================
--- testsuite/lib/dg-options.exp (Revision 195288)
+++ testsuite/lib/dg-options.exp (Arbeitskopie)
@@ -219,3 +219,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] 4+ messages in thread
* Re: [patch libstdc++]: Fix tests trying to override symbols in shared-library for mingw targets
2013-01-18 10:17 [patch libstdc++]: Fix tests trying to override symbols in shared-library for mingw targets Kai Tietz
@ 2013-01-18 11:23 ` Jonathan Wakely
2013-01-18 12:09 ` Kai Tietz
0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Wakely @ 2013-01-18 11:23 UTC (permalink / raw)
To: Kai Tietz; +Cc: GCC Patches, libstdc++
On 18 January 2013 10:17, Kai Tietz wrote:
> Hi,
>
> this patch addresses some of libstdc++'s testsuite regressions on
> pe-coff targets due none-overridable symbols in DLL files.
> ChangeLog
>
> * 18_support/50594.cc: Force use of static libstdc++ for
> mingw targets.
> * 19_diagnostics/error_category/operators/equal.cc: Likewise.
> * 19_diagnostics/error_code/cons/1.cc: Likewise.
> * 19_diagnostics/error_code/operators/bool.cc: Likewise.
> * 19_diagnostics/error_code/operators/equal.cc: Likewise.
> * 19_diagnostics/error_condition/cons/1.cc: Likewise.
> * 19_diagnostics/error_condition/operators/bool.cc: Likewise.
> * 19_diagnostics/error_condition/operators/equal.cc: Likewise.
> * 19_diagnostics/error_condition/operators/not_equal.cc: Likewise.
> * 23_containers/set/requirements/exception/basic.cc: Likewise.
> * lib/dg-options.exp (dg-additional-options): Likewise.
> * 26_numerics/headers/cmath/c99_classification_macros_c.cc: Add mingw targets
> as known to fail.
>
> Tested for x86_64-w64-mingw32, i686-w64-mingw32, and
> x86_64-unknown-linux-gnu. Ok for apply?
Congratulations, you're the first person to touch these files this
year, so you win the privilege of updating the copyright years! ;-)
(Don't forget that on the trunk now you can replace a series of dates
like 2008, 2009, 2011 with the range 2008-2013.)
> Index: testsuite/lib/dg-options.exp
> ===================================================================
> --- testsuite/lib/dg-options.exp (Revision 195288)
> +++ testsuite/lib/dg-options.exp (Arbeitskopie)
> @@ -219,3 +219,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 } {
Is this condition right or should it check for exactly three?
> + 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] 4+ messages in thread
* Re: [patch libstdc++]: Fix tests trying to override symbols in shared-library for mingw targets
2013-01-18 11:23 ` Jonathan Wakely
@ 2013-01-18 12:09 ` Kai Tietz
2013-01-18 13:07 ` Jonathan Wakely
0 siblings, 1 reply; 4+ messages in thread
From: Kai Tietz @ 2013-01-18 12:09 UTC (permalink / raw)
To: Jonathan Wakely; +Cc: GCC Patches, libstdc++
2013/1/18 Jonathan Wakely <jwakely.gcc@gmail.com>:
> On 18 January 2013 10:17, Kai Tietz wrote:
>> Hi,
>>
>> this patch addresses some of libstdc++'s testsuite regressions on
>> pe-coff targets due none-overridable symbols in DLL files.
>> ChangeLog
>>
>> * 18_support/50594.cc: Force use of static libstdc++ for
>> mingw targets.
>> * 19_diagnostics/error_category/operators/equal.cc: Likewise.
>> * 19_diagnostics/error_code/cons/1.cc: Likewise.
>> * 19_diagnostics/error_code/operators/bool.cc: Likewise.
>> * 19_diagnostics/error_code/operators/equal.cc: Likewise.
>> * 19_diagnostics/error_condition/cons/1.cc: Likewise.
>> * 19_diagnostics/error_condition/operators/bool.cc: Likewise.
>> * 19_diagnostics/error_condition/operators/equal.cc: Likewise.
>> * 19_diagnostics/error_condition/operators/not_equal.cc: Likewise.
>> * 23_containers/set/requirements/exception/basic.cc: Likewise.
>> * lib/dg-options.exp (dg-additional-options): Likewise.
>> * 26_numerics/headers/cmath/c99_classification_macros_c.cc: Add mingw targets
>> as known to fail.
>>
>> Tested for x86_64-w64-mingw32, i686-w64-mingw32, and
>> x86_64-unknown-linux-gnu. Ok for apply?
>
> Congratulations, you're the first person to touch these files this
> year, so you win the privilege of updating the copyright years! ;-)
Oh lucky I am, I am winner! .... ;)
> (Don't forget that on the trunk now you can replace a series of dates
> like 2008, 2009, 2011 with the range 2008-2013.)
Sure I will modify the copyright-notice of the files I've touched here.
>> Index: testsuite/lib/dg-options.exp
>> ===================================================================
>> --- testsuite/lib/dg-options.exp (Revision 195288)
>> +++ testsuite/lib/dg-options.exp (Arbeitskopie)
>> @@ -219,3 +219,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 } {
>
> Is this condition right or should it check for exactly three?
Well, I copied stuff from gcc's testsuite. As we check some lines
about for args > 3 and error out, a test for == 3 makes sense, but
well, >= 3 is fine too.
>> + 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] 4+ messages in thread
* Re: [patch libstdc++]: Fix tests trying to override symbols in shared-library for mingw targets
2013-01-18 12:09 ` Kai Tietz
@ 2013-01-18 13:07 ` Jonathan Wakely
0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Wakely @ 2013-01-18 13:07 UTC (permalink / raw)
To: Kai Tietz; +Cc: GCC Patches, libstdc++
On 18 January 2013 12:09, Kai Tietz wrote:
>>> +
>>> + if { [llength $args] >= 3 } {
>>
>> Is this condition right or should it check for exactly three?
>
> Well, I copied stuff from gcc's testsuite. As we check some lines
> about for args > 3 and error out, a test for == 3 makes sense, but
> well, >= 3 is fine too.
Ah OK, it's fine as it is then.
Thanks again.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-01-18 13:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-18 10:17 [patch libstdc++]: Fix tests trying to override symbols in shared-library for mingw targets Kai Tietz
2013-01-18 11:23 ` Jonathan Wakely
2013-01-18 12:09 ` Kai Tietz
2013-01-18 13:07 ` Jonathan Wakely
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).