Hadrian should build dynamically linked ghc binary
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 [this PR](https://github.com/haskell/cabal/pull/5606)).
1. Use .cabal extra-dynamic-library-flavours for the RTS (see [this comment](https://github.com/snowleopard/hadrian/issues/695#issue-367436377), depends on 1.)
1. Hadrian: fix management of nontrivial dynamic flavours of libHSrts (see [this PR](https://github.com/snowleopard/hadrian/pull/698)).
1. Hadrian should build ghc with the `-fPIC -dynamic` options (see [this comment](https://github.com/DavidEichmann/ghc/commit/752021f69f577b678630302b567fd712c565624b#diff-408bbe46d4afae11991cbadb2c531b78), depends on 3.).
1. Use the correct relative path to the dynamically linked libraries (see [D5281](https://phabricator.haskell.org/D5281), depends on 3. and 4.).
1. Build ghc-iserv-dyn, as it is will be required required by many tests (Phab:D5327)
1. Hadrian should only use "-shared -dynload deploy" when linking shared libraries (definitely not when linking executables). This problem causes ghc-iserv-dyn to segfault because it is built as a shared library instead of as an executable.
issue