Author: Maciej Fijalkowski <[email protected]>
Branch: release-2.0.x
Changeset: r63939:b9c3566aa017
Date: 2013-05-09 11:07 +0200
http://bitbucket.org/pypy/pypy/changeset/b9c3566aa017/

Log:    Port killing of static linking to the release

diff --git a/rpython/rlib/clibffi.py b/rpython/rlib/clibffi.py
--- a/rpython/rlib/clibffi.py
+++ b/rpython/rlib/clibffi.py
@@ -65,9 +65,6 @@
     separate_module_sources = []
 
 if not _WIN32:
-    # On some platforms, we try to link statically libffi, which is small
-    # anyway and avoids endless troubles for installing.  On other platforms
-    # libffi.a is typically not there, so we link dynamically.
     includes = ['ffi.h']
 
     if _MAC_OS:
@@ -75,27 +72,7 @@
     else: 
         pre_include_bits = []
 
-    def find_libffi_a():
-        dirlist = platform.library_dirs_for_libffi_a()
-        for dir in dirlist:
-            result = os.path.join(dir, 'libffi.a')
-            if os.path.exists(result):
-                return result
-        log.WARNING("'libffi.a' not found in %s" % (dirlist,))
-        log.WARNING("trying to use the dynamic library instead...")
-        return None
-
-    path_libffi_a = None
-    if hasattr(platform, 'library_dirs_for_libffi_a'):
-        path_libffi_a = find_libffi_a()
-    if path_libffi_a is not None:
-        # platforms on which we want static linking
-        libraries = []
-        link_files = [path_libffi_a]
-    else:
-        # platforms on which we want dynamic linking
-        libraries = ['ffi']
-        link_files = []
+    libraries = ['ffi']
 
     eci = ExternalCompilationInfo(
         pre_include_bits = pre_include_bits,
@@ -104,7 +81,6 @@
         separate_module_sources = separate_module_sources,
         include_dirs = platform.include_dirs_for_libffi(),
         library_dirs = platform.library_dirs_for_libffi(),
-        link_files = link_files,
         testonly_libraries = ['ffi'],
     )
 elif _MINGW:
diff --git a/rpython/rlib/ropenssl.py b/rpython/rlib/ropenssl.py
--- a/rpython/rlib/ropenssl.py
+++ b/rpython/rlib/ropenssl.py
@@ -7,7 +7,6 @@
 import sys, os
 
 link_files = []
-testonly_libraries = []
 include_dirs = []
 if sys.platform == 'win32' and platform.name != 'mingw32':
     libraries = ['libeay32', 'ssleay32',
@@ -21,27 +20,8 @@
         # so that openssl/ssl.h can repair this nonsense.
         'wincrypt.h']
 else:
-    libraries = ['z']
+    libraries = ['z', 'ssl', 'crypto']
     includes = []
-    if (sys.platform.startswith('linux') and
-        os.path.exists('/usr/lib/libssl.a') and
-        os.path.exists('/usr/lib/libcrypto.a')):
-        # use static linking to avoid the infinite
-        # amount of troubles due to symbol versions
-        # and 0.9.8/1.0.0
-        link_files += ['/usr/lib/libssl.a', '/usr/lib/libcrypto.a']
-        testonly_libraries += ['ssl', 'crypto']
-    elif (sys.platform.startswith('linux') and
-        os.path.exists('/usr/local/ssl/lib/libssl.a') and
-        os.path.exists('/usr/local/ssl/lib/libcrypto.a')):
-        # use static linking, 2nd version
-        include_dirs += ['/usr/local/ssl/include']
-        link_files += ['/usr/local/ssl/lib/libssl.a',
-                       '/usr/local/ssl/lib/libcrypto.a',
-                       '-ldl']
-        testonly_libraries += ['ssl', 'crypto']
-    else:
-        libraries += ['ssl', 'crypto']
 
 includes += [
     'openssl/ssl.h', 
@@ -54,7 +34,6 @@
 eci = ExternalCompilationInfo(
     libraries = libraries,
     link_files = link_files,
-    testonly_libraries = testonly_libraries,
     includes = includes,
     include_dirs = include_dirs,
     export_symbols = [],
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to