[pypy-commit] pypy default: Obscure, obscure, obscure workaround for the fact

arigo noreply at buildbot.pypy.org
Mon Oct 17 15:17:16 CEST 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r48122:4b39d3acfd86
Date: 2011-10-17 15:16 +0200
http://bitbucket.org/pypy/pypy/changeset/4b39d3acfd86/

Log:	Obscure, obscure, obscure workaround for the fact that libffi.a
	cannot always be gcc'ed into .so files.

diff --git a/pypy/translator/platform/linux.py b/pypy/translator/platform/linux.py
--- a/pypy/translator/platform/linux.py
+++ b/pypy/translator/platform/linux.py
@@ -1,5 +1,6 @@
 """Support for Linux."""
 
+import sys
 from pypy.translator.platform.posix import BasePosix
 
 class BaseLinux(BasePosix):
@@ -26,7 +27,11 @@
 
     def library_dirs_for_libffi_a(self):
         # places where we need to look for libffi.a
-        return self.library_dirs_for_libffi() + ['/usr/lib']
+        # XXX obscuuure!  only look for libffi.a if run with translate.py
+        if 'translate' in sys.modules:
+            return self.library_dirs_for_libffi() + ['/usr/lib']
+        else:
+            return []
 
 
 class Linux(BaseLinux):


More information about the pypy-commit mailing list