|
|
f756cfc |
Index: pypy-1.4/pypy/translator/platform/linux.py
|
|
|
f756cfc |
===================================================================
|
|
|
f756cfc |
--- pypy-1.4.orig/pypy/translator/platform/linux.py
|
|
|
f756cfc |
+++ pypy-1.4/pypy/translator/platform/linux.py
|
|
|
f756cfc |
@@ -3,17 +3,22 @@ import py, os
|
|
|
f756cfc |
from pypy.translator.platform import _run_subprocess
|
|
|
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 |
|
|
|
f756cfc |
link_flags = ('-pthread', '-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'
|
|
|
f756cfc |
so_prefixes = ('lib', '')
|
|
|
f756cfc |
-
|
|
|
f756cfc |
+
|
|
|
f756cfc |
def _args_for_shared(self, args):
|
|
|
f756cfc |
return ['-shared'] + args
|
|
|
f756cfc |
|
|
|
f756cfc |
@@ -29,9 +34,10 @@ class BaseLinux(BasePosix):
|
|
|
f756cfc |
class Linux(BaseLinux):
|
|
|
f756cfc |
shared_only = () # it seems that on 32-bit linux, compiling with -fPIC
|
|
|
f756cfc |
# gives assembler that asmgcc is not happy about.
|
|
|
f756cfc |
- def library_dirs_for_libffi_a(self):
|
|
|
f756cfc |
- # places where we need to look for libffi.a
|
|
|
f756cfc |
- return self.library_dirs_for_libffi() + ['/usr/lib']
|
|
|
f756cfc |
+ # Fedora Linux, 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
|
|
|
f756cfc |
+ # return self.library_dirs_for_libffi() + ['/usr/lib']
|
|
|
f756cfc |
|
|
|
f756cfc |
|
|
|
f756cfc |
class Linux64(BaseLinux):
|