Hello, The ExtUtils::Embed ccopts and ldopts are a kind of reference for compile and link flags that should work when linking against Perl. Based on the flags used/output by ExtUtils::Embed, I have some proposals on changes for the flags we use for XS modules.
1) (Minor) I propose to add -I$(PERL_INC) directly in perl_conf_CFLAGS instead of adding it in tp/Texinfo/XS/Makefile.am 2) I propose to drop $PERL_CONF_optimize from perl_conf_CFLAGS since it is not set in ExtUtils::Embed ccopts. It would avoid the frequent inconsistencies between PERL_EXT_CFLAGS and PERL_CONF_optimize. It could lead to binary incompatibilities, but I doubt it since it is not in ExtUtils::Embed ccopts. 3) I propose to use ldflags in perl_conf_LDFLAGS. It is described as This variable contains any additional C loader flags desired by the user. It is up to the Makefile to use this. Note that on Debian testing it leads to the addition of -fstack-protector-strong which could lead to spurious warning if combined with -O0 in PERL_EXT_CFLAGS, but I still think that it is better to add it. 4) I suggest adding perllibs to PERL_LIBS, which is only used on platforms needing -no-undefined. It could be possible that it causes the link to fail as some libraries libperl is linked against are missing, but since it is in ExtUtils::Embed ldopts, it should be ok and maybe even needed for some platforms we have not encountered yet. It is described as The list of libraries needed by Perl only (any libraries needed by extensions only will by dropped, if using dynamic loading). lddflags could also have been a good candidate (not in ExtUtils::Embed flags because the ExtUtils::Embed target linking programs, not libraries), but chances are that it duplicates the libtool flags. Also, it is UNKNOWN on a Debian testing, so I think that we should not use that Config variable. Any comment? -- Pat
