Change GHC to use clang on OSX as the assembler driver

2011-11-03 Thread David Terei
Hi Manuel and all, GHC 7.4 with LLVM 3.0 on OSX doesn't work correctly because LLVM as of 3.0 generates assembly code that is incompatible with the system linker. (used through as or gcc). After talking to the LLVM guys it turns out this is a deliberate choice. The OS X system assembler isn't

Re: Change GHC to use clang on OSX as the assembler driver

2011-11-03 Thread Thomas Schilling
I'm pretty sure Clang doesn't come with 10.5. I don't remember having to do anything special with 10.6, but I don't know whether 10.6's version is compatible with the latest version. How can I find out? As for my personal stance on upgrading: My 10.5 laptop is a 1st-gen MacBook which are 32

Re: Change GHC to use clang on OSX as the assembler driver

2011-11-03 Thread Johan Tibell
On Thu, Nov 3, 2011 at 8:39 AM, Thomas Schilling nomin...@googlemail.comwrote: As for my personal stance on upgrading: My 10.5 laptop is a 1st-gen MacBook which are 32 bit only, so it doesn't make much sense to upgrade to 10.6. My work Mac does run 10.6 but I've only heard of people having

Re: Change GHC to use clang on OSX as the assembler driver

2011-11-03 Thread Bryan O'Sullivan
On Thu, Nov 3, 2011 at 8:39 AM, Thomas Schilling nomin...@googlemail.comwrote: I think Bryan O'Sullivan recently reported having issues after upgrading to 10.7 as well. My problems have been firmware-related, so don't worry on that score. It seems pretty clear that in order to get working

Re: Change GHC to use clang on OSX as the assembler driver

2011-11-03 Thread Ian Lynagh
On Thu, Nov 03, 2011 at 10:24:21AM -0700, Bryan O'Sullivan wrote: It seems pretty clear that in order to get working 10.7 support, the LLVM components will require a 10.6 compatible bridge for a year or so. I realize that makes David do more work (both to handle the two code paths, and

Re: Change GHC to use clang on OSX as the assembler driver

2011-11-03 Thread David Terei
OK thanks for the info everyone. I'll look at supporting both gcc and clang depending on availability. The LLVM backend works great with clang but sadly the NCG doesn't so we can't just switch across to clang completely. On 3 November 2011 10:32, Ian Lynagh ig...@earth.li wrote: On Thu, Nov 03,

Re: Change GHC to use clang on OSX as the assembler driver

2011-11-03 Thread Manuel M T Chakravarty
David, As this is only about the LLVM backend, I would propose to just use the clang assembler and not worry about as/gcc. People who are stuck with OS X 10.5 might not be able to use the LLVM backend with clang, but they can still use the NCG, and they will be a small minority. OS X users