Have enabled support for -fPIC and -dynamic on Linux x64, for other platforms have changed DynFlags.hs to issue a warning and drop -fllvm if -dynaimc or -fPIC are also present.
It was pointed out to me today that 64 bit OSX has -fPIC turned on by default, because that's what the platform ABI requires (quite sensibly), but GHC disables -fllvm automatically as a result. Hence you can't use -fllvm on 64-bit OSX at all.
I expect we're being too conservative here and it would be fine to enable -fllvm. As I understand it, -dynamic is the real problem, not -fPIC. David?
Trac metadata
Trac field
Value
Priority
normal → high
dtereichanged title from LLVM: Dynamic Library Support to LLVM: Dynamic Library Support1
changed title from LLVM: Dynamic Library Support to LLVM: Dynamic Library Support1
I don't really know without testing. What is the state of the 64bit version of GHC on OSX? Ben Lippmeier has graciously provided me with access to his OS X machine and I've been using this to do any testing and development. His machine seems to be running a 32bit kernel though (although its running 10.6 on Core i7 hardware). It seems though that I should be able to run a 64bit version of GHC on this still, correct? Also how closely does GHC follow the standard ABI for PIC on OSX? I think you're correct that -dynamic is the real problem though.
dtereichanged title from LLVM: Dynamic Library Support1 to LLVM: Dynamic Library Support
changed title from LLVM: Dynamic Library Support1 to LLVM: Dynamic Library Support
I don't really know without testing. What is the state of the 64bit version of GHC on OSX? Ben Lippmeier has graciously provided me with access to his OS X machine and I've been using this to do any testing and development. His machine seems to be running a 32bit kernel though (although its running 10.6 on Core i7 hardware). It seems though that I should be able to run a 64bit version of GHC on this still, correct?
I'm running a 64-bit GHC with a 32-bit kernel and it works fine:
So I had a test of it on OSX. It mostly works but there are a significant amount of testsuite failures. On 32bit OSX there are no failure with the LLVM backend. On 64bit using -fPIC there are around 70 failures. I haven't looked into why they are failing at all yet, most the ffi tests seem to fail so potentially all the failures are related to that. Not sure when I'll have time to figure out what the failures are caused by so I'm tempted to enable the LLVM backend under 64bit OSX and just add a big warning that it has a good chance of not working... Depends on when 7.2 release happens I guess.
David: in commit 22423fc9 you disabled -fllvm on OS X 64 unconditionally, because it has -fPIC on by default. Was that intentional? This was the problem that originally caused us to raise this ticket to high prio, and it seems to be back again. I'm confused.