lang/ghc94: Copy from lang/ghc

This commit is contained in:
Gleb Popov 2024-02-25 12:54:21 +03:00
parent 71fc4bcee3
commit 1b1770fc56
4 changed files with 5258 additions and 0 deletions

View File

@ -101,6 +101,7 @@
SUBDIR += ghc
SUBDIR += ghc810
SUBDIR += ghc92
SUBDIR += ghc94
SUBDIR += gir-to-d
SUBDIR += gjs
SUBDIR += gleam

27
lang/ghc94/Makefile Normal file
View File

@ -0,0 +1,27 @@
PKGNAMESUFFIX= 94
LIB_DEPENDS= ${GMP_LIB_DEPENDS}
CONFIGURE_ARGS= ${GMP_CONFIGURE_ON}
OPTIONS_DEFINE= DYNAMIC PROFILE
GHC_VERSION= 9.4.8
LLVM_VERSION= 13
BASE_PACKAGES= Cabal-3.8.1.0 array-0.5.4.0 base-4.17.2.1 binary-0.8.9.1 \
bytestring-0.11.5.3 containers-0.6.7 deepseq-1.4.8.0 \
directory-1.3.7.1 exceptions-0.10.5 filepath-1.4.2.2 \
ghc-${GHC_VERSION} ghc-bignum-1.3 ghc-compact-0.1.0.0 \
ghc-prim-0.9.1 haskeline-0.8.2 hpc-0.6.1.0 \
integer-gmp-1.1 mtl-2.2.2 parsec-3.1.16.1 pretty-1.1.3.6 \
process-1.6.18.0 stm-2.5.1.0 template-haskell-2.19.0.0 \
terminfo-0.4.1.5 text-2.0.2 time-1.12.2 \
transformers-0.5.6.2 unix-2.7.3 xhtml-3000.2.2.1
BOOT_GHC_VERSION= 9.2.8
BOOT_LLVM_VERSION= 12
MASTERDIR= ${.CURDIR}/../ghc
PATCHDIR= ${.CURDIR}/files
# PLIST for this port is set in the master one
.include "${MASTERDIR}/Makefile"

View File

@ -0,0 +1,74 @@
-- Ensure we don't expose any unfoldings to guarantee quick rebuilds
{-# OPTIONS_GHC -O0 #-}
-- If you want to customise your build you should copy this file from
-- hadrian/src/UserSettings.hs to hadrian/UserSettings.hs and edit your copy.
-- If you don't copy the file your changes will be tracked by git and you can
-- accidentally commit them.
--
-- See doc/user-settings.md for instructions, and src/Flavour.hs for auxiliary
-- functions for manipulating flavours.
-- Please update doc/user-settings.md when committing changes to this file.
module UserSettings (
userFlavours, userPackages, userDefaultFlavour,
verboseCommand, buildProgressColour, successColour, finalStage
) where
import Flavour.Type
import Expression
import {-# SOURCE #-} Settings.Default
-- See doc/user-settings.md for instructions.
-- Please update doc/user-settings.md when committing changes to this file.
-- | Name of the default flavour, i.e the one used when no --flavour=<name>
-- argument is passed to Hadrian.
userDefaultFlavour :: String
userDefaultFlavour = "default"
-- | User-defined build flavours. See 'userFlavour' as an example.
userFlavours :: [Flavour]
userFlavours = [userFlavour] -- Add more build flavours if need be.
-- | This is an example user-defined build flavour. Feel free to modify it and
-- use by passing @--flavour=user@ from the command line.
userFlavour :: Flavour
userFlavour = defaultFlavour {
name = "ports"
, libraryWays = remove ws defaultLibraryWays
, dynamicGhcPrograms = pure %%DYNAMIC%%
-- , ghcProfiled = %%PROFILE%%
}
where
ws = concat [
if %%DYNAMIC%% then [] else [dynamic]
, if %%PROFILE%% then [] else [profiling]]
-- | Add user-defined packages. Note, this only lets Hadrian know about the
-- existence of a new package; to actually build it you need to create a new
-- build flavour, modifying the list of packages that are built by default.
userPackages :: [Package]
userPackages = []
-- | Set to 'True' to print full command lines during the build process. Note:
-- this is a 'Predicate', hence you can enable verbose output only for certain
-- targets, e.g.: @verboseCommand = package ghcPrim@.
verboseCommand :: Predicate
verboseCommand = do
verbosity <- expr getVerbosity
return $ verbosity >= Verbose
-- | Set colour for build progress messages (e.g. executing a build command).
buildProgressColour :: BuildProgressColour
buildProgressColour = mkBuildProgressColour (Dull Magenta)
-- | Set colour for success messages (e.g. a package is built successfully).
successColour :: SuccessColour
successColour = mkSuccessColour (Dull Green)
-- | Stop after building the StageN compiler.
-- For example, setting the 'finalStage' to 'Stage1' will just build the
-- 'Stage1' compiler. Setting it to 'Stage3' will build the 'Stage3'
-- compiler. Setting it to 'Stage0' will mean nothing gets built at all.
finalStage :: Stage
finalStage = Stage2

5156
lang/ghc94/pkg-plist.hadrian Normal file

File diff suppressed because it is too large Load Diff