t-constants FAILs with GMP 6.2.1 on aarch64
Richard Biener
rguenther at suse.de
Mon Jan 4 09:25:11 UTC 2021
On Mon, 28 Dec 2020, Torbjörn Granlund wrote:
> [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
> me.
>
> 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
>
> else
> 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.
Hmm, OK. A simpler(?) alternative might be to check for
compiler support of -fno-lto and unconditionally append that
to CFLAGS for this (or all) configure test(s)?
Richard.
--
Richard Biener <rguenther at suse.de>
SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg,
Germany; GF: Felix Imendörffer; HRB 36809 (AG Nuernberg)
More information about the gmp-devel
mailing list