Wire up library-dirs-static and extra-libraries-static in GHC
With the new fields library-dirs-static and extra-libraries-static InstalledPackageInfo supports a way to specify libraries for static linking separately from extra-libraries/library-dirs. This allows us to switch smoothly between dynamic and static linking of system libraries.
Cabal and cabal-install already do the right thing and populate the new fields when using pkg-config-depends.
What's left is the GHC side of things:
-
Bump GHC's Cabal dependency to support library-dirs-staticandextra-libraries-static. This has been done. -
Introduce library-dirs-staticandextra-libraries-staticto ghc-pkg -
When statically linking an executable consult above fields for extra libraries to link (instead of always consulting extra-libraries/library-dirsas we do now)
Edited by Alex Biehl