Hi Gavin,

> > So, IMO the way to go forward with this, i.e. to allow a different compiler
> > but without running into link errors, is
> >   1) from the Perl configuration, extract the ABI,
> >   2) from $CC and $CFLAGS, extract the ABI (e.g. using Gnulib's 
> > gl_HOST_CPU_C_ABI
> >      macro, module 'host-cpu-c-abi'),
> >   3) compare the two ABIs and err out if they are different.
> > 
> Unfortunately builds tend to break in strange ways if the compiler flags
> aren't exactly the same way, even if the ABI as you describe matches.

Oh well. Sigh. I didn't know that you already went through all this trouble
on this issue.

> Here are some of Perl's flags, listed in the copy of tta/config.log in
> my build tree:
> 
> perl_conf_CFLAGS='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv 
> -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE 
> -D_FILE_OFFSET_BITS=64'
> perl_conf_CPPFLAGS='-I/usr/lib/x86_64-linux-gnu/perl/5.38/CORE'
> perl_conf_EMBED_LIB_CFLAGS='-fPIC'
> perl_conf_LDFLAGS='-Wl,-E  -fstack-protector-strong -L/usr/local/lib'
> perl_conf_LIBS='-L/usr/lib/x86_64-linux-gnu/perl/5.38/CORE -lperl'
> perl_conf_LIB_CFLAGS='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv 
> -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE 
> -D_FILE_OFFSET_BITS=64 -fPIC'
> perl_conf_LIB_LDFLAGS='-Wl,-E  -fstack-protector-strong -L/usr/local/lib'

Indeed, -D_LARGEFILE_SOURCE, -D_FILE_OFFSET_BITS=64, and probably also
-fstack-protector-strong all modify the ABI. And on 32-bit glibc platforms
there's now also the 64-bit time_t option. And so on...

It's a harder problem than I imagined.

Bruno




    • ... 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
      • ... Gavin Smith
        • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
          • ... Gavin Smith
            • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
  • 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
          • ... Patrice Dumas
            • ... Patrice Dumas
  • Re: ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
    • ... Patrice Dumas
      • ... Eli Zaretskii
        • ... Eli Zaretskii

Reply via email to