Author: Stefano Rivera <[email protected]>
Branch:
Changeset: r51701:173aa3e5cde0
Date: 2012-01-24 00:43 +0200
http://bitbucket.org/pypy/pypy/changeset/173aa3e5cde0/
Log: Get additional compiler and linker flags from the environment
(rather than ignoring them on linux, and replacing the required
flags on freebsd)
diff --git a/pypy/translator/platform/freebsd.py
b/pypy/translator/platform/freebsd.py
--- a/pypy/translator/platform/freebsd.py
+++ b/pypy/translator/platform/freebsd.py
@@ -18,8 +18,9 @@
class Freebsd(posix.BasePosix):
name = "freebsd"
- link_flags = get_env_vector("LDFLAGS", '-pthread')
- cflags = get_env_vector("CFLAGS", "-O3 -pthread -fomit-frame-pointer")
+ link_flags = ['-pthread'] + get_env_vector('LDFLAGS', '')
+ cflags = ['-O3', '-pthread', '-fomit-frame-pointer'
+ ] + get_env_vector('CFLAGS', '')
standalone_only = []
shared_only = []
so_ext = 'so'
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,15 +1,20 @@
"""Support for Linux."""
+import os
import sys
from pypy.translator.platform.posix import BasePosix
class BaseLinux(BasePosix):
name = "linux"
- link_flags = ('-pthread',)
+ link_flags = tuple(
+ ['-pthread',]
+ + os.environ.get('LDFLAGS', '').split())
extra_libs = ('-lrt',)
- cflags = ('-O3', '-pthread', '-fomit-frame-pointer',
- '-Wall', '-Wno-unused')
+ cflags = tuple(
+ ['-O3', '-pthread', '-fomit-frame-pointer',
+ '-Wall', '-Wno-unused']
+ + os.environ.get('CFLAGS', '').split())
standalone_only = ()
shared_only = ('-fPIC',)
so_ext = 'so'
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit