Hadrian: fix library install paths in bindist Makefile (#16498)
authorSylvain Henry <sylvain@haskus.fr>
Fri, 29 Mar 2019 19:33:16 +0000 (20:33 +0100)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Tue, 9 Apr 2019 16:50:15 +0000 (12:50 -0400)
commitfe40ddd9f960d89fbb430962f642ee9b053a0492
treecfbce73555feb460ee325dd8244bb8e13833e5e1
parent14a7870770fb2dd2e096bc13e8c927d49c868911
Hadrian: fix library install paths in bindist Makefile (#16498)

GHC now works out-of-the-box (i.e. without any wrapper script) by
assuming that @bin@ and @lib@ directories sit next to each other. In
particular, its RUNPATH uses $ORIGIN-based relative path to find the
libraries.

However, to be good citizens we want to support the case where @bin@ and
@lib@ directories (respectively BINDIR and LIBDIR) don't sit next to
each other or are renamed. To do that the install script simply creates
GHC specific @bin@ and @lib@ siblings directories into:

   LIBDIR/ghc-VERSION/{bin,lib}

Then it installs wrapper scripts into BINDIR that call the appropriate
programs into LIBDIR/ghc-VERSION/bin/.

The issue fixed by this patch is that libraries were not installed into
LIBDIR/ghc-VERSION/lib but directly into LIBDIR.
hadrian/src/Rules/BinaryDist.hs