On Sun, Jan 11, 2026 at 06:18:25PM +0100, Bruno Haible via Bug reports for the GNU Texinfo documentation system wrote: > On platforms where gcc (or clang) is not the native compiler, it can be > impossible to build texinfo with gcc.
I am not surprised (this is for makeinfo/texi2any only, not for the Info reader). For Perl C and to have consistent link and compile flags, we now use the Perl flags for all the libraries and executables. Therefore it has become difficult to modify the flags or the compiler. Note, however, that using a different compiler (and different flags) than the one used to build Perl was not supposed to work since a long time, according to Perl documentation, although it worked in practice on some platforms. To change the compiler and flags used, you need to first have a Perl built with this compiler and flags compatible with what you'll want to set for texi2any, and then build texinfo against this Perl. I do not think that we can really do anything on that matter, except maybe improve documentation. > For instance, on Solaris 10. > > After CC="gcc -m64" PERL_EXT_CC="gcc -m64" > PERL_EXT_LDFLAGS="-Wl,-rpath,/opt/csw/lib", > the build fails with > > gmake all-am > gmake[4]: Entering directory > '/home/haible/texinfo-7.2.90/build-sparc-64-gcc/tta/C' > /opt/csw/bin/bash ../libtool --tag=CC --mode=compile gcc -m64 > -DHAVE_CONFIG_H -I. -I../../../tta/C -I../../../tta/C/main -I../../../tta/C > -DDATADIR=\"/home/haible/prefix-sparc64/share\" > -DSYSCONFDIR=\"/home/haible/prefix-sparc64/etc\" -I../../../tta/gnulib/lib > -I../gnulib/lib -I/home/haible/prefix-sparc64/include -Wall -D_REENTRANT > -D_REENTRANT -xO3 -m32 -xarch=sparc -I/opt/csw/bdb48/include > -I/opt/csw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 > -DPERL_USE_SAFE_PUTENV -KPIC -g -O2 -MT main/libperlcall_utils_la-xs_utils.lo > -MD -MP -MF main/.deps/libperlcall_utils_la-xs_utils.Tpo -c -o > main/libperlcall_utils_la-xs_utils.lo `test -f 'main/xs_utils.c' || echo > '../../../tta/C/'`main/xs_utils.c > libtool: compile: gcc -m64 -DHAVE_CONFIG_H -I. -I../../../tta/C > -I../../../tta/C/main -I../../../tta/C > -DDATADIR=\"/home/haible/prefix-sparc64/share\" > -DSYSCONFDIR=\"/home/haible/prefix-sparc64/etc\" -I../../../tta/gnulib/lib > -I../gnulib/lib -I/home/haible/prefix-sparc64/include -Wall -D_REENTRANT > -D_REENTRANT -xO3 -m32 -xarch=sparc -I/opt/csw/bdb48/include > -I/opt/csw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 > -DPERL_USE_SAFE_PUTENV -KPIC -g -O2 -MT main/libperlcall_utils_la-xs_utils.lo > -MD -MP -MF main/.deps/libperlcall_utils_la-xs_utils.Tpo -c > ../../../tta/C/main/xs_utils.c -fPIC -DPIC -o > main/.libs/libperlcall_utils_la-xs_utils.o > gcc: error: unrecognized command line option '-KPIC' > gmake[4]: *** [Makefile:3600: main/libperlcall_utils_la-xs_utils.lo] Error 1 > gmake[4]: Leaving directory > '/home/haible/texinfo-7.2.90/build-sparc-64-gcc/tta/C' > gmake[3]: *** [Makefile:2748: all] Error 2 > > Where does this option '-KPIC' come from? We find it in config.status: > > $ grep KPIC ./tta/config.status ./tta/perl/CheckXS/config.status > ./tta/config.status:S["perl_conf_EMBED_LIB_CFLAGS"]="-KPIC" > ./tta/perl/CheckXS/config.status:S["perl_conf_EMBED_LIB_CFLAGS"]="-KPIC" It is not exactly where it comes from, I think that perl_conf_EMBED_LIB_CFLAGS is unused. It comes from perl_conf_LIB_CFLAGS, then from PERL_CONF_cccdlflags, which is based on perl -V:cccdlflags, as also seen in perl -V output. > and we find it also in the 'perl -V' output: > > $ perl -V > Summary of my perl5 (revision 5 version 10 subversion 1) configuration: > Compiler: > cc='/opt/SUNWspro/bin/cc', ccflags ='-D_REENTRANT -xO3 -m32 -xarch=sparc > -I/opt/csw/bdb48/include -I/opt/csw/include -D_LARGEFILE_SOURCE > -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV', > Dynamic Linking: > dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R /opt/csw/lib' > cccdlflags='-KPIC', lddlflags='-G -L/opt/csw/lib -L/opt/csw/bdb48/lib > -L/usr/lib -L/usr/ccs/lib -L/lib' -- Pat
