Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 524484

Summary: dev-lang/ghc-7.8.3 should depend on sys-devel/llvm
Product: Gentoo Linux Reporter: redneb <redneb>
Component: [OLD] DevelopmentAssignee: Gentoo's Haskell Language team <haskell>
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on: 424283    
Bug Blocks:    

Description redneb 2014-10-05 02:24:12 UTC
Older versions of dev-lang/ghc have an llvm USE flag to control whether the llvm code generator will be included. The ebuild for 7.8.3 does not have that flag and contains no references to llvm, yet after emerging it, I can compile with the llvm backend (via the -fllvm switch) without any issues. So either llvm should be included as a hard dependency of ghc or the USE flag should be reintroduced to make it an optional dependency.
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2014-10-05 09:52:10 UTC
ghc-7.6 had a comile-time knob:
    GhcWithLlvmCodeGen = YES / NO
which basically enabled -fllvm flag and included
small amount of code into ghc.

It was a serious overhead in rebuilding ghc
just to enable/disable llvm functionality.

ghc-7.8 dropped that conditional dependency
and always builds llvm support in it
(llvm does not need to be present at build time).

Having runtime-only switch is even worse
from rebuilding standpoint.

Unconditionally depend on llvm is infeasible
(and not desired) because:

- ghc's llvm support is experimental:
  - some architectures generate broken code with -fllvm
  - even amd64 does not pass all tests on llvm
  - some arcitectures are not supported by llvm at all (ia64)
  - current llvm-3.5 does not work with ghc-7.8.3

- llvm is a big thing to compile for quite
  small benefit.

it would be nice to have llvm precisely
expressed as a depend but it needs a
runtime-only USE-flag support from portage.

Which is a bug #424283