[v3] testsuite vs. cxxflags, others

Daniel Jacobowitz drow@false.org
Mon Sep 10 21:44:00 GMT 2007


On Thu, Sep 06, 2007 at 10:06:34PM -0500, Benjamin Kosnik wrote:
> 2007-09-06  Benjamin Kosnik  <bkoz@redhat.com>
> 
> 	* testsuite/lib/libstdc++.exp: Check CXXFLAGS.

Hi Ben,

This part of the patch broke our autotester.  We do installed tree
testing, so neither [is_remote host] nor [file exists $flags_file]
is true.  $cxx used to be set by the default case, but now it isn't
set at all and we get a TCL exception at the first compile.

> Index: testsuite/lib/libstdc++.exp
> ===================================================================
> --- testsuite/lib/libstdc++.exp	(revision 128221)
> +++ testsuite/lib/libstdc++.exp	(working copy)
> @@ -171,13 +171,6 @@
>  	set compiler [transform "g++"]
>      }
>  
> -    # Default settings.
> -    set cxx [transform "g++"]
> -    set cxxflags "-g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0" 
> -    set cxxldflags ""
> -    set cc [transform "gcc"]
> -    # Locate testsuite_hooks.h and other testsuite headers.
> -    set includes "-I${srcdir}/util"
>      # Adapt the defaults for special circumstances.
>      if [is_remote host] {
>  	# A remote host does not, in general, have access to the
> @@ -206,6 +199,12 @@
>  		return "untested"
>  	    }
>  	}
> +	# Default settings.
> +	set cxx [transform "g++"]
> +	set cxxflags "-g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0 " 
> +	set cxxldflags ""
> +	set cc [transform "gcc"]
> +	# Locate testsuite_hooks.h and other testsuite headers.	
>  	set includes "-Iutil"
>      } elseif { [file exists $flags_file] } {
>          # If we find a testsuite_flags file, we're testing in the build dir.
> @@ -215,6 +214,9 @@
>  	set cc [exec sh $flags_file --build-cc]
>  	set includes [exec sh $flags_file --build-includes]
>      }
> +    append cxxflags " "
> +    append cxxflags [getenv CXXFLAGS]
> +    v3track cxxflags 2
>  
>      # Always use MO files built by this test harness.
>      set cxxflags "$cxxflags -DLOCALEDIR=\".\""

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Libstdc++ mailing list