1. Pypy
  2. Untitled project
  3. pypy

Commits

Armin Rigo  committed 4b39d3a

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

  • Participants
  • Parent commits 854bc5e
  • Branches default

Comments (0)

Files changed (1)

File pypy/translator/platform/linux.py

View file
 """Support for Linux."""
 
+import sys
 from pypy.translator.platform.posix import BasePosix
 
 class BaseLinux(BasePosix):
 
     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):