[PATCH] Makefile.am: don't confuse CFLAGS and CFLAGS_FOR_BUILD

Dmitry V. Levin ldv at altlinux.org
Wed Dec 7 11:58:35 UTC 2016

Hi Thomas,

On Tue, Dec 06, 2016 at 09:06:08PM +0100, Thomas De Schampheleire wrote:
> On Wed, Nov 16, 2016 at 8:27 PM, Dmitry V. Levin wrote:
> > The correct fix is going to be more complex, e.g.
> > - move all gl_WARN_ADD/WARN_CFLAGS related code from configure.ac to a
> >   separate m4 macro, say st_WARN_CFLAGS;
> > - call st_WARN_CFLAGS in configure.ac;
> > - modify AX_PROG_CC_FOR_BUILD to
> >   + call st_WARN_CFLAGS,
> >   + popdef WARN_CFLAGS back,
> Thanks for the suggestion.
> I tried implementing it but got stuck. What I observe is that the
> second invocation of ST_WARN_CFLAGS is using cached results, which
> should not happen because the compiler can be different. Looking at
> the definition of gl_WARN_ADD, I think that the cache_id of the
> AC_CACHE_CHECK call in gl_COMPILER_OPTION_IF should contain CC or a
> similar variable, so that caching does not happen.
> I'm sending what I have for now below.

Yes, it appeared to be even more complicated than I expected.
I've pushed a tentative fix to
Please give it a try.

I'm not quite happy with the change I made in m4/warnings.m4, though.
The change of gl_Flags is just an ad hoc solution, and the tearing
gl_UNKNOWN_WARNINGS_ARE_ERRORS off gl_WARN_ADD is not something
I'd like to accept on gnulib side.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20161207/693bdc4a/attachment.bin>

More information about the Strace-devel mailing list