projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pull out common removal code, and detect does-not-exist correctly
[ghc-hetmet.git]
/
compiler
/
main
/
StaticFlags.hs
diff --git
a/compiler/main/StaticFlags.hs
b/compiler/main/StaticFlags.hs
index
3067063
..
b49323b
100644
(file)
--- a/
compiler/main/StaticFlags.hs
+++ b/
compiler/main/StaticFlags.hs
@@
-29,7
+29,6
@@
module StaticFlags (
-- language opts
opt_DictsStrict,
-- language opts
opt_DictsStrict,
- opt_MaxContextReductionDepth,
opt_IrrefutableTuples,
opt_Parallel,
opt_RuntimeTypes,
opt_IrrefutableTuples,
opt_Parallel,
opt_RuntimeTypes,
@@
-78,14
+77,13
@@
import FastString ( FastString, mkFastString )
import Util
import Maybes ( firstJust )
import Panic ( GhcException(..), ghcError )
import Util
import Maybes ( firstJust )
import Panic ( GhcException(..), ghcError )
-import Constants ( mAX_CONTEXT_REDUCTION_DEPTH )
import EXCEPTION ( throwDyn )
import DATA_IOREF
import UNSAFE_IO ( unsafePerformIO )
import Monad ( when )
import Char ( isDigit )
import EXCEPTION ( throwDyn )
import DATA_IOREF
import UNSAFE_IO ( unsafePerformIO )
import Monad ( when )
import Char ( isDigit )
-import List ( sort, intersperse )
+import Data.List ( sort, intersperse, nub )
-----------------------------------------------------------------------------
-- Static flags
-----------------------------------------------------------------------------
-- Static flags
@@
-253,7
+251,6
@@
opt_DoTickyProfiling = lookUp FSLIT("-fticky-ticky")
-- language opts
opt_DictsStrict = lookUp FSLIT("-fdicts-strict")
opt_IrrefutableTuples = lookUp FSLIT("-firrefutable-tuples")
-- language opts
opt_DictsStrict = lookUp FSLIT("-fdicts-strict")
opt_IrrefutableTuples = lookUp FSLIT("-firrefutable-tuples")
-opt_MaxContextReductionDepth = lookup_def_int "-fcontext-stack" mAX_CONTEXT_REDUCTION_DEPTH
opt_Parallel = lookUp FSLIT("-fparallel")
opt_Flatten = lookUp FSLIT("-fflatten")
opt_Parallel = lookUp FSLIT("-fparallel")
opt_Flatten = lookUp FSLIT("-fflatten")
@@
-337,7
+334,6
@@
isStaticFlag f =
"fPIC"
]
|| any (flip prefixMatch f) [
"fPIC"
]
|| any (flip prefixMatch f) [
- "fcontext-stack",
"fliberate-case-threshold",
"fmax-worker-args",
"fhistory-size",
"fliberate-case-threshold",
"fmax-worker-args",
"fhistory-size",
@@
-458,7
+454,7
@@
allowed_combination way = and [ x `allowedWith` y
findBuildTag :: IO [String] -- new options
findBuildTag = do
way_names <- readIORef v_Ways
findBuildTag :: IO [String] -- new options
findBuildTag = do
way_names <- readIORef v_Ways
- let ws = sort way_names
+ let ws = sort (nub way_names)
if not (allowed_combination ws)
then throwDyn (CmdLineError $
"combination not supported: " ++
if not (allowed_combination ws)
then throwDyn (CmdLineError $
"combination not supported: " ++
@@
-494,6
+490,8
@@
way_details =
#if defined(freebsd_TARGET_OS)
"-optc-pthread"
, "-optl-pthread"
#if defined(freebsd_TARGET_OS)
"-optc-pthread"
, "-optl-pthread"
+#elif defined(solaris2_TARGET_OS)
+ "-optl-lrt"
#endif
] ),
#endif
] ),