
#15837: Hadrian should build dynamically linked ghc binary -------------------------------------+------------------------------------- Reporter: davide | Owner: davide Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.6.1 (Hadrian) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by davide: Old description:
The ghc binary is dynamically linked via make in various flavors (e.g. quick). Hadrian builds a static linked binary in these cases (this is a bug). Various change are needed to fix this:
1. Add new .cabal file field extra-dynamic-library-flavours (see [https://github.com/haskell/cabal/pull/5606 this PR]). 2. Use .cabal extra-dynamic-library-flavours for the RTS (see [https://github.com/snowleopard/hadrian/issues/695#issue-367436377 this comment], depends on 1.) 3. Hadrian: fix management of nontrivial dynamic flavours of libHSrts (see [https://github.com/snowleopard/hadrian/pull/698 this PR]). 4. Hadrian should build ghc with the `-fPIC -dynamic` options (see [https://github.com/DavidEichmann/ghc/commit/752021f69f577b678630302b567fd712... #diff-408bbe46d4afae11991cbadb2c531b78 this comment], depends on 3.). 5. Use the correct relative path to the dynamically linked libraries (see [https://phabricator.haskell.org/D5281 this change], depends on 3. and 4.).
New description: The ghc binary is dynamically linked via make in various flavors (e.g. quick). Hadrian builds a static linked binary in these cases (this is a bug). Various change are needed to fix this: 1. Add new .cabal file field extra-dynamic-library-flavours (see [https://github.com/haskell/cabal/pull/5606 this PR]). 2. Use .cabal extra-dynamic-library-flavours for the RTS (see [https://github.com/snowleopard/hadrian/issues/695#issue-367436377 this comment], depends on 1.) 3. Hadrian: fix management of nontrivial dynamic flavours of libHSrts (see [https://github.com/snowleopard/hadrian/pull/698 this PR]). 4. Hadrian should build ghc with the `-fPIC -dynamic` options (see [https://github.com/DavidEichmann/ghc/commit/752021f69f577b678630302b567fd712... #diff-408bbe46d4afae11991cbadb2c531b78 this comment], depends on 3.). 5. Use the correct relative path to the dynamically linked libraries (see [https://phabricator.haskell.org/D5281 this change], depends on 3. and 4.). 6. Build ghc-iserv-dyn, as it is will be required required by many tests (see/depends on [https://phabricator.haskell.org/D5255 patch for ghc- iserv-prof]) -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15837#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler