Author: Stefano Rivera <stef...@rivera.za.net> Branch: Changeset: r57831:c3d0f9f30426 Date: 2012-10-07 18:42 +0200 http://bitbucket.org/pypy/pypy/changeset/c3d0f9f30426/
Log: Not needing -fPIC on i386 is exception, not the norm. Don't expect all 32 bit archs to build shared libraries without it. diff --git a/pypy/translator/platform/__init__.py b/pypy/translator/platform/__init__.py --- a/pypy/translator/platform/__init__.py +++ b/pypy/translator/platform/__init__.py @@ -240,12 +240,15 @@ if sys.platform.startswith('linux'): - from pypy.translator.platform.linux import Linux, Linux64 + from pypy.translator.platform.linux import Linux, LinuxPIC import platform - if platform.architecture()[0] == '32bit': + # Only required on armhf and mips{,el}, not armel. But there's no way to + # detect armhf without shelling out + if (platform.architecture()[0] == '64bit' + or platform.machine().startswith(('arm', 'mips'))): + host_factory = LinuxPIC + else: host_factory = Linux - else: - host_factory = Linux64 elif sys.platform == 'darwin': from pypy.translator.platform.darwin import Darwin_i386, Darwin_x86_64, Darwin_PowerPC import platform 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 @@ -48,5 +48,5 @@ shared_only = () # it seems that on 32-bit linux, compiling with -fPIC # gives assembler that asmgcc is not happy about. -class Linux64(BaseLinux): +class LinuxPIC(BaseLinux): pass _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit