On Wed, Dec 5, 2012 at 12:03 AM, Chris Smith <cdsmith@gmail.com> wrote:
I'm curious how much of the "compile twice" situation for static and dynamic libraries could actually be shared.  

Probably none; on most platforms you're actually generating different code (dynamic libraries require generation of position-independent code).  That said, the PPC ABI uses position-independent code even for static libraries and I think Apple decided to go that route on Intel as well rather than change their build system ... but if you do this then linking to other platform-native libraries may be more difficult.  Not a problem for Apple since they control the ABI, but not something ghc can force on libc or random libraries someone might want to use FFI with.

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net