You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/pypy/files/2.0-no-static-hack-r1.patch

40 lines
1.5 KiB

Remove logic that links to libssl and libcrypto statically if
possible. Just always link dynamically: Gentoo is expected to have
sane dynamic libraries for us to use, and our users are not expected
to copy their pypy binary to a system with an incompatible
libssl/libcrypto and expect it to work.
Based on patch contributed by XU Benda <heroxbd@gentoo.org>.
--- a/rpython/rlib/ropenssl.py
+++ b/rpython/rlib/ropenssl.py
@@ -20,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',