I've been working on some changes to let the libstdc++ testsuite use
the same approach as G++ to specify a minimum language dialect for
tests. That means instead of hardcoding { dg-options "-std=gnu++11" }
we can use { dg-do run { target c++11 } } and the test will be run for
any implicit or explicit -std mode that meets that minimum.

For that to work I need check_effective_target_c++ to return true when
the dg tool is "libstdc++".

The patch looks a bit messy, because it's fixing some messy
indentiation.

Tested x86_64-linux.

OK for trunk?

        * lib/target-supports.exp (check_effective_target_c): Fix indentation.
        (check_effective_target_c++): Likewise. Also match for libstdc++.

commit 56250fec9250e6864a9d7471ead2b08a77b89952
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Tue Jul 26 15:49:07 2016 +0100

    Make check_effective_target_c++ work for libstdc++
    
        * lib/target-supports.exp (check_effective_target_c): Fix indentation.
        (check_effective_target_c++): Likewise. Also match for libstdc++.

diff --git a/gcc/testsuite/lib/target-supports.exp 
b/gcc/testsuite/lib/target-supports.exp
index 770268f..9c5194d 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -7001,9 +7001,9 @@ proc check_effective_target_masm_intel  {} {
 # Return 1 if the language for the compiler under test is C.
 
 proc check_effective_target_c { } {
- global tool
+    global tool
     if [string match $tool "gcc"] {
-   return 1
+       return 1
     }
  return 0
 }
@@ -7011,9 +7011,9 @@ proc check_effective_target_c { } {
 # Return 1 if the language for the compiler under test is C++.
 
 proc check_effective_target_c++ { } {
- global tool
-    if [string match $tool "g++"] {
-   return 1
+    global tool
+    if { [string match $tool "g++"] || [string match $tool "libstdc++"] } {
+       return 1
     }
  return 0
 }

Reply via email to