To make compilation and asmgcroot happy on osx I made some changes, I  
would like to know if someone has anything against applying this stuff  
to trunk?

Index: pypy/translator/c/gcc/trackgcroot.py
===================================================================
--- pypy/translator/c/gcc/trackgcroot.py        (revision 68036)
+++ pypy/translator/c/gcc/trackgcroot.py        (working copy)
@@ -22,7 +22,11 @@
  r_sectionstart         = re.compile(r"\t\.("+'|'.join(OTHERSECTIONS) 
+").*$")
  r_functionstart_darwin = re.compile(r"_(\w+):\s*$")

-OFFSET_LABELS   = 2**30
+# darwin's ld complain about this hack
+if sys.platform == 'darwin':
+    OFFSET_LABELS = 0
+else:
+    OFFSET_LABELS = 2**30

  # inside functions
  LABEL           = r'([.]?[...@]+)'
Index: pypy/translator/platform/test/test_darwin.py
===================================================================
--- pypy/translator/platform/test/test_darwin.py        (revision 68036)
+++ pypy/translator/platform/test/test_darwin.py        (working copy)
@@ -2,8 +2,8 @@
  """ File containing darwin platform tests
  """

-import py, os
-if os.name != 'darwin':
+import py, sys
+if sys.platform != 'darwin':
      py.test.skip("Darwin only")

  from pypy.tool.udir import udir
Index: pypy/translator/platform/darwin.py
===================================================================
--- pypy/translator/platform/darwin.py  (revision 68036)
+++ pypy/translator/platform/darwin.py  (working copy)
@@ -18,7 +18,7 @@
          self.cc = cc

      def _args_for_shared(self, args):
-        return (self.shared_only + ['-bundle', '-undefined',  
'dynamic_lookup']
+        return (self.shared_only + ['-dynamiclib', '-undefined',  
'dynamic_lookup']
                                   + args)

      def include_dirs_for_libffi(self):


--
Leonardo Santagada
santagada at gmail.com



_______________________________________________
[email protected]
http://codespeak.net/mailman/listinfo/pypy-dev

Reply via email to