Opened 3 years ago

Closed 3 years ago

#7025 closed bug (wontfix)

-msse should be forwarded to the C compiler

Reported by: tibbe Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.4.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):

Description (last modified by tibbe)

The -msse<version> flag can be used to have the native and LLVM backends emit SSE instructions. Since a Haskell project might contain C code in addition to Haskell code and since that code usually goes through ghc (which calls gcc) it would be nice if ghc forwarded the -msse flag when it invokes the C compiler, so the latter can use SSE instructions as well.

While this is possible today by using -optc it would be nice if the user doesn't have to remember to pass this flag in addition to -msse.

Change History (2)

comment:1 Changed 3 years ago by tibbe

  • Description modified (diff)

comment:2 Changed 3 years ago by simonmar

  • difficulty set to Unknown
  • Resolution set to wontfix
  • Status changed from new to closed

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.

Note: See TracTickets for help on using tickets.