diff options
author | Ben Gamari <ben@smart-cactus.org> | 2017-11-10 09:28:36 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-11-10 09:28:36 -0500 |
commit | 5229c43ccf77bcbffeced01dccb27398d017fa34 (patch) | |
tree | c94a40f3cb2ee430ac12d647283a7898494bb39a | |
parent | 7b0b9f603bb1215e2b7af23c2404d637b95a4988 (diff) | |
download | haskell-5229c43ccf77bcbffeced01dccb27398d017fa34.tar.gz |
Squashed 'hadrian/' changes from 438dc576e7..5ebb69ae1e
5ebb69ae1e Drop GccLtXX flags, require GCC > 4.7 and up (#450)
git-subtree-dir: hadrian
git-subtree-split: 5ebb69ae1eb063f25c59383bffb3b5449015c6f9
-rw-r--r-- | cfg/system.config.in | 3 | ||||
-rw-r--r-- | src/Oracles/Flag.hs | 6 | ||||
-rw-r--r-- | src/Settings/Builders/Common.hs | 7 | ||||
-rw-r--r-- | src/Settings/Packages/GhcPrim.hs | 1 | ||||
-rw-r--r-- | src/Settings/Packages/Rts.hs | 4 | ||||
-rw-r--r-- | src/Settings/Warnings.hs | 5 |
6 files changed, 7 insertions, 19 deletions
diff --git a/cfg/system.config.in b/cfg/system.config.in index 913a2b48bf..b007581330 100644 --- a/cfg/system.config.in +++ b/cfg/system.config.in @@ -33,9 +33,6 @@ ar-supports-at-file = @ArSupportsAtFile@ cc-clang-backend = @CC_CLANG_BACKEND@ cc-llvm-backend = @CC_LLVM_BACKEND@ gcc-is-clang = @GccIsClang@ -gcc-lt-34 = @GccLT34@ -gcc-lt-44 = @GccLT44@ -gcc-lt-46 = @GccLT46@ hs-cpp-args = @HaskellCPPArgs@ # Build options: diff --git a/src/Oracles/Flag.hs b/src/Oracles/Flag.hs index 447f0bc076..1bd4dfeefd 100644 --- a/src/Oracles/Flag.hs +++ b/src/Oracles/Flag.hs @@ -11,9 +11,6 @@ import Oracles.Setting data Flag = ArSupportsAtFile | CrossCompiling | GccIsClang - | GccLt34 - | GccLt44 - | GccLt46 | GhcUnregisterised | LeadingUnderscore | SolarisBrokenShld @@ -30,9 +27,6 @@ flag f = do ArSupportsAtFile -> "ar-supports-at-file" CrossCompiling -> "cross-compiling" GccIsClang -> "gcc-is-clang" - GccLt34 -> "gcc-lt-34" - GccLt44 -> "gcc-lt-44" - GccLt46 -> "gcc-lt-46" GhcUnregisterised -> "ghc-unregisterised" LeadingUnderscore -> "leading-underscore" SolarisBrokenShld -> "solaris-broken-shld" diff --git a/src/Settings/Builders/Common.hs b/src/Settings/Builders/Common.hs index 5ca594e645..340239acd6 100644 --- a/src/Settings/Builders/Common.hs +++ b/src/Settings/Builders/Common.hs @@ -40,12 +40,11 @@ cArgs = mempty -- TODO: should be in a different file cWarnings :: Args -cWarnings = do - let gccGe46 = notM (flag GccIsClang ||^ flag GccLt46) +cWarnings = mconcat [ arg "-Wall" , flag GccIsClang ? arg "-Wno-unknown-pragmas" - , gccGe46 ? notM windowsHost ? arg "-Werror=unused-but-set-variable" - , gccGe46 ? arg "-Wno-error=inline" ] + , notM (flag GccIsClang) ? notM windowsHost ? arg "-Werror=unused-but-set-variable" + , notM (flag GccIsClang) ? arg "-Wno-error=inline" ] bootPackageDatabaseArgs :: Args bootPackageDatabaseArgs = do diff --git a/src/Settings/Packages/GhcPrim.hs b/src/Settings/Packages/GhcPrim.hs index df1c553d25..aed8f2ff73 100644 --- a/src/Settings/Packages/GhcPrim.hs +++ b/src/Settings/Packages/GhcPrim.hs @@ -8,6 +8,5 @@ ghcPrimPackageArgs = package ghcPrim ? mconcat [ builder GhcCabal ? arg "--flag=include-ghc-prim" , builder (Cc CompileC) ? - (not <$> flag GccLt44) ? (not <$> flag GccIsClang) ? input "//cbits/atomic.c" ? arg "-Wno-sync-nand" ] diff --git a/src/Settings/Packages/Rts.hs b/src/Settings/Packages/Rts.hs index 33169fe78b..b15bb6af8a 100644 --- a/src/Settings/Packages/Rts.hs +++ b/src/Settings/Packages/Rts.hs @@ -204,7 +204,7 @@ rtsPackageArgs = package rts ? do rtsWarnings :: Args rtsWarnings = mconcat [ pure ["-Wall", "-Werror"] - , flag GccLt34 ? arg "-W", not <$> flag GccLt34 ? arg "-Wextra" + , arg "-Wextra" , arg "-Wstrict-prototypes" , arg "-Wmissing-prototypes" , arg "-Wmissing-declarations" @@ -214,5 +214,5 @@ rtsWarnings = mconcat , arg "-Wmissing-noreturn" , arg "-Wnested-externs" , arg "-Wredundant-decls" - , not <$> flag GccLt46 ? arg "-Wundef" + , arg "-Wundef" , arg "-fno-strict-aliasing" ] diff --git a/src/Settings/Warnings.hs b/src/Settings/Warnings.hs index f8eb4a5da0..abbc814291 100644 --- a/src/Settings/Warnings.hs +++ b/src/Settings/Warnings.hs @@ -12,9 +12,8 @@ defaultGhcWarningsArgs :: Args defaultGhcWarningsArgs = mconcat [ notStage0 ? pure [ "-Werror", "-Wnoncanonical-monad-instances" ] , (not <$> flag GccIsClang) ? mconcat - [ (not <$> flag GccLt46) ? - (not <$> windowsHost ) ? arg "-optc-Werror=unused-but-set-variable" - , (not <$> flag GccLt44) ? arg "-optc-Wno-error=inline" ] + [ (not <$> windowsHost ) ? arg "-optc-Werror=unused-but-set-variable" + , arg "-optc-Wno-error=inline" ] , flag GccIsClang ? arg "-optc-Wno-unknown-pragmas" ] -- | Package-specific warnings-related arguments, mostly suppressing various warnings. |