On Sun, Nov 10, 2002 at 06:50:47PM -0500, Earnie Boyd wrote:
> >I do not think getting gcc to link -lstdc++ is a good idea either, but
> >it doesn't have much more hack value than the solution you propose below
> >IMHO.
>
> It's the hack that using g++ performs.
I do not believe there is any guarantee that using gcc to link will get
the C++ linking case correct. Now, I know this works, but the previous
sentence gives the reason I call it a hack.
> Well, g++ does the same extension filtering that gcc does. It will
> compile .c as C and .C, .cc, .cxx, .cpp as C++. If either finds source
> in the form of the other then the compilation type is changed.
However, gcc/g++ gets this right, and allows you to override its
guessing, via the -x flag. It seems automake does not.
> Another solution would be to use a BUILD_CC variable. Set BUILD_CC to
> the value of $(CC) for C and the value of $(CXX) for C++ and use
> $(BUILD_CC) in the rules.
How would this look in a Makefile.am ? Would I have to throw away
auto-deps for this to work ?
regards
john
--
"History is the slaughter-bench at which the happiness of peoples, the
wisdom of states and the virtue of individuals have been sacrificed."
- Hegel