
On Thu, Jan 17, 2013 at 12:01 PM, Johan Tibell
I forgot I once raised this on the GHC bug tracker: http://hackage.haskell.org/trac/ghc/ticket/7025
Here's what Simon M had to say back then:
"The right thing is to put -msse in the cc-options field of your .cabal file, if that's what you want.
I'm distinctly uneasy about having -msse magically pass through to gcc.
* There are many flags that we do not pass through to gcc, so having one that we do pass through could be confusing (and lead to lots more requests for more flags to be passed through)
* What if there is a variant of -msse that gcc supports but we don't? Wouldn't we have to keep them in sync?
I'm going to close this as wontfix, but please feel free to reopen and disagree."
One problem with having the user set cc-options in addition to passing -msse to GHC, is that the user might not realize that he/she needs to do this. This is bad if you use -fllvm, as your -msse will essentially just be ignored as the LLVM primitives we use in the LLVM backend (e.g. for popcnt) won't convert to SSE instructions. Even worse, LLVM doesn't support a -msse flag, instead you need to use -mattr=+sse, so the user needs to be aware of this difference and change his/her flags depending on if we use the native backend or the LLVM backend. -- Johan