1. Pypy
  2. Untitled project
  3. pypy

Commits

Maciej Fijalkowski  committed b9c3566

Port killing of static linking to the release

  • Participants
  • Parent commits eb5983d
  • Branches release-2.0.x

Comments (0)

Files changed (2)

File rpython/rlib/clibffi.py

View file
  • Ignore whitespace
     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:
     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,
         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:

File rpython/rlib/ropenssl.py

View file
  • Ignore whitespace
 import sys, os
 
 link_files = []
-testonly_libraries = []
 include_dirs = []
 if sys.platform == 'win32' and platform.name != 'mingw32':
     libraries = ['libeay32', 'ssleay32',
         # 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', 
 eci = ExternalCompilationInfo(
     libraries = libraries,
     link_files = link_files,
-    testonly_libraries = testonly_libraries,
     includes = includes,
     include_dirs = include_dirs,
     export_symbols = [],