[commit: ghc] master: Squashed 'hadrian/' changes from 438dc576e7..5ebb69ae1e (5229c43)

git at git.haskell.org git at git.haskell.org
Sat Nov 11 15:54:39 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/5229c43ccf77bcbffeced01dccb27398d017fa34/ghc

>---------------------------------------------------------------

commit 5229c43ccf77bcbffeced01dccb27398d017fa34
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Fri Nov 10 09:28:36 2017 -0500

    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


>---------------------------------------------------------------

5229c43ccf77bcbffeced01dccb27398d017fa34
 cfg/system.config.in             | 3 ---
 src/Oracles/Flag.hs              | 6 ------
 src/Settings/Builders/Common.hs  | 7 +++----
 src/Settings/Packages/GhcPrim.hs | 1 -
 src/Settings/Packages/Rts.hs     | 4 ++--
 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 913a2b4..b007581 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 447f0bc..1bd4dfe 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 5ca594e..340239a 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 df1c553..aed8f2f 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 33169fe..b15bb6a 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 f8eb4a5..abbc814 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.



More information about the ghc-commits mailing list