gmp 4.2 fails tests on G5
Jack Howarth
howarth at bromo.msbb.uc.edu
Thu Apr 27 14:52:47 CEST 2006
Torbjörn,
It was explained to me on the darwin-dev list that the use of -fast
implies that -mdynamic-no-pic gets set. As for detecting differences
between code compiled with or without -fPIC, I not sure how one can do
that on darwin. On Linux you can use readelf to detect the TEXTREL with...
readelf -d foo.so | grep TEXTREL
In any case, the bug you are seeing with the GMP builds is clarified in
this message...
http://gcc.gnu.org/ml/gcc/2006-04/msg00523.html
In so far as this issue is an Apple compiler bug, it is only due to the
fact that the linker doesn't issue an error when linking in non-PIC code.
Have you actually done a test build of GMP on your G5 with -fPIC
manually added to the compiler flags? It should now pass all of make
check fine.
Jack
ps Jakub Jelinek also says that any arch which uses binutils ought to
be able to get a warning at least about the presence of non-PIC code
by using the -Wl,--warn-shared-textrel flag. However, I'm not sure
that Darwin supports that and even how to get it passed through
libtool.
More information about the gmp-bugs
mailing list