On Mon, Nov 17, 2025 at 10:56:58AM +0100, Patrice Dumas wrote:
> One possibility could be to use $Config{ccflags} for all the
> compilations, including the "Pure C" ones (which could be what you were
> advocating in your mail).  It could bring in more consistency between
> compilation and linking.  There would also be a risk that the flags
> in $Config{ccflags} bring in something incompatible with gnulib/autoconf
> config.h and other headers, but we can try and see.  Another drawback is
> that it is harder for the user to override the Perl cflags for "Pure C".
> 
> I'll try that unless there is another proposal.

I tried it and it looks superficially right, as the compilation passes
for the OpenCSW solaris 11.  However, looking at the logs, the libraries
and XS modules are not compiled in (except for XSParagraph).  That's
because iconv is not found (nor libintl).  I recall that it was what
happened in the past.

My feeling is that this happens because there is now -I/opt/csw/include
through Perl config ccflags, but no -L/opt/csw/lib.  There is
  LDFLAGS=-L/opt/csw/lib
but it is not used since PERL_EXT_LDFLAGS is used.  And we cannot use
Perl config ldflags in all the link commands, as there is -lperl in it, 

Note that there is also
  CFLAGS=-I/opt/csw/include

It does not mean that the current approach is wrong, though, rather it
seems to me that PERL_EXT_LDFLAGS and PERL_EXT_CFLAGS should be used, set
to -L/opt/csw/lib and -I/opt/csw/include as it is probably what is
expected in OpenCSW to find the libraries in this environment.

It is still somewhat unclear to me what would be the best choice of
flags, there does not seems to be one that is clearly better than
another.  We either get too much or too little of Perl flags but never
the exactly right amount as it depends on the platform and the use of
PERL_EXT_*.

-- 
Pat

Reply via email to