[project @ 2005-03-18 13:37:27 by simonmar]
[ghc-hetmet.git] / ghc / compiler / main / StaticFlags.hs
1 -----------------------------------------------------------------------------
2 --
3 -- Static flags
4 --
5 -- Static flags can only be set once, on the command-line.  Inside GHC,
6 -- each static flag corresponds to a top-level value, usually of type Bool.
7 --
8 -- (c) The University of Glasgow 2005
9 --
10 -----------------------------------------------------------------------------
11
12 module StaticFlags (
13         parseStaticFlags,
14         staticFlags,
15
16         -- Ways
17         WayName(..), v_Ways, v_Build_tag, v_RTS_Build_tag,
18
19         -- Output style options
20         opt_PprUserLength,
21         opt_PprStyle_Debug,
22
23         -- profiling opts
24         opt_AutoSccsOnAllToplevs,
25         opt_AutoSccsOnExportedToplevs,
26         opt_AutoSccsOnIndividualCafs,
27         opt_SccProfilingOn,
28         opt_DoTickyProfiling,
29
30         -- language opts
31         opt_DictsStrict,
32         opt_MaxContextReductionDepth,
33         opt_IrrefutableTuples,
34         opt_Parallel,
35         opt_SMP,
36         opt_RuntimeTypes,
37         opt_Flatten,
38
39         -- optimisation opts
40         opt_NoMethodSharing, 
41         opt_NoStateHack,
42         opt_LiberateCaseThreshold,
43         opt_CprOff,
44         opt_RulesOff,
45         opt_SimplNoPreInlining,
46         opt_SimplExcessPrecision,
47         opt_MaxWorkerArgs,
48
49         -- Unfolding control
50         opt_UF_CreationThreshold,
51         opt_UF_UseThreshold,
52         opt_UF_FunAppDiscount,
53         opt_UF_KeenessFactor,
54         opt_UF_UpdateInPlace,
55         opt_UF_DearOp,
56
57         -- misc opts
58         opt_IgnoreDotGhci,
59         opt_ErrorSpans,
60         opt_EmitCExternDecls,
61         opt_SplitObjs,
62         opt_GranMacros,
63         opt_HiVersion,
64         opt_HistorySize,
65         opt_OmitBlackHoling,
66         opt_Static,
67         opt_Unregisterised,
68         opt_EmitExternalCore,
69         opt_PIC,
70         v_Ld_inputs,
71   ) where
72
73 #include "HsVersions.h"
74
75 import DriverPhases
76 import Util             ( consIORef )
77 import CmdLineParser
78 import Config           ( cProjectVersionInt, cProjectPatchLevel,
79                           cGhcUnregisterised )
80 import FastString       ( FastString, mkFastString )
81 import Util
82 import Maybes           ( firstJust )
83 import Panic            ( GhcException(..), ghcError )
84 import Constants        ( mAX_CONTEXT_REDUCTION_DEPTH )
85
86 import EXCEPTION        ( throwDyn )
87 import DATA_IOREF
88 import UNSAFE_IO        ( unsafePerformIO )
89 import Monad            ( when )
90 import Char             ( isDigit )
91 import IO               ( hPutStrLn, stderr ) -- ToDo: should use errorMsg
92 import List             ( sort, intersperse )
93
94 -----------------------------------------------------------------------------
95 -- Static flags
96
97 parseStaticFlags :: [String] -> IO [String]
98 parseStaticFlags args = do
99   (leftover, errs) <- processArgs static_flags args
100   when (not (null errs)) $ throwDyn (UsageError (unlines errs))
101
102     -- deal with the way flags: the way (eg. prof) gives rise to
103     -- futher flags, some of which might be static.
104   way_flags <- findBuildTag
105
106     -- if we're unregisterised, add some more flags
107   let unreg_flags | cGhcUnregisterised == "YES" = unregFlags
108                   | otherwise = []
109
110   (more_leftover, errs) <- processArgs static_flags (unreg_flags ++ way_flags)
111   when (not (null errs)) $ ghcError (UsageError (unlines errs))
112   return (more_leftover++leftover)
113
114
115 -- note that ordering is important in the following list: any flag which
116 -- is a prefix flag (i.e. HasArg, Prefix, OptPrefix, AnySuffix) will override
117 -- flags further down the list with the same prefix.
118
119 static_flags :: [(String, OptKind IO)]
120 static_flags = [
121         ------- GHCi -------------------------------------------------------
122      ( "ignore-dot-ghci", PassFlag addOpt )
123   ,  ( "read-dot-ghci"  , NoArg (removeOpt "-ignore-dot-ghci") )
124
125         ------- ways --------------------------------------------------------
126   ,  ( "prof"           , NoArg (addWay WayProf) )
127   ,  ( "unreg"          , NoArg (addWay WayUnreg) )
128   ,  ( "ticky"          , NoArg (addWay WayTicky) )
129   ,  ( "parallel"       , NoArg (addWay WayPar) )
130   ,  ( "gransim"        , NoArg (addWay WayGran) )
131   ,  ( "smp"            , NoArg (addWay WaySMP) )
132   ,  ( "debug"          , NoArg (addWay WayDebug) )
133   ,  ( "ndp"            , NoArg (addWay WayNDP) )
134   ,  ( "threaded"       , NoArg (addWay WayThreaded) )
135         -- ToDo: user ways
136
137         ------ Debugging ----------------------------------------------------
138   ,  ( "dppr-noprags",     PassFlag addOpt )
139   ,  ( "dppr-debug",       PassFlag addOpt )
140   ,  ( "dppr-user-length", AnySuffix addOpt )
141       -- rest of the debugging flags are dynamic
142
143         --------- Profiling --------------------------------------------------
144   ,  ( "auto-all"       , NoArg (addOpt "-fauto-sccs-on-all-toplevs") )
145   ,  ( "auto"           , NoArg (addOpt "-fauto-sccs-on-exported-toplevs") )
146   ,  ( "caf-all"        , NoArg (addOpt "-fauto-sccs-on-individual-cafs") )
147          -- "ignore-sccs"  doesn't work  (ToDo)
148
149   ,  ( "no-auto-all"    , NoArg (removeOpt "-fauto-sccs-on-all-toplevs") )
150   ,  ( "no-auto"        , NoArg (removeOpt "-fauto-sccs-on-exported-toplevs") )
151   ,  ( "no-caf-all"     , NoArg (removeOpt "-fauto-sccs-on-individual-cafs") )
152
153         ------- Miscellaneous -----------------------------------------------
154   ,  ( "no-link-chk"    , NoArg (return ()) ) -- ignored for backwards compat
155
156   ,  ( "split-objs"     , NoArg (if can_split
157                                     then addOpt "-split-objs"
158                                     else hPutStrLn stderr
159                                             "warning: don't know how to split object files on this architecture"
160                                 ) )
161
162         ----- Linker --------------------------------------------------------
163   ,  ( "static"         , PassFlag addOpt )
164   ,  ( "dynamic"        , NoArg (removeOpt "-static") )
165   ,  ( "rdynamic"       , NoArg (return ()) ) -- ignored for compat w/ gcc
166
167         ----- RTS opts ------------------------------------------------------
168   ,  ( "H"                 , HasArg (setHeapSize . fromIntegral . decodeSize) )
169   ,  ( "Rghc-timing"       , NoArg  (enableTimingStats) )
170
171         ------ Compiler flags -----------------------------------------------
172         -- All other "-fno-<blah>" options cancel out "-f<blah>" on the hsc cmdline
173   ,  ( "fno-",                  PrefixPred (\s -> isStaticFlag ("f"++s))
174                                     (\s -> removeOpt ("-f"++s)) )
175
176         -- Pass all remaining "-f<blah>" options to hsc
177   ,  ( "f",                     AnySuffixPred (isStaticFlag) addOpt )
178   ]
179
180 addOpt = consIORef v_opt_C
181
182 addWay = consIORef v_Ways
183
184 removeOpt f = do
185   fs <- readIORef v_opt_C
186   writeIORef v_opt_C $! filter (/= f) fs    
187
188 lookUp           :: FastString -> Bool
189 lookup_def_int   :: String -> Int -> Int
190 lookup_def_float :: String -> Float -> Float
191 lookup_str       :: String -> Maybe String
192
193 -- holds the static opts while they're being collected, before
194 -- being unsafely read by unpacked_static_opts below.
195 GLOBAL_VAR(v_opt_C, defaultStaticOpts, [String])
196 staticFlags = unsafePerformIO (readIORef v_opt_C)
197
198 -- -static is the default
199 defaultStaticOpts = ["-static"]
200
201 packed_static_opts   = map mkFastString staticFlags
202
203 lookUp     sw = sw `elem` packed_static_opts
204         
205 -- (lookup_str "foo") looks for the flag -foo=X or -fooX, 
206 -- and returns the string X
207 lookup_str sw 
208    = case firstJust (map (startsWith sw) staticFlags) of
209         Just ('=' : str) -> Just str
210         Just str         -> Just str
211         Nothing          -> Nothing     
212
213 lookup_def_int sw def = case (lookup_str sw) of
214                             Nothing -> def              -- Use default
215                             Just xx -> try_read sw xx
216
217 lookup_def_float sw def = case (lookup_str sw) of
218                             Nothing -> def              -- Use default
219                             Just xx -> try_read sw xx
220
221
222 try_read :: Read a => String -> String -> a
223 -- (try_read sw str) tries to read s; if it fails, it
224 -- bleats about flag sw
225 try_read sw str
226   = case reads str of
227         ((x,_):_) -> x  -- Be forgiving: ignore trailing goop, and alternative parses
228         []        -> ghcError (UsageError ("Malformed argument " ++ str ++ " for flag " ++ sw))
229                         -- ToDo: hack alert. We should really parse the arugments
230                         --       and announce errors in a more civilised way.
231
232
233 {-
234  Putting the compiler options into temporary at-files
235  may turn out to be necessary later on if we turn hsc into
236  a pure Win32 application where I think there's a command-line
237  length limit of 255. unpacked_opts understands the @ option.
238
239 unpacked_opts :: [String]
240 unpacked_opts =
241   concat $
242   map (expandAts) $
243   map unpackFS argv  -- NOT ARGV any more: v_Static_hsc_opts
244   where
245    expandAts ('@':fname) = words (unsafePerformIO (readFile fname))
246    expandAts l = [l]
247 -}
248
249
250 opt_IgnoreDotGhci               = lookUp FSLIT("-ignore-dot-ghci")
251
252 -- debugging opts
253 opt_PprStyle_Debug              = lookUp  FSLIT("-dppr-debug")
254 opt_PprUserLength               = lookup_def_int "-dppr-user-length" 5 --ToDo: give this a name
255
256 -- profiling opts
257 opt_AutoSccsOnAllToplevs        = lookUp  FSLIT("-fauto-sccs-on-all-toplevs")
258 opt_AutoSccsOnExportedToplevs   = lookUp  FSLIT("-fauto-sccs-on-exported-toplevs")
259 opt_AutoSccsOnIndividualCafs    = lookUp  FSLIT("-fauto-sccs-on-individual-cafs")
260 opt_SccProfilingOn              = lookUp  FSLIT("-fscc-profiling")
261 opt_DoTickyProfiling            = lookUp  FSLIT("-fticky-ticky")
262
263 -- language opts
264 opt_DictsStrict                 = lookUp  FSLIT("-fdicts-strict")
265 opt_IrrefutableTuples           = lookUp  FSLIT("-firrefutable-tuples")
266 opt_MaxContextReductionDepth    = lookup_def_int "-fcontext-stack" mAX_CONTEXT_REDUCTION_DEPTH
267 opt_Parallel                    = lookUp  FSLIT("-fparallel")
268 opt_SMP                         = lookUp  FSLIT("-fsmp")
269 opt_Flatten                     = lookUp  FSLIT("-fflatten")
270
271 -- optimisation opts
272 opt_NoStateHack                 = lookUp  FSLIT("-fno-state-hack")
273 opt_NoMethodSharing             = lookUp  FSLIT("-fno-method-sharing")
274 opt_CprOff                      = lookUp  FSLIT("-fcpr-off")
275 opt_RulesOff                    = lookUp  FSLIT("-frules-off")
276         -- Switch off CPR analysis in the new demand analyser
277 opt_LiberateCaseThreshold       = lookup_def_int "-fliberate-case-threshold" (10::Int)
278 opt_MaxWorkerArgs               = lookup_def_int "-fmax-worker-args" (10::Int)
279
280 opt_EmitCExternDecls            = lookUp  FSLIT("-femit-extern-decls")
281 opt_SplitObjs                   = lookUp  FSLIT("-split-objs")
282 opt_GranMacros                  = lookUp  FSLIT("-fgransim")
283 opt_HiVersion                   = read (cProjectVersionInt ++ cProjectPatchLevel) :: Int
284 opt_HistorySize                 = lookup_def_int "-fhistory-size" 20
285 opt_OmitBlackHoling             = lookUp  FSLIT("-dno-black-holing")
286 opt_RuntimeTypes                = lookUp  FSLIT("-fruntime-types")
287
288 -- Simplifier switches
289 opt_SimplNoPreInlining          = lookUp  FSLIT("-fno-pre-inlining")
290         -- NoPreInlining is there just to see how bad things
291         -- get if you don't do it!
292 opt_SimplExcessPrecision        = lookUp  FSLIT("-fexcess-precision")
293
294 -- Unfolding control
295 opt_UF_CreationThreshold        = lookup_def_int "-funfolding-creation-threshold"  (45::Int)
296 opt_UF_UseThreshold             = lookup_def_int "-funfolding-use-threshold"       (8::Int)     -- Discounts can be big
297 opt_UF_FunAppDiscount           = lookup_def_int "-funfolding-fun-discount"        (6::Int)     -- It's great to inline a fn
298 opt_UF_KeenessFactor            = lookup_def_float "-funfolding-keeness-factor"    (1.5::Float)
299 opt_UF_UpdateInPlace            = lookUp  FSLIT("-funfolding-update-in-place")
300
301 opt_UF_DearOp   = ( 4 :: Int)
302                         
303 opt_Static                      = lookUp  FSLIT("-static")
304 opt_Unregisterised              = lookUp  FSLIT("-funregisterised")
305 opt_EmitExternalCore            = lookUp  FSLIT("-fext-core")
306
307 -- Include full span info in error messages, instead of just the start position.
308 opt_ErrorSpans                  = lookUp FSLIT("-ferror-spans")
309
310 opt_PIC                         = lookUp FSLIT("-fPIC")
311
312 -- object files and libraries to be linked in are collected here.
313 -- ToDo: perhaps this could be done without a global, it wasn't obvious
314 -- how to do it though --SDM.
315 GLOBAL_VAR(v_Ld_inputs, [],      [String])
316
317 isStaticFlag f =
318   f `elem` [
319         "fauto-sccs-on-all-toplevs",
320         "fauto-sccs-on-exported-toplevs",
321         "fauto-sccs-on-individual-cafs",
322         "fscc-profiling",
323         "fticky-ticky",
324         "fall-strict",
325         "fdicts-strict",
326         "firrefutable-tuples",
327         "fparallel",
328         "fsmp",
329         "fflatten",
330         "fsemi-tagging",
331         "flet-no-escape",
332         "femit-extern-decls",
333         "fglobalise-toplev-names",
334         "fgransim",
335         "fno-hi-version-check",
336         "dno-black-holing",
337         "fno-method-sharing",
338         "fno-state-hack",
339         "fruntime-types",
340         "fno-pre-inlining",
341         "fexcess-precision",
342         "funfolding-update-in-place",
343         "static",
344         "funregisterised",
345         "fext-core",
346         "frule-check",
347         "frules-off",
348         "fcpr-off",
349         "ferror-spans",
350         "fPIC"
351         ]
352   || any (flip prefixMatch f) [
353         "fcontext-stack",
354         "fliberate-case-threshold",
355         "fmax-worker-args",
356         "fhistory-size",
357         "funfolding-creation-threshold",
358         "funfolding-use-threshold",
359         "funfolding-fun-discount",
360         "funfolding-keeness-factor"
361      ]
362
363
364
365 -- Misc functions for command-line options
366
367 startsWith :: String -> String -> Maybe String
368 -- startsWith pfx (pfx++rest) = Just rest
369
370 startsWith []     str = Just str
371 startsWith (c:cs) (s:ss)
372   = if c /= s then Nothing else startsWith cs ss
373 startsWith  _     []  = Nothing
374
375
376 -----------------------------------------------------------------------------
377 -- convert sizes like "3.5M" into integers
378
379 decodeSize :: String -> Integer
380 decodeSize str
381   | c == ""              = truncate n
382   | c == "K" || c == "k" = truncate (n * 1000)
383   | c == "M" || c == "m" = truncate (n * 1000 * 1000)
384   | c == "G" || c == "g" = truncate (n * 1000 * 1000 * 1000)
385   | otherwise            = throwDyn (CmdLineError ("can't decode size: " ++ str))
386   where (m, c) = span pred str
387         n      = read m  :: Double
388         pred c = isDigit c || c == '.'
389
390
391 -----------------------------------------------------------------------------
392 -- RTS Hooks
393
394 #if __GLASGOW_HASKELL__ >= 504
395 foreign import ccall unsafe "setHeapSize"       setHeapSize       :: Int -> IO ()
396 foreign import ccall unsafe "enableTimingStats" enableTimingStats :: IO ()
397 #else
398 foreign import "setHeapSize"       unsafe setHeapSize       :: Int -> IO ()
399 foreign import "enableTimingStats" unsafe enableTimingStats :: IO ()
400 #endif
401
402 -- -----------------------------------------------------------------------------
403 -- Splitting
404
405 can_split :: Bool
406 can_split =  
407 #if    defined(i386_TARGET_ARCH)     \
408     || defined(alpha_TARGET_ARCH)    \
409     || defined(hppa_TARGET_ARCH)     \
410     || defined(m68k_TARGET_ARCH)     \
411     || defined(mips_TARGET_ARCH)     \
412     || defined(powerpc_TARGET_ARCH)  \
413     || defined(rs6000_TARGET_ARCH)   \
414     || defined(sparc_TARGET_ARCH) 
415    True
416 #else
417    False
418 #endif
419
420 -----------------------------------------------------------------------------
421 -- Ways
422
423 -- The central concept of a "way" is that all objects in a given
424 -- program must be compiled in the same "way".  Certain options change
425 -- parameters of the virtual machine, eg. profiling adds an extra word
426 -- to the object header, so profiling objects cannot be linked with
427 -- non-profiling objects.
428
429 -- After parsing the command-line options, we determine which "way" we
430 -- are building - this might be a combination way, eg. profiling+ticky-ticky.
431
432 -- We then find the "build-tag" associated with this way, and this
433 -- becomes the suffix used to find .hi files and libraries used in
434 -- this compilation.
435
436 GLOBAL_VAR(v_Build_tag, "", String)
437
438 -- The RTS has its own build tag, because there are some ways that
439 -- affect the RTS only.
440 GLOBAL_VAR(v_RTS_Build_tag, "", String)
441
442 data WayName
443   = WayThreaded
444   | WayDebug
445   | WayProf
446   | WayUnreg
447   | WayTicky
448   | WayPar
449   | WayGran
450   | WaySMP
451   | WayNDP
452   | WayUser_a
453   | WayUser_b
454   | WayUser_c
455   | WayUser_d
456   | WayUser_e
457   | WayUser_f
458   | WayUser_g
459   | WayUser_h
460   | WayUser_i
461   | WayUser_j
462   | WayUser_k
463   | WayUser_l
464   | WayUser_m
465   | WayUser_n
466   | WayUser_o
467   | WayUser_A
468   | WayUser_B
469   deriving (Eq,Ord)
470
471 GLOBAL_VAR(v_Ways, [] ,[WayName])
472
473 allowed_combination way = and [ x `allowedWith` y 
474                               | x <- way, y <- way, x < y ]
475   where
476         -- Note ordering in these tests: the left argument is
477         -- <= the right argument, according to the Ord instance
478         -- on Way above.
479
480         -- debug is allowed with everything
481         _ `allowedWith` WayDebug                = True
482         WayDebug `allowedWith` _                = True
483
484         WayThreaded `allowedWith` WayProf       = True
485         WayProf `allowedWith` WayUnreg          = True
486         WayProf `allowedWith` WaySMP            = True
487         WayProf `allowedWith` WayNDP            = True
488         _ `allowedWith` _                       = False
489
490
491 findBuildTag :: IO [String]  -- new options
492 findBuildTag = do
493   way_names <- readIORef v_Ways
494   let ws = sort way_names
495   if not (allowed_combination ws)
496       then throwDyn (CmdLineError $
497                     "combination not supported: "  ++
498                     foldr1 (\a b -> a ++ '/':b) 
499                     (map (wayName . lkupWay) ws))
500       else let ways    = map lkupWay ws
501                tag     = mkBuildTag (filter (not.wayRTSOnly) ways)
502                rts_tag = mkBuildTag ways
503                flags   = map wayOpts ways
504            in do
505            writeIORef v_Build_tag tag
506            writeIORef v_RTS_Build_tag rts_tag
507            return (concat flags)
508
509 mkBuildTag :: [Way] -> String
510 mkBuildTag ways = concat (intersperse "_" (map wayTag ways))
511
512 lkupWay w = 
513    case lookup w way_details of
514         Nothing -> error "findBuildTag"
515         Just details -> details
516
517 data Way = Way {
518   wayTag     :: String,
519   wayRTSOnly :: Bool,
520   wayName    :: String,
521   wayOpts    :: [String]
522   }
523
524 way_details :: [ (WayName, Way) ]
525 way_details =
526   [ (WayThreaded, Way "thr" True "Threaded" [
527 #if defined(freebsd_TARGET_OS)
528           "-optc-pthread"
529         , "-optl-pthread"
530 #endif
531         ] ),
532
533     (WayDebug, Way "debug" True "Debug" [] ),
534
535     (WayProf, Way  "p" False "Profiling"
536         [ "-fscc-profiling"
537         , "-DPROFILING"
538         , "-optc-DPROFILING"
539         , "-fvia-C" ]),
540
541     (WayTicky, Way  "t" False "Ticky-ticky Profiling"  
542         [ "-fticky-ticky"
543         , "-DTICKY_TICKY"
544         , "-optc-DTICKY_TICKY"
545         , "-fvia-C" ]),
546
547     (WayUnreg, Way  "u" False "Unregisterised" 
548         unregFlags ),
549
550     -- optl's below to tell linker where to find the PVM library -- HWL
551     (WayPar, Way  "mp" False "Parallel" 
552         [ "-fparallel"
553         , "-D__PARALLEL_HASKELL__"
554         , "-optc-DPAR"
555         , "-package concurrent"
556         , "-optc-w"
557         , "-optl-L${PVM_ROOT}/lib/${PVM_ARCH}"
558         , "-optl-lpvm3"
559         , "-optl-lgpvm3"
560         , "-fvia-C" ]),
561
562     -- at the moment we only change the RTS and could share compiler and libs!
563     (WayPar, Way  "mt" False "Parallel ticky profiling" 
564         [ "-fparallel"
565         , "-D__PARALLEL_HASKELL__"
566         , "-optc-DPAR"
567         , "-optc-DPAR_TICKY"
568         , "-package concurrent"
569         , "-optc-w"
570         , "-optl-L${PVM_ROOT}/lib/${PVM_ARCH}"
571         , "-optl-lpvm3"
572         , "-optl-lgpvm3"
573         , "-fvia-C" ]),
574
575     (WayPar, Way  "md" False "Distributed" 
576         [ "-fparallel"
577         , "-D__PARALLEL_HASKELL__"
578         , "-D__DISTRIBUTED_HASKELL__"
579         , "-optc-DPAR"
580         , "-optc-DDIST"
581         , "-package concurrent"
582         , "-optc-w"
583         , "-optl-L${PVM_ROOT}/lib/${PVM_ARCH}"
584         , "-optl-lpvm3"
585         , "-optl-lgpvm3"
586         , "-fvia-C" ]),
587
588     (WayGran, Way  "mg" False "GranSim"
589         [ "-fgransim"
590         , "-D__GRANSIM__"
591         , "-optc-DGRAN"
592         , "-package concurrent"
593         , "-fvia-C" ]),
594
595     (WaySMP, Way  "s" False "SMP"
596         [ "-fsmp"
597         , "-optc-pthread"
598 #ifndef freebsd_TARGET_OS
599         , "-optl-pthread"
600 #endif
601         , "-optc-DSMP"
602         , "-fvia-C" ]),
603
604     (WayNDP, Way  "ndp" False "Nested data parallelism"
605         [ "-fparr"
606         , "-fflatten"]),
607
608     (WayUser_a,  Way  "a"  False "User way 'a'"  ["$WAY_a_REAL_OPTS"]), 
609     (WayUser_b,  Way  "b"  False "User way 'b'"  ["$WAY_b_REAL_OPTS"]), 
610     (WayUser_c,  Way  "c"  False "User way 'c'"  ["$WAY_c_REAL_OPTS"]), 
611     (WayUser_d,  Way  "d"  False "User way 'd'"  ["$WAY_d_REAL_OPTS"]), 
612     (WayUser_e,  Way  "e"  False "User way 'e'"  ["$WAY_e_REAL_OPTS"]), 
613     (WayUser_f,  Way  "f"  False "User way 'f'"  ["$WAY_f_REAL_OPTS"]), 
614     (WayUser_g,  Way  "g"  False "User way 'g'"  ["$WAY_g_REAL_OPTS"]), 
615     (WayUser_h,  Way  "h"  False "User way 'h'"  ["$WAY_h_REAL_OPTS"]), 
616     (WayUser_i,  Way  "i"  False "User way 'i'"  ["$WAY_i_REAL_OPTS"]), 
617     (WayUser_j,  Way  "j"  False "User way 'j'"  ["$WAY_j_REAL_OPTS"]), 
618     (WayUser_k,  Way  "k"  False "User way 'k'"  ["$WAY_k_REAL_OPTS"]), 
619     (WayUser_l,  Way  "l"  False "User way 'l'"  ["$WAY_l_REAL_OPTS"]), 
620     (WayUser_m,  Way  "m"  False "User way 'm'"  ["$WAY_m_REAL_OPTS"]), 
621     (WayUser_n,  Way  "n"  False "User way 'n'"  ["$WAY_n_REAL_OPTS"]), 
622     (WayUser_o,  Way  "o"  False "User way 'o'"  ["$WAY_o_REAL_OPTS"]), 
623     (WayUser_A,  Way  "A"  False "User way 'A'"  ["$WAY_A_REAL_OPTS"]), 
624     (WayUser_B,  Way  "B"  False "User way 'B'"  ["$WAY_B_REAL_OPTS"]) 
625   ]
626
627 unregFlags = 
628    [ "-optc-DNO_REGS"
629    , "-optc-DUSE_MINIINTERPRETER"
630    , "-fno-asm-mangling"
631    , "-funregisterised"
632    , "-fvia-C" ]