[pypy-commit] pypy default: Hack hack more to make the ssl tests pass (at least a bit more) when
arigo
noreply at buildbot.pypy.org
Fri Apr 20 11:10:33 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r54564:3c320ce4ad61
Date: 2012-04-20 11:09 +0200
http://bitbucket.org/pypy/pypy/changeset/3c320ce4ad61/
Log: Hack hack more to make the ssl tests pass (at least a bit more) when
untranslated.
diff --git a/pypy/rlib/ropenssl.py b/pypy/rlib/ropenssl.py
--- a/pypy/rlib/ropenssl.py
+++ b/pypy/rlib/ropenssl.py
@@ -6,6 +6,7 @@
import sys, os
link_files = []
+testonly_libraries = []
if sys.platform == 'win32' and platform.name != 'mingw32':
libraries = ['libeay32', 'ssleay32',
'user32', 'advapi32', 'gdi32', 'msvcrt', 'ws2_32']
@@ -27,6 +28,7 @@
# 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']
else:
libraries += ['ssl', 'crypto']
@@ -41,6 +43,7 @@
eci = ExternalCompilationInfo(
libraries = libraries,
link_files = link_files,
+ testonly_libraries = testonly_libraries,
includes = includes,
export_symbols = [],
post_include_bits = [
diff --git a/pypy/rpython/lltypesystem/ll2ctypes.py b/pypy/rpython/lltypesystem/ll2ctypes.py
--- a/pypy/rpython/lltypesystem/ll2ctypes.py
+++ b/pypy/rpython/lltypesystem/ll2ctypes.py
@@ -1072,7 +1072,7 @@
try:
eci = _eci_cache[old_eci]
except KeyError:
- eci = old_eci.compile_shared_lib()
+ eci = old_eci.compile_shared_lib(ignore_a_files=True)
_eci_cache[old_eci] = eci
libraries = eci.testonly_libraries + eci.libraries + eci.frameworks
diff --git a/pypy/translator/tool/cbuild.py b/pypy/translator/tool/cbuild.py
--- a/pypy/translator/tool/cbuild.py
+++ b/pypy/translator/tool/cbuild.py
@@ -267,9 +267,12 @@
d['separate_module_files'] = ()
return files, ExternalCompilationInfo(**d)
- def compile_shared_lib(self, outputfilename=None):
+ def compile_shared_lib(self, outputfilename=None, ignore_a_files=False):
self = self.convert_sources_to_files()
- if not self.separate_module_files:
+ if ignore_a_files:
+ if not [fn for fn in self.link_files if fn.endswith('.a')]:
+ ignore_a_files = False # there are none
+ if not self.separate_module_files and not ignore_a_files:
if sys.platform != 'win32':
return self
if not self.export_symbols:
@@ -288,6 +291,13 @@
num += 1
basepath.ensure(dir=1)
outputfilename = str(pth.dirpath().join(pth.purebasename))
+
+ if ignore_a_files:
+ d = self._copy_attributes()
+ d['link_files'] = [fn for fn in d['link_files']
+ if not fn.endswith('.a')]
+ self = ExternalCompilationInfo(**d)
+
lib = str(host.compile([], self, outputfilename=outputfilename,
standalone=False))
d = self._copy_attributes()
More information about the pypy-commit
mailing list