Commits

Amaury Forgeot d'Arc committed ebafcbe

Fix compilation on 64bit linux

Comments (0)

Files changed (1)

lib_pypy/_ctypes_test.py

 
     # Compile .c file
     include_dir = os.path.join(thisdir, '..', 'include')
+    if sys.platform == 'win32':
+        ccflags = []
+    else:
+        ccflags = ['-fPIC']
     res = compiler.compile([os.path.join(thisdir, '_ctypes_test.c')],
-                           include_dirs=[include_dir])
+                           include_dirs=[include_dir],
+                           extra_preargs=ccflags)
     object_filename = res[0]
 
     # set link options