[project @ 2002-08-02 12:24:04 by simonmar]
[ghc-hetmet.git] / ghc / compiler / main / DriverFlags.hs
index 0e2763b..5cd1839 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------------
--- $Id: DriverFlags.hs,v 1.98 2002/07/03 15:15:24 sof Exp $
+-- $Id: DriverFlags.hs,v 1.100 2002/08/02 12:24:04 simonmar Exp $
 --
 -- Driver flags
 --
@@ -535,7 +535,11 @@ buildStaticHscOpts = do
 
 machdepCCOpts 
    | prefixMatch "alpha"   cTARGETPLATFORM  
-       = return ( ["-static", "-w", "-mieee"], [] )
+       = return ( ["-static", "-w", "-mieee"
+#ifdef HAVE_THREADED_RTS_SUPPORT
+                   , "-D_REENTRANT"
+#endif
+                  ], [] )
        -- For now, to suppress the gcc warning "call-clobbered
        -- register used for global register variable", we simply
        -- disable all warnings altogether using the -w flag. Oh well.
@@ -568,6 +572,10 @@ machdepCCOpts
 --                    , if suffixMatch "mingw32" cTARGETPLATFORM then "-mno-cygwin" else "" 
                      ],
                      [ "-fno-defer-pop", "-fomit-frame-pointer",
+                       -- we want -fno-builtin, because when gcc inlines
+                       -- built-in functions like memcpy() it tends to
+                       -- run out of registers, requiring -monly-n-regs
+                       "-fno-builtin",
                        "-DSTOLEN_X86_REGS="++show n_regs ]
                    )