This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: value of $CXX when building libraries
Phil Edwards <pedwards@disaster.jaj.com> writes:
> That's very true. That script does nearly all the work already. A makefile
> rule could either call it, parse the results, and then use those values
> directly; we wouldn't ever need a 'bin' directory.
Not sure what you're suggesting. Presumably not that the Makefile
would contain rules like:
$(CXX) `../libstdc++-v3/test_flags ...` ...
I'm not thrilled by that idea: A kludgy command line in the Makefile;
running a non-trivial shell script on each compile.
A problem with creating a shell-script i686-pc-linux-gnu/bin/g++
is that won't work for $(LTCXXCOMPILE), currently defined as:
LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
Perhaps we should define shell scripts
i686-pc-linux-gnu/bin/cxxcompile
i686-pc-linux-gnu/bin/ltcxxcompile
and then just define:
CXXCOMPILE = ..../i686-pc-linux-gnu/bin/cxxcompile
LTCXXCOMPILE = ..../i686-pc-linux-gnu/bin/ltcxxcompile
One more reason a shell script could be nice (in addition to short
command lines in the logs): It provides a place where a developer
can put a debugging hook.
Still, the most efficient will presumably be to use test_flags at
configure time to create the appropriate definitions of $COMPILE
and $LTCXXCOMPILE. We can reduce the length of the command lines
by leaving out the -L flags, but there are only two (long) ones
of those.
But we are still left with the question: What shoudl the value of
$CXX be? Both libstdc+-v3 and libjava really should use the
same value - different values are likely to lead to trouble.
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/