From 08f3834baf68671f1b9e61def2e4d5511fbe2c8d Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Sun, 8 Jul 2007 19:21:20 +0000 Subject: [PATCH] FIX -fexcess-precision Ugly hack; see comments for details --- compiler/main/StaticFlags.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/compiler/main/StaticFlags.hs b/compiler/main/StaticFlags.hs index a162214..e71c5c7 100644 --- a/compiler/main/StaticFlags.hs +++ b/compiler/main/StaticFlags.hs @@ -118,8 +118,14 @@ parseStaticFlags args = do let cg_flags | tablesNextToCode = ["-optc-DTABLES_NEXT_TO_CODE"] | otherwise = [] + -- HACK: -fexcess-precision is both a static and a dynamic flag. If + -- the static flag parser has slurped it, we must return it as a + -- leftover too. ToDo: make -fexcess-precision dynamic only. + let excess_prec | opt_SimplExcessPrecision = ["-fexcess-precision"] + | otherwise = [] + when (not (null errs)) $ ghcError (UsageError (unlines errs)) - return (cg_flags++more_leftover++leftover) + return (excess_prec++cg_flags++more_leftover++leftover) initStaticOpts :: IO () initStaticOpts = writeIORef v_opt_C_ready True -- 1.7.10.4