From: simonmar Date: Fri, 2 Aug 2002 12:24:04 +0000 (+0000) Subject: [project @ 2002-08-02 12:24:04 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~1778 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=226413e1427f0436a0fc21ca156b956c60f730c5;p=ghc-hetmet.git [project @ 2002-08-02 12:24:04 by simonmar] Pass -fno-builtin to gcc when compiling .hc files, because this avoids a common cause of running out of registers when foreign calls to functions like memcpy(), strlen() are made from Haskell. MERGE --- diff --git a/ghc/compiler/main/DriverFlags.hs b/ghc/compiler/main/DriverFlags.hs index 63aa85c..5cd1839 100644 --- a/ghc/compiler/main/DriverFlags.hs +++ b/ghc/compiler/main/DriverFlags.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: DriverFlags.hs,v 1.99 2002/07/11 06:52:23 ken Exp $ +-- $Id: DriverFlags.hs,v 1.100 2002/08/02 12:24:04 simonmar Exp $ -- -- Driver flags -- @@ -572,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 ] )