diff options
Diffstat (limited to 'hadrian')
-rw-r--r-- | hadrian/cfg/system.config.in | 3 | ||||
-rw-r--r-- | hadrian/src/Oracles/Setting.hs | 2 | ||||
-rw-r--r-- | hadrian/src/Settings/Builders/Common.hs | 13 | ||||
-rw-r--r-- | hadrian/src/Settings/Packages.hs | 7 |
4 files changed, 19 insertions, 6 deletions
diff --git a/hadrian/cfg/system.config.in b/hadrian/cfg/system.config.in index 2c341230cf..e8a300d401 100644 --- a/hadrian/cfg/system.config.in +++ b/hadrian/cfg/system.config.in @@ -177,7 +177,8 @@ target-arm-version = @ARM_ISA@ # Include and library directories: #================================= -curses-lib-dir = @CURSES_LIB_DIRS@ +curses-lib-dir = @CURSES_LIB_DIRS@ +curses-include-dir = @CURSES_INCLUDE_DIRS@ iconv-include-dir = @ICONV_INCLUDE_DIRS@ iconv-lib-dir = @ICONV_LIB_DIRS@ diff --git a/hadrian/src/Oracles/Setting.hs b/hadrian/src/Oracles/Setting.hs index b1db240f34..e58851057a 100644 --- a/hadrian/src/Oracles/Setting.hs +++ b/hadrian/src/Oracles/Setting.hs @@ -36,6 +36,7 @@ data Setting = BuildArch | BuildOs | BuildPlatform | BuildVendor + | CursesIncludeDir | CursesLibDir | DynamicExtension | FfiIncludeDir @@ -133,6 +134,7 @@ setting key = lookupValueOrError configFile $ case key of BuildOs -> "build-os" BuildPlatform -> "build-platform" BuildVendor -> "build-vendor" + CursesIncludeDir -> "curses-include-dir" CursesLibDir -> "curses-lib-dir" DynamicExtension -> "dynamic-extension" FfiIncludeDir -> "ffi-include-dir" diff --git a/hadrian/src/Settings/Builders/Common.hs b/hadrian/src/Settings/Builders/Common.hs index 11b6f20ef5..4ffca988a0 100644 --- a/hadrian/src/Settings/Builders/Common.hs +++ b/hadrian/src/Settings/Builders/Common.hs @@ -25,15 +25,18 @@ cIncludeArgs = do incDirs <- getContextData includeDirs depDirs <- getContextData depIncludeDirs stage <- getStage - iconvIncludeDir <- getSetting IconvIncludeDir - gmpIncludeDir <- getSetting GmpIncludeDir - ffiIncludeDir <- getSetting FfiIncludeDir - libdwIncludeDir <- getSetting FfiIncludeDir + -- TODO: Why is any of this necessary? We should have already told Cabal about these paths. + iconvIncludeDir <- getSetting IconvIncludeDir + gmpIncludeDir <- getSetting GmpIncludeDir + ffiIncludeDir <- getSetting FfiIncludeDir + libdwIncludeDir <- getSetting LibdwIncludeDir + numaIncludeDir <- getSetting LibnumaIncludeDir + cursesIncludeDir <- getSetting CursesIncludeDir libPath <- expr $ stageLibPath stage mconcat [ notStage0 ? arg "-Irts/include" , arg $ "-I" ++ libPath , arg $ "-I" ++ path - , pure . map ("-I"++) . filter (/= "") $ [iconvIncludeDir, gmpIncludeDir] + , pure . map ("-I"++) . filter (/= "") $ [iconvIncludeDir, gmpIncludeDir, numaIncludeDir, cursesIncludeDir] , flag UseSystemFfi ? if not (null ffiIncludeDir) then arg ("-I" ++ ffiIncludeDir) else mempty , flag WithLibdw ? if not (null libdwIncludeDir) then arg ("-I" ++ libdwIncludeDir) else mempty -- Add @incDirs@ in the build directory, since some files generated diff --git a/hadrian/src/Settings/Packages.hs b/hadrian/src/Settings/Packages.hs index 416e3bd430..3be0b92050 100644 --- a/hadrian/src/Settings/Packages.hs +++ b/hadrian/src/Settings/Packages.hs @@ -24,6 +24,9 @@ packageArgs = do -- are building. This is used to build cross-compilers bootCross = (==) <$> ghcVersionStage Stage0 <*> ghcVersionStage Stage1 + cursesIncludeDir <- getSetting CursesIncludeDir + cursesLibraryDir <- getSetting CursesLibDir + mconcat --------------------------------- base --------------------------------- [ package base ? mconcat @@ -159,6 +162,10 @@ packageArgs = do , package haskeline ? builder (Cabal Flags) ? notM cross `cabalFlag` "terminfo" + -------------------------------- terminfo ------------------------------ + , package terminfo ? + builder (Cabal Setup) ? cabalExtraDirs cursesIncludeDir cursesLibraryDir + -------------------------------- hsc2hs -------------------------------- , package hsc2hs ? builder (Cabal Flags) ? arg "in-ghc-tree" |