pkgsrc/lang/ghc810/patches/patch-libraries_Cabal_Cabal_Distribution_Simple_GHC.hs
ryoon 3d49c90572 lang/ghc810: import ghc-8.10.4
GHC: The Glasgow Haskell Compiler.

The Glasgow Haskell Compiler is a robust, fully-featured, optimising
compiler for the functional programming language Haskell 98
(http://www.haskell.org). GHC compiles Haskell to either native code
or C. It implements numerous experimental language extensions to
Haskell, including concurrency, a foreign language interface, several
type-system extensions, exceptions, and so on. GHC comes with a
generational garbage collector, a space and time profiler, and a
comprehensive set of libraries.

This package provides the 8.10.x release series.
2021-02-09 13:16:24 +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 2021/02/09 13:16:24 ryoon 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