Blob Blame History Raw
diff -up pypy-1.5-src/pypy/translator/platform/linux.py.configure-fedora pypy-1.5-src/pypy/translator/platform/linux.py
--- pypy-1.5-src/pypy/translator/platform/linux.py.configure-fedora	2011-04-30 10:18:50.000000000 -0400
+++ pypy-1.5-src/pypy/translator/platform/linux.py	2011-04-30 18:59:24.041160978 -0400
@@ -1,13 +1,18 @@
 """Support for Linux."""
-
+import os
 from pypy.translator.platform.posix import BasePosix
 
+CFLAGS = ['-O3', '-pthread', '-fomit-frame-pointer',
+          '-Wall', '-Wno-unused']
+if os.environ.get('CFLAGS', None):
+    CFLAGS.extend(os.environ['CFLAGS'].split())
+CFLAGS = tuple(CFLAGS)
+
 class BaseLinux(BasePosix):
     name = "linux"
     
     link_flags = ('-pthread', '-lrt')
-    cflags = ('-O3', '-pthread', '-fomit-frame-pointer',
-              '-Wall', '-Wno-unused')
+    cflags = CFLAGS
     standalone_only = ()
     shared_only = ('-fPIC',)
     so_ext = 'so'
@@ -29,9 +34,10 @@ class Linux(BaseLinux):
     shared_only = ()    # it seems that on 32-bit linux, compiling with -fPIC
                         # gives assembler that asmgcc is not happy about.
 
-    def library_dirs_for_libffi_a(self):
-        # places where we need to look for libffi.a
-        return self.library_dirs_for_libffi() + ['/usr/lib']
+    # Fedora Linux, at least, has the shared version but not the static
+    #def library_dirs_for_libffi_a(self):
+    #    # places where we need to look for libffi.a
+    #    return self.library_dirs_for_libffi() + ['/usr/lib']
 
 
 class Linux64(BaseLinux):