Thanks pedronis for applying one of the patches, but without the
trackgcroot one I can't get no trackgcroot test to pass, and without
the -dynamiclib change I get one failure on test_rffi_platform.py, but
with it the generated pypy .s files can't be read by trackgcroot.
Anyone knows how to fix the current failure on test_rffi_platform on
osx without changing the -bundle to -dynamiclib?
And the other failure about offset_labels, maybe it is possible to
offset them but not by so much as 2**30 but maybe 2**24 or something?
On Sep 30, 2009, at 2:06 PM, Leonardo Santagada wrote:
> 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
>
>
>
--
Leonardo Santagada
santagada at gmail.com
_______________________________________________
[email protected]
http://codespeak.net/mailman/listinfo/pypy-dev