Broken PIC support in OS X

Torbjorn Granlund tg at
Sat Aug 6 18:37:38 CEST 2011

Manuel M T Chakravarty <chak at> writes:

  The problem that I see with this policy for OS X 10.7 is that a non
  PIC library prevents the creation of a PIE executable, which in turn
  prevents address space layout randomisation.  AFAIK this is the reason
  why Apple discourages non PIC code on this platform and made PIC the

I suppose people that worry about these issues should simply stick to
the "dylib" variant of the created library.

  The --disable-shared configure option doesn't seem to make a difference:
Sorry, I meant to say --disable-static.  (--disable-shared disables
compilation of the shared lib, --disable-static disables compilation of
the non-shared, aka static, lib.)


More information about the gmp-bugs mailing list