On platforms where gcc (or clang) is not the native compiler, it can be
impossible to build texinfo with gcc.

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"

and we find it also in the 'perl -V' output:

$ perl -V
Summary of my perl5 (revision 5 version 10 subversion 1) configuration:
  Commit id: f49f26c46eb30e17edc39f23c060b8294c44115b
  Platform:
    osname=solaris, osvers=2.10, archname=sun4-solaris-thread-multi
    uname='sunos unstable10s 5.10 generic_142909-17 sun4v sparc 
sunw,sparc-enterprise-t5220'
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  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',
    optimize='-xO3 -m32 -xarch=sparc',
    cppflags='-D_REENTRANT -xO3 -m32 -xarch=sparc -I/opt/csw/bdb48/include 
-I/opt/csw/include'
    ccversion='Sun C 5.9 SunOS_sparc Patch 124867-16 2010/08/11', 
gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='/opt/SUNWspro/bin/cc', ldflags ='-m32 -xarch=sparc -L/opt/csw/lib 
-lperl -L/opt/csw/bdb48/lib -L/opt/csw/lib -L/usr/lib -L/usr/ccs/lib -L/lib'
    libpth=/usr/lib /usr/ccs/lib /lib /opt/csw/lib
    libs=-lsocket -lnsl -lgdbm -ldb-4.8 -ldl -lm -lpthread -lc -lperl
    perllibs=-lsocket -lnsl -ldb-4.8 -ldl -lm -lpthread -lc -lperl
    libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so.5.10.1
    gnulibc_version=''
  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'


Characteristics of this binary (from libperl):
  Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
                        PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
                        PERL_USE_SAFE_PUTENV USE_ITHREADS USE_LARGE_FILES
                        USE_PERLIO USE_REENTRANT_API USE_SITECUSTOMIZE
  Built under solaris
  Compiled at Jul 24 2012 13:41:27
  %ENV:
    PERL_EXT_CC="gcc -m64"
    PERL_EXT_LDFLAGS="-Wl,-rpath,/opt/csw/lib"
  @INC:
    /opt/csw/lib/perl/site_perl
    /opt/csw/share/perl/site_perl
    /opt/csw/share/perl/site_perl
    /opt/csw/lib/perl/csw
    /opt/csw/share/perl/csw
    /opt/csw/share/perl/csw
    /opt/csw/lib/perl/5.10.1
    /opt/csw/share/perl/5.10.1
    .




              • ... G. Branden Robinson
              • ... Eli Zaretskii
              • ... Gavin Smith
          • ... Gavin Smith
      • ... Per Bothner
        • ... Gavin Smith
  • Re: ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
    • ... Patrice Dumas
    • ... Patrice Dumas
      • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
  • Re: ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
    • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
    • ... Patrice Dumas
      • ... Gavin Smith
  • Re: ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
    • ... Gavin Smith
      • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
        • ... Gavin Smith
  • Re: ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
    • ... Patrice Dumas
      • ... Eli Zaretskii

Reply via email to