mpir-1.0 fails on x86-Darwin-tiger

1 view
Skip to first unread message

Mariah Lenox

unread,
Mar 23, 2009, 3:04:08 PM3/23/09
to mpir-devel
Bill,

mpir-1.0 on i686-apple-darwin8.11.1 built with gcc-4.3.3 fails in "make check".
(My understanding is that this is a Core, not a Core2 cpu.)

gcc -std=gnu99 -m32 -O2 -fomit-frame-pointer -mtune=pentiumpro -march=pentiumpro
-o t-bswap t-bswap.o ./.libs/libtests.a /usr/local/mpir-1.0/src/obj-x86-Darwin
-gcc-4.3.3-try2/.libs/libmpir.a ../.libs/libmpir.a
/usr/bin/ld: Undefined symbols:
_calling_conventions_ebp
_calling_conventions_ebx
_calling_conventions_edi
...

gmp suffers from the same failure on this architecture.

A workaround is to apply the patch that used to be listed in

http://gmplib.org/list-archives/gmp-bugs/2006-April/000317.html

(Fortunately I saved a private copy before it was censored.) The
workaround is to add at the bottom of test/x86call.asm:

C void gmp_x86check_workaround_apple_ld_bug()
C
C Apple ld has an annoying bug that causes it to only load members from
C static archives that satisfy text symbol dependencies. This procedure
C creates a bogus dependency on a text symbol in x86check.o (in libtests.a)
C to ensure that ld loads it, also making all of the needed non-text
C symbols available.

PROLOGUE(gmp_x86check_workaround_apple_ld_bug)
jmp *G(calling_conventions_check)
EPILOGUE()

Mariah

Bill Hart

unread,
Mar 25, 2009, 11:57:26 AM3/25/09
to mpir-...@googlegroups.com
Hi Mariah,

thanks for tracking this down for us. The patch is actually available
online at the link you gave. Perhaps the GMP server was having
temporary difficulties when you tried to access it from them again.

Given that this may affect the build on other architectures, I am
inclined to make a note of this and add the new patch in the next
release when we can again test with this addition. It doesn't prevent
the library itself from building, and I will put a link to the
workaround on the main webpage for people who wish to run make check
on this architecture.

Bill.

2009/3/23 Mariah Lenox <mariah...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages