On Sun, Jan 11, 2026 at 06:18:20PM +0100, Bruno Haible wrote: > On platforms where gcc (or clang) is not the native compiler, it can be > impossible to build texinfo with gcc. > > For instance, on AIX 7.1. > > After CC="gcc -maix64" PERL_EXT_CC="gcc -maix64" > the build fails with: > > /bin/sh ../libtool --tag=CC --mode=compile gcc -maix64 -DHAVE_CONFIG_H -I. > -I../../../tta/C -I../../../tta/C/main -I../../../tta/C > -DDATADIR=\"/home/haible/prefix64/share\" > -DSYSCONFDIR=\"/home/haible/prefix64/etc\" -I../../../tta/gnulib/lib > -I../gnulib/lib -I/home/haible/prefix64/include -Wall -D_THREAD_SAFE > -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 -qnoansialias > -qlanglvl=extc99 -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32 -D_LARGE_FILES > -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 -maix64 -DHAVE_CONFIG_H -I. -I../../../tta/C > -I../../../tta/C/main -I../../../tta/C > -DDATADIR=\"/home/haible/prefix64/share\" > -DSYSCONFDIR=\"/home/haible/prefix64/etc\" -I../../../tta/gnulib/lib > -I../gnulib/lib -I/home/haible/prefix64/include -Wall -D_THREAD_SAFE > -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 -qnoansialias > -qlanglvl=extc99 -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32 -D_LARGE_FILES > -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 '-qmaxmem=-1' > gcc: error: unrecognized command line option '-qnoansialias' > gcc: error: unrecognized command line option '-qlanglvl=extc99' > gcc: error: unrecognized command line option '-q32' > gmake[4]: *** [Makefile:3600: main/libperlcall_utils_la-xs_utils.lo] Error 1 > > Where do these options '-qmaxmem=-1' etc. come from?
They are coming from the 'ccflags' values or similar that you can see in the output of "perl -V". It's completely wrong to provide these flags to gcc. As your output from "perl -V" shows, the only compiler these should be passed to is the one called "xlc_r". If that is not available, the Perl extension modules should not be built. We could investigate why this failure is not picked up in the check for whether XS modules can be built. The check takes place in a subdirectory with its own configure.ac (tta/perl/CheckXS). It does use the compiler given by PERL_EXT_CC, but may not test this with all of the same flags as are used for the real build. Does the build work if you only give the value of CC, not the value of PERL_EXT_CC? It's possible you could get further by also setting PERL_EXT_CFLAGS and PERL_EXT_LDFLAGS, athough this seems unlikely. > > $ perl -V > Summary of my perl5 (revision 5 version 28 subversion 1) configuration: > > Platform: > osname=aix > osvers=7.1.0.0 > archname=aix-thread-multi > uname='aix fvt-p7a2-lp2 1 7 0000668a7a00 ' > config_args='-d -Dprefix=/usr/opt/perl5 -Dcc=xlc_r -Duseshrplib > -Dusethreads' > hint=previous > useposix=true > d_sigaction=define > useithreads=define > usemultiplicity=define > use64bitint=undef > use64bitall=undef > uselongdouble=undef > usemymalloc=n > default_inc_excludes_dot=define > bincompat5005=undef > Compiler: > cc='xlc_r' > ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 > -qnoansialias -qlanglvl=extc99 -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32 > -D_LARGE_FILES' > optimize='-O' > cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 > -qnoansialias -qlanglvl=extc99 -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT' > ccversion='' > gccversion='' > gccosandvers='' > intsize=4 > longsize=4 > ptrsize=4 > doublesize=8 > byteorder=4321 > doublekind=4 > d_longlong=define > longlongsize=8 > d_longdbl=define > longdblsize=8 > longdblkind=0 > ivtype='long' > ivsize=4 > nvtype='double' > nvsize=8 > Off_t='off_t' > lseeksize=8 > alignbytes=8 > prototype=define > Linker and Libraries: > ld='ld' > ldflags =' -brtl -bdynamic -b32' > libpth=/lib /usr/lib /usr/ccs/lib /usr/lib64 > libs=-lpthread -lbind -lnsl -lgdbm -ldbm -ldl -lld -lm -lcrypt -lpthreads > -lc > perllibs=-lpthread -lbind -lnsl -ldl -lld -lm -lcrypt -lpthreads -lc > libc=/lib/libc.a > so=a > useshrplib=true > libperl=libperl.a > gnulibc_version='' > Dynamic Linking: > dlsrc=dl_aix.xs > dlext=so > d_dlsymun=undef > ccdlflags=' -bE:/usr/opt/perl5/lib/5.28.1/aix-thread-multi/CORE/perl.exp > -bE:/usr/opt/perl5/lib/5.28.1/aix-thread-multi/CORE/perl.exp' > cccdlflags=' ' > lddlflags='-bhalt:4 -G -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp > -bnoentry -lpthreads -lc -lm' > > > Characteristics of this binary (from libperl): > Compile-time options: > HAS_TIMES > MULTIPLICITY > PERLIO_LAYERS > PERL_COPY_ON_WRITE > PERL_DONT_CREATE_GVSV > PERL_IMPLICIT_CONTEXT > PERL_MALLOC_WRAP > PERL_OP_PARENT > PERL_PRESERVE_IVUV > USE_ITHREADS > USE_LARGE_FILES > USE_LOCALE > USE_LOCALE_COLLATE > USE_LOCALE_CTYPE > USE_LOCALE_NUMERIC > USE_LOCALE_TIME > USE_PERLIO > USE_PERL_ATOF > USE_REENTRANT_API > Built under aix > Compiled at Jul 14 2020 01:58:05 > %ENV: > PERL_EXT_CC="gcc -maix64" > @INC: > /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi > /usr/opt/perl5/lib/site_perl/5.28.1 > /usr/opt/perl5/lib/5.28.1/aix-thread-multi > /usr/opt/perl5/lib/5.28.1 > /usr/opt/perl5/lib/site_perl > > >
