On 30-dec-04, at 21:01, Bob Ippolito wrote:


On Dec 30, 2004, at 2:52 PM, Ronald Oussoren wrote:


On 30-dec-04, at 18:49, Bob Ippolito wrote:


On Dec 30, 2004, at 11:44 AM, Jack Jansen wrote:


On 30-dec-04, at 10:02, Ronald Oussoren wrote:

In the quick-and-dirty-hacks category: you could write two simple shell-scripts that start the compiler with the right environment variables:


run-cc:
    #!/bin/sh

    env MACOSX_DEPLOYMENT_TARGET=10.3 gcc "[EMAIL PROTECTED]"

run-c++:
        #!/bin/sh
        env MACOSX_DEPLOYMENT_TARGET=10.3 gcc "[EMAIL PROTECTED]"

Here's an even better idea (I think), please think about whether it would fly:
In the Makefile we not only change LDSHARED and BLDSHARED to start with " env MACOSX_DEPLOYMENT_TARGET=10.3", but also CXX. That'll teach distutils to fiddle with our command lines:-)


Only question is: would this have any adverse side efffects?

Same problem. If you replace the first word, you'll end up with either "g++ gcc..." or "g++ MACOSX_DEPLOYMENT_TARGET=10.3 gcc..." depending on whether "env" was used or not.

Wouldn't you end up with 'env MAC.. gcc' when linking c++ extensions? distutils changes the first word which is 'env' in either case.

Oh.. right. But then given a bunch of .o files, it will probably not link in libstdc++. Who knows what SciPy will do with Fortran...

Sigh, you're right. Which leaves two options:
1. Always use g++ to link in LDSHARED (in addition to the "env" tricks above). Would this have any adverse consequences?
2. Use Ronald's idea of wrapper scripts for both gcc and g++. We'd have to come up with decent names, though (so that if they're accidentally deleted the user may at least have an idea what they were supposed to do), maybe something like macpy23-gcc and macpy23-g++? Also, we'd need a place to put them. /Library/Python/2.3-PythonPantherFix? /System/yaddayaddayadda/python2.3/config/PythonPantherFix? Other ideas?
--
Jack Jansen, <[EMAIL PROTECTED]>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma Goldman


_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to