This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Deciphering flags in CXX_FOR_TARGET
On Wed, May 08, 2002 at 11:43:44AM +0200, Gabriel Dos Reis wrote:
> Nathanael Nerode <neroden@doctormoo.dyndns.org> writes:
>
> | On Tue, May 07, 2002 at 12:51:55PM -0700, Geoff Keating wrote:
> | >
> | > > One bit, however, is quite odd. It adds certain flags to
> | > > CXX_FOR_TARGET. These flags are generated by
> | > > `libstdc++-v3/testsuite_flags --build-includes`. This is only done if
> | > > 'testsuite_flags' exists, which is only true if libstdc++-v3 has been
> | > > configured.
> | >
> | > If you don't get a better answer, my suggestion would be to delete the
> | > inclusion of these flags from a local combined tree, and try to build
> | > and test. If the flags are necessary, something should break...
> | >
> | > I suspect they're necessary for building libstdc++-v3 or libjava, and
> | > that the weirdness is actually a bug.
> | Heh. Actually, that's the one thing I'm absolutely sure they're not
> | necessary for, since they're explicitly avoided in those two contexts!
>
> I'm not sure I understand your comment. Maybe the name of script is
> ill-choosen but at the time it was first created that name was
> descriptive.
If you look carefully at the top level configure.in, you will note the
comment 'Don't use libstdc++-v3's flags to configure/build itself.'
The way the macros are set up explicitly avoids using the flags from the
testsuite_flags script when the directory being dealt with is 'libjava'
or 'libstdc++-v3'. This is presumably because the script doesn't exist
until libstdc++-v3 is configured.
Presumably its flags are used for c++ tests, but they'd have to be
explicitly referenced in the *subdirectory* libstdc++-v3, since they
don't get passed down from the top level for that subdirectory.
> Initially, we used it to generare flags necessary to properly build
> and test libstdc++-v3. Then as things were growing we factorized all
> the places where we needed to know which flags are appropriate to use
> libstdc++ in that script. In short, any program that needs to locate
> g++ and the library headers should invoke that script to figure out
> which flags to use. That is true for the testsuite; that should be
> true for libgcj (we already had that discussion in the past).
>
> -- Gaby
Thanks for the historical info.