Skip to content

Commit

Permalink
Merge pull request #4359 from arrowd/master
Browse files Browse the repository at this point in the history
Make `stack setup` command differentiate between FreeBSD versions.
  • Loading branch information
dbaynard authored Oct 22, 2018
2 parents dbe1572 + 572db6b commit ac2c759
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Stack/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit ac2c759

Please sign in to comment.