public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* PATCH to support running the G++ testsuite in C++0x mode
@ 2011-07-13 20:43 Jason Merrill
  2011-07-15 20:06 ` Jason Merrill
  0 siblings, 1 reply; 4+ messages in thread
From: Jason Merrill @ 2011-07-13 20:43 UTC (permalink / raw)
  To: gcc-patches List; +Cc: Rainer Orth, Janis Johnson

[-- Attachment #1: Type: text/plain, Size: 1019 bytes --]

This patch adds support for running the full G++ testsuite in C++0x 
mode, apart from any tests that explicitly specify -std=c++98.  To do 
this, either 'make check-c++0x' in the gcc build subdirectory.  'make 
check-c++' at the top level build directory will now run the tests in 
both C++98 and C++0x modes, though a normal 'make check' will still only 
run them in C++98 mode.

I'm using --tool_opts to pass the extra -std=c++0x argument to the 
compiler.  Previously in my own testing I've used 
--target_board=unix/-std=c++0x, but that is problematic because options 
from --target_board come after options from dg-options, leading to 
spurious failures on tests that explicitly specify -std=c++98.  I also 
considered using the --additional_options flag which lib/g++.exp tries 
to support, but it doesn't work (runtest.exp treats any --a* as --all) 
and in any case is redundant with --tool_opts.

With this patch, make check-c++0x passes with no unexpected failures on 
x86_64-pc-linux-gnu.

Applying to trunk.

[-- Attachment #2: check-c++0x.patch --]
[-- Type: text/x-patch, Size: 10673 bytes --]

commit d3ce882dd60d94b71db0326f7e53e9594183d0a4
Author: Jason Merrill <jason@redhat.com>
Date:   Wed Jul 13 14:23:20 2011 -0400

    Also test -std=c++0x mode with 'make check-c++' at top level
    	* Makefile.in (check-gcc-c++0x): New.
    	(check-c++): Depend on it.
    gcc/
    	* Makefile.in ($(lang_checks_parallelized)): Allow --tool_opts.
    gcc/cp/
    	* Make-lang.in (check-c++0x): New.
    gcc/testsuite/
    	* lib/g++.exp (${tool}_option_help, ${tool}_option_proc): Remove.
    	* lib/lto.exp (lto_prune_warns): Prune warning about -std=c++0x
    	when compiling C files.

diff --git a/Makefile.in b/Makefile.in
index 4f8b396..506d26e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -40152,7 +40152,12 @@ check-gcc-c++:
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
 	(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++);
-check-c++: check-gcc-c++ check-target-libstdc++-v3
+check-gcc-c++0x:
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++0x);
+check-c++: check-gcc-c++ check-gcc-c++0x check-target-libstdc++-v3
 
 .PHONY: check-gcc-fortran check-fortran
 check-gcc-fortran:
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index fcc8b7e..cd4f782 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -5018,7 +5018,7 @@ check_p_subdirs=$(wordlist 1,$(words $(check_$*_parallelize)),$(check_p_numbers)
 
 # For parallelized check-% targets, this decides whether parallelization
 # is desirable (if -jN is used and RUNTESTFLAGS doesn't contain anything
-# but optionally --target_board argument).  If it is desirable,
+# but optional --target_board or --tool_opts arguments).  If it is desirable,
 # recursive make is run with check-parallel-$lang{,1,2,3,4,5} etc. goals,
 # which can be executed in parallel, as they are run in separate directories.
 # check-parallel-$lang{1,2,3,4,5} etc. goals invoke runtest with the longest
@@ -5035,7 +5035,7 @@ check_p_subdirs=$(wordlist 1,$(words $(check_$*_parallelize)),$(check_p_numbers)
 # to lang_checks_parallelized variable and define check_$lang_parallelize
 # variable (see above check_gcc_parallelize description).
 $(lang_checks_parallelized): check-% : site.exp
-	@if [ -z "$(filter-out --target_board=%, $(RUNTESTFLAGS))" ] \
+	@if [ -z "$(filter-out --target_board=%,$(filter-out --tool_opts%,$(RUNTESTFLAGS)))" ] \
 	    && [ "$(filter -j, $(MFLAGS))" = "-j" ]; then \
 	  $(MAKE) TESTSUITEDIR="$(TESTSUITEDIR)" RUNTESTFLAGS="$(RUNTESTFLAGS)" \
 	    check-parallel-$* \
diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
index 1b53b38..b9251a4 100644
--- a/gcc/cp/Make-lang.in
+++ b/gcc/cp/Make-lang.in
@@ -149,6 +149,10 @@ c++.srcman: doc/g++.1
 # check targets.  However, our DejaGNU framework requires 'check-g++' as its
 # entry point.  We feed the former to the latter here.
 check-c++ : check-g++
+# Run the testsute in C++0x mode.
+check-c++0x:
+	$(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) --tool_opts=-std=gnu++0x" \
+	  TESTSUITEDIR="$(TESTSUITEDIR).c++0x" check-g++
 check-c++-subtargets : check-g++-subtargets
 # List of targets that can use the generic check- rule and its // variant.
 lang_checks += check-g++
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/lineno-simple1.C b/gcc/testsuite/g++.dg/debug/dwarf2/lineno-simple1.C
index e0ef7f7..3fcc4f2 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/lineno-simple1.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/lineno-simple1.C
@@ -2,6 +2,7 @@
 // { dg-options "-g -O0 -dA" }
 
 struct C {  // { dg-function-on-line {_ZN1CC[12]Ev} }
+  int i;
   virtual void
   foo() {}  // { dg-function-on-line _ZN1C3fooEv }
 };
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pr44641.C b/gcc/testsuite/g++.dg/debug/dwarf2/pr44641.C
index 2df002f..7b061eb 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/pr44641.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/pr44641.C
@@ -13,26 +13,27 @@ typedef MisplacedDbg<Arg*> Typedef2;
 typedef MisplacedDbg<Full> Typedef3;
 
 template<typename T> struct Base  {
+  int i;
   virtual ~Base() {
   }
 };
 
 template <>
 struct MisplacedDbg<Full>  // { dg-function-on-line {_ZN12MisplacedDbgI4FullEC[12]Ev} }
-                           // { dg-function-on-line {_ZN12MisplacedDbgI4FullED0Ev} { target *-*-* } 21 }
+                           // { dg-function-on-line {_ZN12MisplacedDbgI4FullED0Ev} { target *-*-* } 22 }
 
     : public Base<int> {
 };
 
 template <class T>
 struct MisplacedDbg<T*>  // { dg-function-on-line {_ZN12MisplacedDbgIP3ArgEC[12]Ev} }
-                         // { dg-function-on-line {_ZN12MisplacedDbgIP3ArgED0Ev} { target *-*-* } 28 }
+                         // { dg-function-on-line {_ZN12MisplacedDbgIP3ArgED0Ev} { target *-*-* } 29 }
     : public Base<int> {
 };
 
 template <class A>
 struct MisplacedDbg  // { dg-function-on-line {_ZN12MisplacedDbgI3ArgEC[12]Ev} }
-                     // { dg-function-on-line {_ZN12MisplacedDbgI3ArgED0Ev} { target *-*-* } 34 }
+                     // { dg-function-on-line {_ZN12MisplacedDbgI3ArgED0Ev} { target *-*-* } 35 }
     : public Base<int> {
 };
 
diff --git a/gcc/testsuite/g++.dg/ext/utf-dflt.C b/gcc/testsuite/g++.dg/ext/utf-dflt.C
index 942f2b2..04849bf 100644
--- a/gcc/testsuite/g++.dg/ext/utf-dflt.C
+++ b/gcc/testsuite/g++.dg/ext/utf-dflt.C
@@ -2,7 +2,7 @@
 /* Expected errors for char16_t/char32_t in default std. */
 /* Ensure u and U prefixes are parsed as separate tokens in default std. */
 /* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-std=c++98" } */
 
 const static char16_t	c0	= 'a';	/* { dg-error "not name a type" } */
 const static char32_t	c1	= 'a';	/* { dg-error "not name a type" } */
diff --git a/gcc/testsuite/g++.dg/init/vector1.C b/gcc/testsuite/g++.dg/init/vector1.C
index ce4f40c..f33df2a 100644
--- a/gcc/testsuite/g++.dg/init/vector1.C
+++ b/gcc/testsuite/g++.dg/init/vector1.C
@@ -1,6 +1,7 @@
 // PR c++/19263
 // { dg-do run }
-// { dg-options "-O2" }
+// { dg-options "-O2 -fpermissive" }
+// { dg-prune-output "narrowing" }
 
 typedef signed char v8qi __attribute__ ((vector_size (8)));
 
diff --git a/gcc/testsuite/g++.dg/lookup/anon2.C b/gcc/testsuite/g++.dg/lookup/anon2.C
index d556ba0..4984307 100644
--- a/gcc/testsuite/g++.dg/lookup/anon2.C
+++ b/gcc/testsuite/g++.dg/lookup/anon2.C
@@ -1,5 +1,5 @@
 // { dg-do compile }
-// { dg-options "" }
+// { dg-options "-std=c++98" }
 
 // Make sure we issue a diagnostic if a type with no linkage is used
 // to declare a a variable that has linkage.
diff --git a/gcc/testsuite/g++.dg/torture/pr35526.C b/gcc/testsuite/g++.dg/torture/pr35526.C
index d0a8e6d..2d745b5 100644
--- a/gcc/testsuite/g++.dg/torture/pr35526.C
+++ b/gcc/testsuite/g++.dg/torture/pr35526.C
@@ -1,4 +1,6 @@
 /* { dg-do compile } */
+// { dg-options "-fpermissive" }
+// { dg-prune-output "narrowing" }
 
 extern void *memcpy (void *__dest, __const void *__src, __SIZE_TYPE__  __n);
 
diff --git a/gcc/testsuite/g++.dg/tree-ssa/copyprop.C b/gcc/testsuite/g++.dg/tree-ssa/copyprop.C
index 5ba1936..0d854bc 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/copyprop.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/copyprop.C
@@ -1,7 +1,7 @@
 // PR 39548 verify ssa ICE
 //
 // { dg-do compile { target { lp64 } } }
-// { dg-options  "-Wno-error -fno-exceptions -fno-tree-vrp -O2 -fprofile-generate  -finline-limit=500"  } 
+// { dg-options  "-Wno-error -fno-exceptions -fno-tree-vrp -O2 -fprofile-generate  -finline-limit=500 -std=c++98"  } 
 //
 
 #include <map>
@@ -85,7 +85,7 @@ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
     while (__cur != 0)  { _M_delete_node(__cur); }
   }
 }
-template<class _Key, class _Tp, class _HashFn = hash<_Key>,     class _EqualKey = equal_to<_Key>, class _Alloc = allocator<_Tp> >   struct hash_map     {
+template<class _Key, class _Tp, class _HashFn = ::hash<_Key>,     class _EqualKey = equal_to<_Key>, class _Alloc = allocator<_Tp> >   struct hash_map     {
   typedef hashtable<pair<const _Key, _Tp>,_Key, _HashFn,    _Select1st<pair<const _Key, _Tp> >,    _EqualKey, _Alloc> _Ht;
   _Ht _M_ht;
   typedef typename _Ht::key_type key_type;
diff --git a/gcc/testsuite/g++.old-deja/g++.ext/arrnew.C b/gcc/testsuite/g++.old-deja/g++.ext/arrnew.C
index ea3f420..0c37eb1 100644
--- a/gcc/testsuite/g++.old-deja/g++.ext/arrnew.C
+++ b/gcc/testsuite/g++.old-deja/g++.ext/arrnew.C
@@ -2,7 +2,8 @@
 // { dg-options "" }
 // PRMS Id: 4992
 
+// { dg-prune-output "extended init" }
+
 int *f(){
   return new int[1] = { 1 };   // { dg-error "lvalue" "err" }
-  // { dg-warning "extended init" "warn" { target *-*-* } 6 }
 }
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg27.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg27.C
index dd20747..a598c34 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/rfg27.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/rfg27.C
@@ -1,5 +1,5 @@
 // { dg-do assemble  }
-// { dg-options "-pedantic-errors" }
+// { dg-options "-std=c++98 -pedantic-errors" }
 // Don't compile this one with -Wno-long-long...
 
 short volatile short var_0_2;              /* { dg-error "" } duplicate short */
diff --git a/gcc/testsuite/lib/g++.exp b/gcc/testsuite/lib/g++.exp
index 9de817b..c9f39a3 100644
--- a/gcc/testsuite/lib/g++.exp
+++ b/gcc/testsuite/lib/g++.exp
@@ -308,28 +308,3 @@ proc g++_target_compile { source dest type options } {
 
     return $result
 }
-
-#
-# ${tool}_option_help
-#
-
-proc ${tool}_option_help { } {
-    send_user " --additional_options,OPTIONS\t\tUse OPTIONS to compile the testcase files. OPTIONS should be comma-separated.\n"
-}
-
-#
-# ${tool}_option_proc
-#
-
-proc ${tool}_option_proc { option } {
-    if [regexp "^--additional_options," $option] {
-	global gpp_compile_options
-	regsub "--additional_options," $option "" option
-	foreach x [split $option ","] {
-	    lappend gpp_compile_options "additional_flags=$x"
-	}
-	return 1
-    } else {
-	return 0
-    }
-}
diff --git a/gcc/testsuite/lib/lto.exp b/gcc/testsuite/lib/lto.exp
index 762dbbf..f1f3a68 100644
--- a/gcc/testsuite/lib/lto.exp
+++ b/gcc/testsuite/lib/lto.exp
@@ -25,6 +25,9 @@ proc lto_prune_warns { text } {
     # Many tests that use visibility will still pass on platforms that don't support it.
     regsub -all "(^|\n)\[^\n\]*: warning: visibility attribute not supported in this configuration; ignored\[^\n\]*" $text "" text
 
+    # Allow mixed-language LTO tests to pass with make check-c++0x
+    regsub -all "(^|\n)\[^\n\]*: warning: command line option '-std=\[^\n\]*" $text "" text
+
     # And any stray location lines.
     regsub -all "(^|\n)\[^\n\]*: In function \[^\n\]*" $text "" text
     regsub -all "(^|\n)In file included from \[^\n\]*" $text "" text

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH to support running the G++ testsuite in C++0x mode
  2011-07-13 20:43 PATCH to support running the G++ testsuite in C++0x mode Jason Merrill
@ 2011-07-15 20:06 ` Jason Merrill
  2011-07-16 11:18   ` Matthias Klose
  0 siblings, 1 reply; 4+ messages in thread
From: Jason Merrill @ 2011-07-15 20:06 UTC (permalink / raw)
  To: gcc-patches List; +Cc: Rainer Orth, Janis Johnson

[-- Attachment #1: Type: text/plain, Size: 833 bytes --]

On 07/13/2011 04:28 PM, Jason Merrill wrote:
> I'm using --tool_opts to pass the extra -std=c++0x argument to the
> compiler. Previously in my own testing I've used
> --target_board=unix/-std=c++0x, but that is problematic because options
> from --target_board come after options from dg-options, leading to
> spurious failures on tests that explicitly specify -std=c++98. I also
> considered using the --additional_options flag which lib/g++.exp tries
> to support, but it doesn't work (runtest.exp treats any --a* as --all)
> and in any case is redundant with --tool_opts.

Unfortunately, a bug in dejagnu means that --tool_opts breaks multilib 
support; see the URL in the patch and GCC bug 49741.  So I've 
resurrected --additional_options, renamed to --extra_opts because 
runtest.exp will let that through.

Applying to trunk.

[-- Attachment #2: check-c++0x-2.patch --]
[-- Type: text/x-patch, Size: 4115 bytes --]

commit 15b873c04c2fdeee0b988c89c54bc2183f92a2ac
Author: Jason Merrill <jason@redhat.com>
Date:   Wed Jul 13 18:13:56 2011 -0400

    	* Makefile.in (check-c++): Move check-gcc-c++0x after
    	check-target-libstdc++-v3.
    gcc/
    	* Makefile.in ($(lang_checks_parallelized)): Allow --extra_opts
    	rather than --tool_opts.
    gcc/cp/
    	* Make-lang.in (check-c++0x): Use --extra_opts instead of--tool_opts.
    gcc/testsuite/
    	* lib/g++.exp (${tool}_option_help, ${tool}_option_proc): Restore.
    	Use --extra_opts instead of --additional_options.

diff --git a/Makefile.in b/Makefile.in
index 506d26e..0d40358 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -40157,7 +40157,7 @@ check-gcc-c++0x:
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
 	(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++0x);
-check-c++: check-gcc-c++ check-gcc-c++0x check-target-libstdc++-v3
+check-c++: check-gcc-c++ check-target-libstdc++-v3 check-gcc-c++0x
 
 .PHONY: check-gcc-fortran check-fortran
 check-gcc-fortran:
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 0fded4e..47e14fa 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -5019,7 +5019,7 @@ check_p_subdirs=$(wordlist 1,$(words $(check_$*_parallelize)),$(check_p_numbers)
 
 # For parallelized check-% targets, this decides whether parallelization
 # is desirable (if -jN is used and RUNTESTFLAGS doesn't contain anything
-# but optional --target_board or --tool_opts arguments).  If it is desirable,
+# but optional --target_board or --extra_opts arguments).  If desirable,
 # recursive make is run with check-parallel-$lang{,1,2,3,4,5} etc. goals,
 # which can be executed in parallel, as they are run in separate directories.
 # check-parallel-$lang{1,2,3,4,5} etc. goals invoke runtest with the longest
@@ -5036,7 +5036,7 @@ check_p_subdirs=$(wordlist 1,$(words $(check_$*_parallelize)),$(check_p_numbers)
 # to lang_checks_parallelized variable and define check_$lang_parallelize
 # variable (see above check_gcc_parallelize description).
 $(lang_checks_parallelized): check-% : site.exp
-	@if [ -z "$(filter-out --target_board=%,$(filter-out --tool_opts%,$(RUNTESTFLAGS)))" ] \
+	@if [ -z "$(filter-out --target_board=%,$(filter-out --extra_opts%,$(RUNTESTFLAGS)))" ] \
 	    && [ "$(filter -j, $(MFLAGS))" = "-j" ]; then \
 	  $(MAKE) TESTSUITEDIR="$(TESTSUITEDIR)" RUNTESTFLAGS="$(RUNTESTFLAGS)" \
 	    check-parallel-$* \
diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
index b9251a4..ad466b2 100644
--- a/gcc/cp/Make-lang.in
+++ b/gcc/cp/Make-lang.in
@@ -151,7 +151,7 @@ c++.srcman: doc/g++.1
 check-c++ : check-g++
 # Run the testsute in C++0x mode.
 check-c++0x:
-	$(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) --tool_opts=-std=gnu++0x" \
+	$(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) --extra_opts,-std=gnu++0x" \
 	  TESTSUITEDIR="$(TESTSUITEDIR).c++0x" check-g++
 check-c++-subtargets : check-g++-subtargets
 # List of targets that can use the generic check- rule and its // variant.
diff --git a/gcc/testsuite/lib/g++.exp b/gcc/testsuite/lib/g++.exp
index 81c4398..9e269b1 100644
--- a/gcc/testsuite/lib/g++.exp
+++ b/gcc/testsuite/lib/g++.exp
@@ -307,3 +307,34 @@ proc g++_target_compile { source dest type options } {
 
     return $result
 }
+
+#
+# ${tool}_option_help
+#
+# Changed "additional" to "extra" because runtest.exp treats --a* as --all.
+#
+# This shouldn't be necessary at all; it should be entirely redundant with
+# --tool_opts, except that --tool_opts currently breaks multilib: see
+# http://lists.gnu.org/archive/html/dejagnu/2002-10/msg00007.html
+
+proc ${tool}_option_help { } {
+    send_user " --extra_opts,OPTIONS\t\tUse OPTIONS to compile the testcase files. OPTIONS should be comma-separated.\n"
+}
+
+#
+# ${tool}_option_proc
+#
+
+proc ${tool}_option_proc { option } {
+    if [regexp "^--extra_opts," $option] {
+	global gpp_compile_options
+	regsub "^--extra_opts," $option "" option
+	foreach x [split $option ","] {
+	    lappend gpp_compile_options "additional_flags=$x"
+	}
+	verbose -log "gpp_compile_options set to $gpp_compile_options"
+	return 1
+    } else {
+	return 0
+    }
+}

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH to support running the G++ testsuite in C++0x mode
  2011-07-15 20:06 ` Jason Merrill
@ 2011-07-16 11:18   ` Matthias Klose
  2011-07-17  8:08     ` Jason Merrill
  0 siblings, 1 reply; 4+ messages in thread
From: Matthias Klose @ 2011-07-16 11:18 UTC (permalink / raw)
  To: Jason Merrill; +Cc: gcc-patches List

On 07/15/2011 09:29 PM, Jason Merrill wrote:
> On 07/13/2011 04:28 PM, Jason Merrill wrote:
>> I'm using --tool_opts to pass the extra -std=c++0x argument to the
>> compiler. Previously in my own testing I've used
>> --target_board=unix/-std=c++0x, but that is problematic because options
>> from --target_board come after options from dg-options, leading to
>> spurious failures on tests that explicitly specify -std=c++98. I also
>> considered using the --additional_options flag which lib/g++.exp tries
>> to support, but it doesn't work (runtest.exp treats any --a* as --all)
>> and in any case is redundant with --tool_opts.
> 
> Unfortunately, a bug in dejagnu means that --tool_opts breaks multilib support;
> see the URL in the patch and GCC bug 49741.  So I've resurrected
> --additional_options, renamed to --extra_opts because runtest.exp will let that
> through.
> 
> Applying to trunk.

The change to the toplevel Makefile.in was made in the generated file. I didn't
revert it with today's change.

  Matthias

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH to support running the G++ testsuite in C++0x mode
  2011-07-16 11:18   ` Matthias Klose
@ 2011-07-17  8:08     ` Jason Merrill
  0 siblings, 0 replies; 4+ messages in thread
From: Jason Merrill @ 2011-07-17  8:08 UTC (permalink / raw)
  To: Matthias Klose; +Cc: gcc-patches List

[-- Attachment #1: Type: text/plain, Size: 271 bytes --]

On 07/16/2011 04:39 AM, Matthias Klose wrote:
> The change to the toplevel Makefile.in was made in the generated file.

Oops, I was forgetting about the new Makefile system.  This patch fixes 
that, and also adds a check-target-libmudflap-c++ target to check-c++.

Jason

[-- Attachment #2: check-c++0x-3.patch --]
[-- Type: text/x-patch, Size: 2602 bytes --]

commit b1d35a4f5c4b4f0ae6fef6aea0698febecfb8c9b
Author: Jason Merrill <jason@redhat.com>
Date:   Sat Jul 16 22:05:47 2011 -0400

    	* Makefile.def (language=c++): Add check-c++0x and
    	check-target-libmudflap-c++.
    	* Makefile.tpl (check-target-libmudflap-c++): New.
    	* Makefile.in: Regenerate.

diff --git a/Makefile.def b/Makefile.def
index 0cc6ef6..5116341 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -511,8 +511,9 @@ dependencies = { module=configure-target-newlib; on=all-ld; };
 dependencies = { module=configure-target-libgfortran; on=all-target-libquadmath; };
 
 languages = { language=c;	gcc-check-target=check-gcc; };
-languages = { language=c++;	gcc-check-target=check-c++;
-				lib-check-target=check-target-libstdc++-v3; };
+languages = { language=c++;	gcc-check-target="check-c++ check-c++0x";
+				lib-check-target=check-target-libstdc++-v3;
+				lib-check-target=check-target-libmudflap-c++; };
 languages = { language=fortran;	gcc-check-target=check-fortran;
 				lib-check-target=check-target-libquadmath;
 				lib-check-target=check-target-libgfortran; };
diff --git a/Makefile.in b/Makefile.in
index e80f048..3b8e6c7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -40120,6 +40120,13 @@ maintainer-clean-target-libgomp:
 
 
 
+@if target-libmudflap
+.PHONY: check-target-libmudflap-c++
+check-target-libmudflap-c++:
+	$(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++frags.exp" check-target-libmudflap
+
+@endif target-libmudflap
+
 # ----------
 # GCC module
 # ----------
@@ -40153,13 +40160,8 @@ check-gcc-c++:
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++);
-check-gcc-c++0x:
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++0x);
-check-c++: check-gcc-c++ check-target-libstdc++-v3 check-gcc-c++0x
+	(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++ check-c++0x);
+check-c++: check-gcc-c++ check-target-libstdc++-v3 check-target-libmudflap-c++
 
 .PHONY: check-gcc-fortran check-fortran
 check-gcc-fortran:
diff --git a/Makefile.tpl b/Makefile.tpl
index ea3d08d..0d2a0bf 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -1393,6 +1393,13 @@ ENDIF raw_cxx +]
 [+ ENDFOR recursive_targets +]
 [+ ENDFOR target_modules +]
 
+@if target-libmudflap
+.PHONY: check-target-libmudflap-c++
+check-target-libmudflap-c++:
+	$(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++frags.exp" check-target-libmudflap
+
+@endif target-libmudflap
+
 # ----------
 # GCC module
 # ----------

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-07-17  3:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-13 20:43 PATCH to support running the G++ testsuite in C++0x mode Jason Merrill
2011-07-15 20:06 ` Jason Merrill
2011-07-16 11:18   ` Matthias Klose
2011-07-17  8:08     ` Jason Merrill

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).