pkgsrc/lang/ghc88/patches/patch-libraries_Cabal_Cabal_Distribution_Simple_GHC.hs
2020-01-17 07:10:56 +00:00

31 lines
1.4 KiB
Haskell
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

$NetBSD: patch-libraries_Cabal_Cabal_Distribution_Simple_GHC.hs,v 1.1 2020/01/17 07:10:57 pho Exp $
Enable Cabal's rpath overriding functionality on all the platforms
known to use ELF.
When a Cabal package which defins both a library and an executable is
to be built, GHC by default embeds an rpath to the *build* directory
into the executable. This may sound like a bug in GHC but is actually
not, because GHC doesn't know the fact that the said library is going
to be installed elsewhere. To overcome this issue, Cabal has a
functionality to disable the default rpath handling of GHC and
construct the correct set of rpaths... but only on certain platforms
for some reason.
--- libraries/Cabal/Cabal/Distribution/Simple/GHC.hs.orig 2020-01-16 22:47:21.132921936 +0000
+++ libraries/Cabal/Cabal/Distribution/Simple/GHC.hs
@@ -1725,10 +1725,10 @@ getRPaths lbi clbi | supportRPaths hostO
case compid of
CompilerId GHC ver | ver >= mkVersion [7,10,2] -> True
_ -> False
- supportRPaths OpenBSD   = False
- supportRPaths NetBSD   = False
- supportRPaths DragonFly = False
- supportRPaths Solaris = False
+ supportRPaths OpenBSD   = True
+ supportRPaths NetBSD   = True
+ supportRPaths DragonFly = True
+ supportRPaths Solaris = True
supportRPaths AIX = False
supportRPaths HPUX = False
supportRPaths IRIX = False