[SciPy-dev] Mac OS X and gcc 4.2

David M. Cooke cookedm at physics.mcmaster.ca
Wed Aug 16 19:57:34 CDT 2006

On Wed, Aug 16, 2006 at 08:37:17PM -0400, David M. Cooke wrote:
> Annoying, eh? The *easiest* way I've found to use a different compiler
> that takes a different set of flags is to make a compiler wrapper
> script, that deletes the flags your compiler won't recognize, and add
> others you think you need. I've attached the one I use on my Mac.

probably help if I attached it ...

|David M. Cooke                      http://arbutus.physics.mcmaster.ca/dmc/
|cookedm at physics.mcmaster.ca
-------------- next part --------------
#!/usr/bin/env python
import sys
import os

realprog = "/opt/local/bin/gcc-dp-4.2"
options_to_remove = set(['-no-cpp-precomp', '-Wno-long-double',
                         '-mno-fused-madd', '-faltivec',

args = [a for a in sys.argv[1:] if a not in options_to_remove]
    while 1:
        i = args.index('-arch')
        del args[i:i+2]
except ValueError:
args.insert(0, '-fno-strict-aliasing')
print args
os.execvp(realprog, [realprog] + args)

More information about the Scipy-dev mailing list