gmp-5.0.0 fails to build on x86_64-apple-darwin10

Jack Howarth howarth at bromo.med.uc.edu
Fri Jan 15 02:30:41 CET 2010


On Tue, Jan 12, 2010 at 11:02:50PM +0100, Torbjorn Granlund wrote:
> Jack Howarth <howarth at bromo.med.uc.edu> writes:
> 
>     The build of gmp 5.0.0 on x86_64-apple-darwin10 fails with
>   the linkage...
>   
>   ld: in mpn/.libs/gcd_1.o, in section __TEXT,__text reloc 0: not extern and X86_64_RELOC_GOT_LOAD not supported
>   collect2: ld returned 1 exit status
>   
> We've gotten several reports about this problem.  We're working on a solution.  
> 
> -- 
> Torbjörn

Torbjörn,
    The attached patch, which redefines the LEA macro in mpn/x86_64/darwin.m4, eliminates
the build problems for ABI=64 on darwin10 and allows all of the gmp testsuite to pass.
                  Jack


-------------- next part --------------
--- gmp-5.0.0/mpn/x86_64/darwin.m4.org	2010-01-14 20:12:26.000000000 -0500
+++ gmp-5.0.0/mpn/x86_64/darwin.m4	2010-01-14 20:15:09.000000000 -0500
@@ -22,6 +22,10 @@
 dnl
 dnl  Simply override the definition in x86_64-defs.m4.
 
+define(`LEA',`
+	lea	$1(%rip), $2
+')
+
 define(`CALL',`call	GSYM_PREFIX`'$1')
 
 


More information about the gmp-bugs mailing list