[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CC and CFLAGS are ignored by part of the build
From: |
Gavin Smith |
Subject: |
Re: CC and CFLAGS are ignored by part of the build |
Date: |
Wed, 22 Nov 2023 20:54:23 +0000 |
On Tue, Nov 14, 2023 at 08:40:54AM +0100, Patrice Dumas wrote:
> The other is that PERL_CONF_optimize is used for AM_CFLAGS
> (XSLIBS_CFLAGS in the development version), the objective being that the
> same flags as those used to build perl are used for perl XS modules. I
> guess that these flags could be overriden by setting another flag, but
> will still be on the command line.
I checked that the flags are overridden. $(CFLAGS) appears on the command
line after $(AM_CFLAGS) (or the equivalent target-specific variable).
Optimisation flags given in PERL_EXT_CFLAGS will override any in e.g.
XSParagraph_la_CFLAGS. (See Info node (automake)Flag Variables Ordering.)
When running "make", it is CFLAGS instead, which was set from PERL_EXT_CFLAGS
in configure, so you can do 'make XSParagraph_la-XSParagraph.lo CFLAGS=-g'.
(The GNU Coding Standards say that overriding CFLAGS when running make
should be possible.)