This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: CXXFLAGS and linking
- From: Alexandre Duret-Lutz <duret_g at lrde dot epita dot fr>
- To: William S Fulton <wsf at fultondesigns dot co dot uk>
- Cc: automake at gnu dot org
- Date: Fri, 24 Jan 2003 09:47:17 +0100
- Subject: Re: CXXFLAGS and linking
- References: <3E30562C.5050100@fultondesigns.co.uk>
>>> "William" == William S Fulton <wsf@fultondesigns.co.uk> writes:
William> I see that CXXFLAGS and AM_CXXFLAGS gets passed to the linker
William> ($CXXLINK).
CXXLINK calls the compiler, so we ought to pass these flags as they
may affect the way the compiler calls the linker in the end.
For instance the compiler might pass on additional objects to
link based on the presence of flags like `-g', `-pg' or
`-pthread'.
William> This doesn't seem correct as the C++ flags aren't
William> necessarily appropriate for linking.
The example you sent to Guido uses `AM_CXXFLAGS = -DSOMETHING'.
I wouldn't expect this to cause any trouble during linking. Does it?
(If so you should probably change it to `AM_CPPFLAGS = -DSOMETHING'.)
Am I missing something?
William> This isn't consistent with the per-program
William> xxxx_CXXFLAGS which do not get passed to the
William> linker. Is this all as intended?
I agree this is a bug. We should honor per-target compiler
flags at link time for consistency.
--
Alexandre Duret-Lutz