t-constants FAILs with GMP 6.2.1 on aarch64

Torbjörn Granlund tg at gmplib.org
Mon Dec 28 13:15:09 UTC 2020

[Sorry for the slow reply to your report!  I have been quite busy.]

I think I understand the problem, but how to fix it is not obvious to

  And GMP_ASM_RODATA likely arrives at the .text result since CFLAGS
  includes -flto.  Is there any reason to use CFLAGS in those tests?

It is common that CFLAGS affect the ABI and as a result the way things
are defined in asm.

  The other tests seem to just switch on target systems or use
  TRY_ASSEMBLE - that looks less fragile to me.

TRY_ASSEMBLE might not work too well with C snippets which we need to
use in GMP_ASM_RODATA.  :-)

  Defaulting to .text on aarch64 when using GOT relocations in asm
  is probably asking for trouble (see my case), I think the test
  should fail when running into

      echo "Couldn't find label: 
  ^${tmp_gsym_prefix}foo$gmp_cv_asm_label_suffix" >&AC_FD_CC

  rather than falling back to .text.  Alternatively all targets that
  use explicit references to [RO]DATA should have a safer default.

For some platforms, the correct segment for RODATA is .text.

  What's the collection of RODATA results "supported"?  As said a
  switch like for GMP_ASM_GLOBL looks less error-prone here.

Perhaps, but hardwiring things is against the spirit of autoconf and
creates a maintenance burden.

The syntax for rodata varies for between arm64 platforms.

Please encrypt, key id 0xC8601622

More information about the gmp-devel mailing list