Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC

Commits:

6 changed files:

Changes:

  • hadrian/src/Rules/Gmp.hs
    ... ... @@ -11,7 +11,7 @@ import Target
    11 11
     import Utilities
    
    12 12
     import Hadrian.BuildPath
    
    13 13
     import Hadrian.Expression
    
    14
    -import Settings.Builders.Common (cArgs, getStagedCCFlags)
    
    14
    +import Settings.Builders.Common (getStagedCCFlags)
    
    15 15
     
    
    16 16
     -- | Build in-tree GMP library objects (if GmpInTree flag is set) and return
    
    17 17
     -- their paths.
    
    ... ... @@ -125,8 +125,7 @@ gmpRules = do
    125 125
                 cFlags <-
    
    126 126
                     interpretInContext ctx $
    
    127 127
                     mconcat
    
    128
    -                    [ cArgs
    
    129
    -                    , getStagedCCFlags
    
    128
    +                    [ getStagedCCFlags
    
    130 129
                         -- gmp symbols are only used by bignum logic in
    
    131 130
                         -- ghc-internal and shouldn't be exported by the
    
    132 131
                         -- ghc-internal shared library.
    

  • hadrian/src/Rules/Libffi.hs
    ... ... @@ -130,17 +130,14 @@ fixLibffiMakefile top =
    130 130
     configureEnvironment :: Stage -> Action [CmdOption]
    
    131 131
     configureEnvironment stage = do
    
    132 132
         context <- libffiContext stage
    
    133
    -    cFlags  <- interpretInContext context $ mconcat
    
    134
    -               [ cArgs
    
    135
    -               , getStagedCCFlags ]
    
    136
    -    ldFlags <- interpretInContext context ldArgs
    
    133
    +    cFlags  <- interpretInContext context getStagedCCFlags
    
    137 134
         sequence [ builderEnvironment "CC" $ Cc CompileC stage
    
    138 135
                  , builderEnvironment "CXX" $ Cc CompileC stage
    
    139
    -             , builderEnvironment "AR" (Ar Unpack stage)
    
    136
    +             , builderEnvironment "AR" $ Ar Unpack stage
    
    140 137
                  , builderEnvironment "NM" Nm
    
    141 138
                  , builderEnvironment "RANLIB" Ranlib
    
    142 139
                  , return . AddEnv  "CFLAGS" $ unwords  cFlags ++ " -w"
    
    143
    -             , return . AddEnv "LDFLAGS" $ unwords ldFlags ++ " -w" ]
    
    140
    +             , return . AddEnv "LDFLAGS" $ "-w" ]
    
    144 141
     
    
    145 142
     -- Need the libffi archive and `trackAllow` all files in the build directory.
    
    146 143
     -- See [Libffi indicating inputs].
    

  • hadrian/src/Settings/Builders/Cabal.hs
    ... ... @@ -188,18 +188,16 @@ configureArgs cFlags' ldFlags' = do
    188 188
                 values <- unwords <$> expr
    
    189 189
                 not (null values) ?
    
    190 190
                     arg ("--configure-option=" ++ key ++ "=" ++ values)
    
    191
    -        cFlags   = mconcat [ remove ["-Werror"] cArgs
    
    192
    -                           , getStagedCCFlags
    
    191
    +        cFlags   = mconcat [ getStagedCCFlags
    
    193 192
                                -- See https://github.com/snowleopard/hadrian/issues/523
    
    194 193
                                , arg $ "-iquote"
    
    195 194
     
    
    196 195
                                , arg $ top -/- pkgPath pkg
    
    197 196
                                , cFlags'
    
    198 197
                                ]
    
    199
    -        ldFlags  = ldArgs <> ldFlags'
    
    200 198
         mconcat
    
    201 199
             [ conf "CFLAGS"   cFlags
    
    202
    -        , conf "LDFLAGS"  ldFlags
    
    200
    +        , conf "LDFLAGS"  ldFlags'
    
    203 201
             , conf "--with-iconv-includes"    $ arg =<< getSetting IconvIncludeDir
    
    204 202
             , conf "--with-iconv-libraries"   $ arg =<< getSetting IconvLibDir
    
    205 203
             , conf "--with-gmp-includes"      $ arg =<< getSetting GmpIncludeDir
    

  • hadrian/src/Settings/Builders/Common.hs
    ... ... @@ -5,7 +5,7 @@ module Settings.Builders.Common (
    5 5
         module Oracles.Setting,
    
    6 6
         module Settings,
    
    7 7
         module UserSettings,
    
    8
    -    cIncludeArgs, ldArgs, cArgs, cppArgs, cWarnings,
    
    8
    +    cIncludeArgs, cWarnings,
    
    9 9
         packageDatabaseArgs, bootPackageDatabaseArgs,
    
    10 10
         getStagedCCFlags, wayCcArgs
    
    11 11
         ) where
    
    ... ... @@ -38,15 +38,6 @@ cIncludeArgs = do
    38 38
                 , pure [ "-I" ++ pkgPath pkg -/- dir | dir <- incDirs ]
    
    39 39
                 , pure [ "-I" ++       unifyPath dir | dir <- depDirs ] ]
    
    40 40
     
    
    41
    -ldArgs :: Args
    
    42
    -ldArgs = mempty
    
    43
    -
    
    44
    -cArgs :: Args
    
    45
    -cArgs = mempty
    
    46
    -
    
    47
    -cppArgs :: Args
    
    48
    -cppArgs = mempty
    
    49
    -
    
    50 41
     -- TODO: should be in a different file
    
    51 42
     cWarnings :: Args
    
    52 43
     cWarnings = mconcat
    

  • hadrian/src/Settings/Builders/DeriveConstants.hs
    ... ... @@ -40,8 +40,7 @@ includeCcArgs :: Args
    40 40
     includeCcArgs = do
    
    41 41
         stage <- getStage
    
    42 42
         rtsPath <- expr $ rtsBuildPath stage
    
    43
    -    mconcat [ cArgs
    
    44
    -            , cWarnings
    
    43
    +    mconcat [ cWarnings
    
    45 44
                 , prgFlags . ccProgram . tgtCCompiler <$> expr (targetStage Stage1)
    
    46 45
                 , queryTargetTarget tgtUnregisterised ? arg "-DUSE_MINIINTERPRETER"
    
    47 46
                 , arg "-Irts"
    

  • hadrian/src/Settings/Builders/Hsc2Hs.hs
    ... ... @@ -50,7 +50,7 @@ getCFlags = do
    50 50
         autogen <- expr $ autogenPath context
    
    51 51
         let cabalMacros = autogen -/- "cabal_macros.h"
    
    52 52
         expr $ need [cabalMacros]
    
    53
    -    mconcat [ remove ["-O"] (cArgs <> getStagedCCFlags)
    
    53
    +    mconcat [ remove ["-O"] getStagedCCFlags
    
    54 54
                 -- Either "-E" is not part of the configured cpp args, or we can't add those args to invocations of things like this
    
    55 55
                 -- ROMES:TODO: , prgFlags . cppProgram . tgtCPreprocessor <$> getStagedTargetConfig
    
    56 56
                 , cIncludeArgs
    
    ... ... @@ -64,6 +64,5 @@ getCFlags = do
    64 64
     getLFlags :: Expr [String]
    
    65 65
     getLFlags =
    
    66 66
         mconcat [ prgFlags . ccLinkProgram . tgtCCompilerLink <$> getStagedTarget
    
    67
    -            , ldArgs
    
    68 67
                 , getContextData ldOpts
    
    69 68
                 , getContextData depLdOpts ]