|
|
4ef3f10 |
diff -up pypy-pypy-release-1.7/pypy/translator/platform/linux.py.configure-fedora pypy-pypy-release-1.7/pypy/translator/platform/linux.py
|
|
|
4ef3f10 |
--- pypy-pypy-release-1.7/pypy/translator/platform/linux.py.configure-fedora 2011-11-19 02:44:54.000000000 -0500
|
|
|
4ef3f10 |
+++ pypy-pypy-release-1.7/pypy/translator/platform/linux.py 2011-11-21 13:07:03.454240019 -0500
|
|
|
4ef3f10 |
@@ -1,15 +1,21 @@
|
|
|
169de85 |
"""Support for Linux."""
|
|
|
4ef3f10 |
|
|
|
169de85 |
+import os
|
|
|
4ef3f10 |
import sys
|
|
|
f756cfc |
from pypy.translator.platform.posix import BasePosix
|
|
|
f756cfc |
|
|
|
f756cfc |
+CFLAGS = ['-O3', '-pthread', '-fomit-frame-pointer',
|
|
|
f756cfc |
+ '-Wall', '-Wno-unused']
|
|
|
f756cfc |
+if os.environ.get('CFLAGS', None):
|
|
|
f756cfc |
+ CFLAGS.extend(os.environ['CFLAGS'].split())
|
|
|
f756cfc |
+CFLAGS = tuple(CFLAGS)
|
|
|
f756cfc |
+
|
|
|
f756cfc |
class BaseLinux(BasePosix):
|
|
|
f756cfc |
name = "linux"
|
|
|
f756cfc |
|
|
|
4ef3f10 |
link_flags = ('-pthread',)
|
|
|
4ef3f10 |
extra_libs = ('-lrt',)
|
|
|
f756cfc |
- cflags = ('-O3', '-pthread', '-fomit-frame-pointer',
|
|
|
f756cfc |
- '-Wall', '-Wno-unused')
|
|
|
f756cfc |
+ cflags = CFLAGS
|
|
|
f756cfc |
standalone_only = ()
|
|
|
f756cfc |
shared_only = ('-fPIC',)
|
|
|
f756cfc |
so_ext = 'so'
|
|
|
4ef3f10 |
@@ -26,13 +32,14 @@ class BaseLinux(BasePosix):
|
|
|
4ef3f10 |
return self._pkg_config("libffi", "--libs-only-L",
|
|
|
4ef3f10 |
['/usr/lib/libffi'])
|
|
|
169de85 |
|
|
|
f756cfc |
- def library_dirs_for_libffi_a(self):
|
|
|
f756cfc |
- # places where we need to look for libffi.a
|
|
|
4ef3f10 |
- # XXX obscuuure! only look for libffi.a if run with translate.py
|
|
|
4ef3f10 |
- if 'translate' in sys.modules:
|
|
|
4ef3f10 |
- return self.library_dirs_for_libffi() + ['/usr/lib']
|
|
|
4ef3f10 |
- else:
|
|
|
4ef3f10 |
- return []
|
|
|
4ef3f10 |
+ # Fedora, at least, has the shared version but not the static:
|
|
|
f756cfc |
+ #def library_dirs_for_libffi_a(self):
|
|
|
f756cfc |
+ # # places where we need to look for libffi.a
|
|
|
4ef3f10 |
+ # # XXX obscuuure! only look for libffi.a if run with translate.py
|
|
|
4ef3f10 |
+ # if 'translate' in sys.modules:
|
|
|
4ef3f10 |
+ # return self.library_dirs_for_libffi() + ['/usr/lib']
|
|
|
4ef3f10 |
+ # else:
|
|
|
4ef3f10 |
+ # return []
|
|
|
f756cfc |
|
|
|
f756cfc |
|
|
|
4ef3f10 |
class Linux(BaseLinux):
|