On Tue, Nov 14, 2023 at 04:23:58AM +0100, Bruno Haible wrote: > Hi, > > Apparently some optimization options were still in effect. And indeed, > the file tp/Texinfo/XS/config.status contains these lines: > > S["PERL_CONF_optimize"]="-O2 -g" > > Per the GNU Coding Standards [1], when I specify CC and CFLAGS, it should > override the package's defaults. > > I understand that perl comes with its own installation and that building > code that can be dynamically loaded by perl can be challenging. But the > CC and CFLAGS values that I have specified are ABI-compatible with > the ones that perl wants. Therefore I expect them to be obeyed.
There may be two issues here. One is that in Texinfo/XS the following variables replace the usual ones, to be able to specify something different for the info program and the perl XS modules: PERL_EXT_CFLAGS PERL_EXT_CPPFLAGS PERL_EXT_LDFLAGS PERL_EXT_CC 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. In the development version XSLIBS_CFLAGS is only used to compile C perl (mostly), most of the 'pure C' code does not use this variable, but still use PERL_EXT_*. -- Pat
