This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Deciphering flags in CXX_FOR_TARGET


On May  7, 2002, Nathanael Nerode <neroden@doctormoo.dyndns.org> wrote:

> Due to the dependency structure of the Makefile, these are only
> guaranteed to be used by the build of target-gperf

Which is probably the only C++ application at the moment.  If not,
we're missing Makefile dependencies.  Any application that links with
libstdc++-v3 or uses its headers must be configured after libstdc++-v3
is built.

> With others, it depends on make's choice of order, which is
> extremely undesirable.

For target programs or libraries that don't use CXX or CXXFLAGS, this
doesn't make any difference.

> Can someone explain to me what these flags from 'testsuite_flags' are,
> in fact, for?  

They're flags that have to be passed to g++ in the build tree, such
that it finds libstdc++ in the build tree.  Without these flags, it
would only look at the install tree, if that much, and we'd end up
using the wrong version of libstdc++ to build libraries that depend on
it, or to test libstdc++ itself.

> If that's the case, I can make a much cleaner implementation for my
> autoconfiscation.

I think the right way to clean this up properly, which was suggested
earlier by someone else (Per?), is to get compilers and target
libraries built in a tree that mirrors the install tree, such that the
compiler is able to use the intelligence it already has to locate
headers and libraries yet to be installed.  This would obviate the
hideous hack in CXX_FOR_TARGET.  Unfortunately, we can't drop it
before we move to this saner build structure.

> I'd also want to know which subdirectories of course, though I can
> probably manage without that information.)

If you find AC_PROG_CXX in a target package's configure, these flags
probably matter.  (I say probably because libgcj, for example, isn't
linked with libstdc++-v3, even though it contains C++ code.  I'm not
sure about dependencies on headers, though).

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]