[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

Ronald Oussoren report at bugs.python.org
Thu Jun 14 01:57:58 CEST 2012


Ronald Oussoren <ronaldoussoren at mac.com> added the comment:

The attached patch "issue13241-configure-version1.txt" implements a number of changes to configure (although only configure.ac is present in the patch)

1) Autodetect the compiler on OSX, in particular
   - detect llvm-gcc and use clang instead
   - use clang when gcc cannot be found
   - use xcrun to locate clang when it isn't in /usr/bin
     (no Command Line Tools for Xcode)

2) Detect the most recent working SDK, falls back to the 10.4u SDK
   when using an old version of Xcode or even '/' when that SDK isn't
   present


This patch needs work though:

* I have barely tested the patch, configure seems to generate a valid
  Makefile on OSX 10.7 with the unix tools installed, I haven't tested
  yet on older OSX versions of without the unix tools installed

* Distutils/packaging also need changes: need to detect that the 
  running system has different compiler tools than the build system.
  This is needed to be able to use the binary installers on python.org
  on systems with other compiler versions and installed SDKs

----------
Added file: http://bugs.python.org/file26004/issue13241-configure-version1.txt

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13241>
_______________________________________


More information about the Python-bugs-list mailing list