gmp 4.2 fails tests on G5

Jack Howarth howarth at
Thu Apr 27 18:43:55 CEST 2006

    Perhaps I wasn't clear about the simplicity of the workaround.
If you take the previous example...

[macintosh:~] cat foo.c
extern int a;
int foo(void) { return a; }
[macintosh:~] cat bar.c
int a = 1;
[macintosh:~] prrlab% cc -fPIC -fast -c bar.c -arch ppc
[macintosh:~] prrlab% cc -fPIC -fast -c foo.c -arch ppc
[macintosh:~] prrlab% cc -dynamiclib -o libfoo.dylib foo.o bar.o -arch ppc

An explicit use of -fPIC is entirely sufficient to work around this problem.
I don't understand at all why you are so quick to dump -fast over this
issue. For any other platform you would have had to add the explicit
-fPIC anyway. So the very worst that can be said is that it voids the
implicit -fPIC that is normally used by the Apple gcc compiler. However
I don't like to rely on that in anycase. When I create shared libraries
on MacOS X, I always include -fPIC out of habit. It does no harm.

More information about the gmp-bugs mailing list