[pypy-commit] pypy arm-backend-2: set the -fPIC compiler flag when running on linux for ARM

bivab noreply at buildbot.pypy.org
Sat Mar 17 16:49:53 CET 2012


Author: David Schneider <david.schneider at picle.org>
Branch: arm-backend-2
Changeset: r53760:29963b68f806
Date: 2012-03-17 15:32 +0000
http://bitbucket.org/pypy/pypy/changeset/29963b68f806/

Log:	set the -fPIC compiler flag when running on linux for ARM

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,6 +1,7 @@
 """Support for Linux."""
 
 import os
+import platform
 import sys
 from pypy.translator.platform.posix import BasePosix
 
@@ -41,8 +42,11 @@
 
 
 class Linux(BaseLinux):
-    shared_only = ()    # it seems that on 32-bit linux, compiling with -fPIC
-                        # gives assembler that asmgcc is not happy about.
+    if platform.machine().startswith('arm'):
+        shared_only = ('-fPIC',) # ARM requires compiling with -fPIC
+    else:
+        shared_only = () # it seems that on 32-bit linux, compiling with -fPIC
+                         # gives assembler that asmgcc is not happy about.
 
 class Linux64(BaseLinux):
     pass


More information about the pypy-commit mailing list