[m-dev.] Fixed: Mac OS X/Darwin Excessive Compilation Time

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Apr 18 22:47:37 AEST 2001


On 18-Apr-2001, Richard Hagen <r.hagen at mailbox.uq.edu.au> wrote:
>  On Tuesday, April 17, 2001, at 11:09  PM, Richard Hagen wrote: 
>  
> 
> > The problem with excessive compilation time under Mac OS X/Darwin 
> > seems 
> > to be coming from the use of cpp-precomp by gcc. 
> > 
>  
> Ok. I've added the following lines to scripts/mgnuc.in at about line 
> 392 (it's the code dealing 
> with pathological architectures): 
> 
>         *-apple-darwin*) 
>                 # cpp-precomp gets big and slow. Avoid. 
>                 case "$COMPILER" in 
>                         cc | gcc)          
>                                 GCC_OPTS="$GCC_OPTS --traditional-cpp" 
>                                 ;; 
>                 esac 
>                 ;; 

`-traditional-cpp' is not the right option to use, I think.
I don't know what `-traditional-cpp' does in Apple's version of gcc,
but in the standard (FSF) versions of gcc, `-traditional-cpp' forces
the use of a pre-ANSI K&R C preprocessor.  The Mercury compiler source is
written in ANSI/ISO C, not K&R C, and it makes use of some preprocessor
features (such as whitespace before `#define') that don't work with
`-traditional-cpp'.

Is there some option which just turns off precompiled headers,
but still uses an ANSI/ISO preprocessor?

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list