summaryrefslogtreecommitdiff
path: root/devel/stack/files/patch-ino64-support
diff options
context:
space:
mode:
Diffstat (limited to 'devel/stack/files/patch-ino64-support')
-rw-r--r--devel/stack/files/patch-ino64-support26
1 files changed, 26 insertions, 0 deletions
diff --git a/devel/stack/files/patch-ino64-support b/devel/stack/files/patch-ino64-support
new file mode 100644
index 000000000000..9c6b3ae4353e
--- /dev/null
+++ b/devel/stack/files/patch-ino64-support
@@ -0,0 +1,26 @@
+diff --git a/src/Stack/Setup.hs b/src/Stack/Setup.hs
+index bd7b1d3cd..c43efaab6 100644
+--- src/Stack/Setup.hs
++++ src/Stack/Setup.hs
+@@ -96,6 +96,7 @@ import System.FilePath (searchPathSeparator)
+ import qualified System.FilePath as FP
+ import System.Permissions (setFileExecutable)
+ import RIO.Process
++import RIO.List
+ import Text.Printf (printf)
+
+ #if !WINDOWS
+@@ -614,6 +615,13 @@ getGhcBuilds = do
+ _ -> CompilerBuildSpecialized (intercalate "-" c))
+ libComponents
+ #if !WINDOWS
++ Platform _ Cabal.FreeBSD -> do
++ let getMajorVer = readMaybe <=< headMaybe . (splitOn ".")
++ majorVer <- getMajorVer <$> sysRelease
++ if majorVer >= Just (12 :: Int) then
++ useBuilds [CompilerBuildSpecialized "ino64"]
++ else
++ useBuilds [CompilerBuildStandard]
+ Platform _ Cabal.OpenBSD -> do
+ releaseStr <- mungeRelease <$> sysRelease
+ useBuilds [CompilerBuildSpecialized releaseStr]