Hi!
On 2002-04-17T21:37:50-0400, Phil Edwards <[email protected]> wrote:
> If the user decides to build the library with extra compiler options
> via --enable-cxx-flags, the testsuite should (by default) use those same
> options when running.
Hmm, are we sure that's what we actually want?
> Verified by passing strange things via --enable
> and watching their effects on the testsuite.
> --- testsuite_flags.in 7 Jan 2002 00:07:27 -0000 1.11
> +++ testsuite_flags.in 18 Apr 2002 01:34:43 -0000
> @@ -49,7 +49,7 @@ case ${query} in
> ;;
> --cxxflags)
> CXXFLAGS=' -g @SECTION_FLAGS@ @SECTION_LDFLAGS@
> - -fmessage-length=0
> + -fmessage-length=0 @EXTRA_CXX_FLAGS@
> -DDEBUG_ASSERT -DLOCALEDIR="@glibcpp_localedir@" '
> echo ${CXXFLAGS}
> ;;
This got installed in Subversion r52450
(Git commit 822ca943a31961fd7339de6fbe6593118ec7f231).
To me at least, this comes unexpected: per my reading of (the current)
'libstdc++-v3/acinclude.m4:GLIBCXX_ENABLE_CXX_FLAGS', I'd have thought
these flags apply only to the build of libstdc++ itself, but apparently
"flags to pass to the compiler while building" or
"extra compiler flags for building" also includes use by
'make check-target-libstdc++-v3'?
I'm OK to leave this as-is, if only for hysterical raisins, but would
then proposa a patch to document this behavior?
Alas, there's an additional issue: with Subversion r42272
(Git commit 28e8acb68f8a427552bc9f2d4cae12a1ac477855) -- so, already
in place when the change above got installed -- we'd gotten:
* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Set flags
appropriately for remote testing and testing installed files without
a build dir.
- [...]
- set cxxflags [exec sh ${blddir}/testsuite_flags --cxxflags]
- [...]
+ if [is_remote host] {
+ [...]
+ set cxxflags "-ggdb3 -DDEBUG_ASSERT"
+ [...]
+ } else {
+ # If we find a testsuite_flags file, we're testing in the build
dir.
+ set flags_file "${blddir}/testsuite_flags"
+ if { [file exists $flags_file] } {
+ [...]
+ set cxxflags [exec sh $flags_file --cxxflags]
+ [...]
+ } else {
+ [...]
+ set cxxflags "-ggdb3 -DDEBUG_ASSERT"
+ [...]
+ }
+ }
(Nowadays: 'libstdc++-v3/testsuite/lib/libstdc++.exp:libstdc++_init',
similarly.)
That means, any 'EXTRA_CXX_FLAGS' specified by '--enable-cxx-flags=[...]'
are *not* considered for remote host testing -- which in turn appears to
be in conflict with the original intent, quoted at the beginning of this
email? Hmm...
I think we should clarify the intended cases where 'EXTRA_CXX_FLAGS' (as
specified by '--enable-cxx-flags=[...]') apply, and then make that apply
in a uniform way? I think I'd be in favor of removing them from
'testsuite_flags --cxxflags' -- but can't quite tell which use cases
that'd break...
Grüße
Thomas