#endif
GLOBAL_VAR(collect_ghc_timing, False, Bool)
GLOBAL_VAR(do_asm_mangling, True, Bool)
+GLOBAL_VAR(excess_precision, False, Bool)
-----------------------------------------------------------------------------
-- Splitting object files (for libraries)
data WayName
= WayProf
| WayUnreg
+ | WayDll
| WayTicky
| WayPar
| WayGran
GLOBAL_VAR(ways, [] ,[WayName])
+-- ToDo: allow WayDll with any other allowed combination
+
allowed_combinations =
[ [WayProf,WayUnreg],
[WayProf,WaySMP] -- works???
, "-fno-asm-mangling"
, "-funregisterised" ]),
+ (WayDll, Way "dll" "DLLized"
+ [ ]),
+
(WayPar, Way "mp" "Parallel"
[ "-fstack-check"
, "-fparallel"
pkg_extra_cc_opts <- getPackageExtraCcOpts
+ excessPrecision <- readIORef excess_precision
+
run_something "C Compiler"
(unwords ([ cc, "-x", "c", cc_help, "-o", output_fn ]
++ md_c_flags
#ifdef mingw32_TARGET_OS
++ [" -mno-cygwin"]
#endif
+ ++ (if excessPrecision then [] else [ "-ffloat-store" ])
++ include_paths
++ pkg_extra_cc_opts
-- ++ [">", ccout]
putStr phase_name
putStrLn ":"
putStrLn cmd
+ hFlush stdout
-- test for -n flag
n <- readIORef dry_run
------- ways --------------------------------------------------------
, ( "prof" , NoArg (addNoDups ways WayProf) )
, ( "unreg" , NoArg (addNoDups ways WayUnreg) )
+ , ( "dll" , NoArg (addNoDups ways WayDll) )
, ( "ticky" , NoArg (addNoDups ways WayTicky) )
, ( "parallel" , NoArg (addNoDups ways WayPar) )
, ( "gransim" , NoArg (addNoDups ways WayGran) )
, ( "fusagesp" , NoArg (do writeIORef opt_UsageSPInf True
add opt_C "-fusagesp-on") )
- , ( "fstrictfp" , NoArg (do add opt_C "-fstrictfp"
- add opt_c "-ffloat-store"))
+ , ( "fexcess-precision" , NoArg (do writeIORef excess_precision True
+ add opt_C "-fexcess-precision"))
-- flags that are "active negatives"
, ( "fno-implicit-prelude" , PassFlag (add opt_C) )