[Python-checkins] r80376 - python/branches/py3k-cdecimal/setup.py

stefan.krah python-checkins at python.org
Thu Apr 22 20:09:21 CEST 2010


Author: stefan.krah
Date: Thu Apr 22 20:09:21 2010
New Revision: 80376

Log:

Disable pentium-pro optimizations on Mac OS X. The linker has problems
with a global constant in gcc inline asm.



Modified:
   python/branches/py3k-cdecimal/setup.py

Modified: python/branches/py3k-cdecimal/setup.py
==============================================================================
--- python/branches/py3k-cdecimal/setup.py	(original)
+++ python/branches/py3k-cdecimal/setup.py	Thu Apr 22 20:09:21 2010
@@ -1686,8 +1686,9 @@
                 define_macros = [('CONFIG_32', '1'), ('ANSI', '1')]
         elif SIZEOF_SIZE_T == 4:
             define_macros = [('CONFIG_32', '1')]
-            if HAVE_GCC_ASM_FOR_X87 and 'gcc' in cc:
+            if HAVE_GCC_ASM_FOR_X87 and 'gcc' in cc and platform != 'darwin':
                 # XXX icc >= 11.0 and clang work as well.
+                # XXX link errors on darwin.
                 define_macros.append(('PPRO', '1'))
             else:
                 define_macros.append(('ANSI', '1'))
@@ -1697,8 +1698,6 @@
         # define_macros.append(('USE_THREAD_LOCAL_STORAGE', 1))
         if 'sunos' in platform and cc == 'cc': # suncc
             extra_compile_args.extend(['-erroff=E_ARGUEMENT_MISMATCH'])
-        if platform == 'darwin':
-            extra_compile_args.extend(['-fPIC'])
         ext = Extension (
             'cdecimal',
             define_macros=define_macros,


More information about the Python-checkins mailing list