gmp 4.2.2 on Mac OS X
Roine Gustafsson
roine at users.sourceforge.net
Wed Sep 12 15:19:19 CEST 2007
Re: non-pic doesn't work on Mac OS X: Dynamic libraries (.dylib) are
required to be PIC (-fPIC).
Applications can, and are recommended for performance reasons to be
non-pic, but they should be compiled with "-mdynamic-no-pic".
man gcc:
-mdynamic-no-pic
On Darwin and Mac OS X systems, compile code so that it
is not
relocatable, but that its external references are
relocatable. The
resulting code is suitable for applications, but not shared
libraries.
$gcc -mdynamic-no-pic -m32 ~/hello.c
$./a.out
hello
./configure --host=none-apple-darwin --with-pic
passed make check for me (IntelMac, Mac OS X 10.4, Xcode 2.4.1)
$gcc --version
i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build
5367)
But gmp-4.2.2 installs /usr/local/lib/libgmp.3.4.2.dylib, is that
correct??
According to Makefile.am, it should even be 7.2.4.
$grep library_names libgmp.la
library_names='libgmp.3.4.2 libgmp.3 libgmp'
/Roine
More information about the gmp-discuss
mailing list