[pypy-svn] pypy default: Tentative: disable .cfi_xxx on darwin64, where they are not recognized.

arigo commits-noreply at bitbucket.org
Sun Apr 10 23:16:43 CEST 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r43272:795b479356ba
Date: 2011-04-10 23:16 +0200
http://bitbucket.org/pypy/pypy/changeset/795b479356ba/

Log:	Tentative: disable .cfi_xxx on darwin64, where they are not
	recognized.

diff --git a/pypy/translator/c/gcc/trackgcroot.py b/pypy/translator/c/gcc/trackgcroot.py
--- a/pypy/translator/c/gcc/trackgcroot.py
+++ b/pypy/translator/c/gcc/trackgcroot.py
@@ -1645,7 +1645,7 @@
                      darwin64='')
             print >> output, "%s:" % _globalname('pypy_asm_stackwalk')
 
-            print >> output, """\
+            s = """\
             /* See description in asmgcroot.py */
             .cfi_startproc
             movq\t%rdi, %rdx\t/* 1st argument, which is the callback */
@@ -1691,6 +1691,12 @@
             ret
             .cfi_endproc
             """
+            if self.format == 'darwin64':
+                # obscure.  gcc there seems not to support .cfi_...
+                # hack it out...
+                s = re.sub(r'([.]cfi_[^/\n]+)([/\n])',
+                           r'/* \1 disabled on darwin */\2', s)
+            print >> output, s
             _variant(elf64='.size pypy_asm_stackwalk, .-pypy_asm_stackwalk',
                      darwin64='')
         else:


More information about the Pypy-commit mailing list