Fwd: Re: Assembler error (invert_limb_table.asm) using gcc/x86_64-pc-msys/5.3.0

Niels Möller nisse at lysator.liu.se
Thu Dec 22 09:09:51 UTC 2016


David Deharbe <david.deharbe at clearsy.com> writes:

> It seems the offending line is caused by a definition for PROTECT
> found in mpn/x86_64/x86_64-defs.m4.

According to Gas documentation, .hidden is ELF-only. So shouldn't be
used on windows.

> I do not know what needs to be fixed though (gmp or the compilation
> toolchain).

I think the problem is in the GMP configure script. On windows, the m4
include files are supposed to include mpn/x86_64/dos64.m4, which
overrides the definition of PROTECT.

I think you need to add a pattern in config.ac around line 3710 to
recognize a native window build using msys (which is what you are doing,
iirc), here:

        64|x32)
          GMP_INCLUDE_MPN(x86_64/x86_64-defs.m4)
          AC_DEFINE(HAVE_HOST_CPU_FAMILY_x86_64)
	  case $host in
	    *-*-darwin*)
	      GMP_INCLUDE_MPN(x86_64/darwin.m4) ;;
	    *-*-mingw* | *-*-cygwin)
	      GMP_INCLUDE_MPN(x86_64/dos64.m4) ;;
	    *-openbsd*)
	      GMP_DEFINE_RAW(["define(<OPENBSD>,1)"]) ;;
	    *-linux*)
	      GMP_DEFINE_RAW(["define(<LINUX>,1)"]) ;;
	  esac
          ;;

Alternatively, one could add a configure test for .hidden, similar to
other GMP_ASM_* tests defined in acinclude.m4. Or repurpose one of the
existing tests related to COFF and ELF features.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.


More information about the gmp-bugs mailing list