Skip to content
This repository has been archived by the owner on Aug 2, 2020. It is now read-only.

Drop GccLtXX flags, require GCC > 4.7 and up #450

Merged
merged 1 commit into from
Nov 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions cfg/system.config.in
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 0 additions & 6 deletions src/Oracles/Flag.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ import Oracles.Setting
data Flag = ArSupportsAtFile
| CrossCompiling
| GccIsClang
| GccLt34
| GccLt44
| GccLt46
| GhcUnregisterised
| LeadingUnderscore
| SolarisBrokenShld
Expand All @@ -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"
Expand Down
7 changes: 3 additions & 4 deletions src/Settings/Builders/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/Settings/Packages/GhcPrim.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
4 changes: 2 additions & 2 deletions src/Settings/Packages/Rts.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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" ]
5 changes: 2 additions & 3 deletions src/Settings/Warnings.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down