Author: Armin Rigo <[email protected]>
Branch: py3.5
Changeset: r90615:8bbee7cc5217
Date: 2017-03-10 07:48 +0100
http://bitbucket.org/pypy/pypy/changeset/8bbee7cc5217/
Log: hg merge default
diff --git a/pypy/module/cpyext/include/_numpypy/numpy/npy_common.h
b/pypy/module/cpyext/include/_numpypy/numpy/npy_common.h
--- a/pypy/module/cpyext/include/_numpypy/numpy/npy_common.h
+++ b/pypy/module/cpyext/include/_numpypy/numpy/npy_common.h
@@ -1,8 +1,8 @@
#ifndef _NPY_COMMON_H_
#define _NPY_COMMON_H_
-typedef Py_intptr_t npy_intp;
-typedef Py_uintptr_t npy_uintp;
+typedef long npy_intp;
+typedef unsigned long npy_uintp;
typedef PY_LONG_LONG npy_longlong;
typedef unsigned PY_LONG_LONG npy_ulonglong;
typedef unsigned char npy_bool;
diff --git a/rpython/jit/backend/x86/test/test_zmath.py
b/rpython/jit/backend/x86/test/test_zmath.py
--- a/rpython/jit/backend/x86/test/test_zmath.py
+++ b/rpython/jit/backend/x86/test/test_zmath.py
@@ -61,7 +61,12 @@
return -42 # ok
def test_math():
- f = compile(fn, [])
+ # note: we use lldebug because in the normal optimizing mode, some
+ # calls may be completely inlined and constant-folded by the
+ # compiler (with -flto), e.g. atanh(0.3). They give then slightly
+ # different result than if they were executed at runtime.
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79973
+ f = compile(fn, [], lldebug=True)
res = f()
if res >= 0:
py.test.fail(repr(MathTests.TESTCASES[res]))
diff --git a/rpython/memory/gctransform/test/test_shadowcolor.py
b/rpython/memory/gctransform/test/test_shadowcolor.py
--- a/rpython/memory/gctransform/test/test_shadowcolor.py
+++ b/rpython/memory/gctransform/test/test_shadowcolor.py
@@ -246,7 +246,7 @@
regalloc = allocate_registers(graph)
assert summary_regalloc(regalloc) == [('a', 1)] * 2 + [('c', 0)] * 2
-@given(strategies.lists(strategies.booleans()))
+@given(strategies.lists(strategies.booleans(), max_size=31))
def test_make_bitmask(boollist):
index, bitmask = make_bitmask(boollist)
if index is None:
diff --git a/rpython/translator/platform/bsd.py
b/rpython/translator/platform/bsd.py
--- a/rpython/translator/platform/bsd.py
+++ b/rpython/translator/platform/bsd.py
@@ -11,7 +11,7 @@
standalone_only = []
shared_only = []
- def _args_for_shared(self, args):
+ def _args_for_shared(self, args, **kwds):
return ['-shared'] + args
def _include_dirs_for_libffi(self):
diff --git a/rpython/translator/platform/cygwin.py
b/rpython/translator/platform/cygwin.py
--- a/rpython/translator/platform/cygwin.py
+++ b/rpython/translator/platform/cygwin.py
@@ -27,7 +27,7 @@
so_ext = 'dll'
exe_ext = 'exe'
- def _args_for_shared(self, args):
+ def _args_for_shared(self, args, **kwds):
return ['-shared'] + args
def _include_dirs_for_libffi(self):
diff --git a/rpython/translator/platform/darwin.py
b/rpython/translator/platform/darwin.py
--- a/rpython/translator/platform/darwin.py
+++ b/rpython/translator/platform/darwin.py
@@ -30,13 +30,16 @@
print 'in get_rpath_flags, rel_libdirs is not fixed up',rel_libdirs
return self.rpath_flags
- def _args_for_shared(self, args):
- if hasattr(self, '_exe_name'):
- target = os.path.basename(self._exe_name)
+ def _args_for_shared(self, args, **kwds):
+ if 'exe_name' in kwds:
+ target_basename = kwds['exe_name'].basename
else:
- target = '$(TARGET)' # inside a Makefile
+ target_basename = '$(TARGET)'
+ # The default '$(TARGET)' is used inside a Makefile. Otherwise
+ # we get the basename of the executable we're trying to build.
return (list(self.shared_only)
- + ['-dynamiclib', '-install_name', '@rpath/' + target,
'-undefined', 'dynamic_lookup', '-flat_namespace']
+ + ['-dynamiclib', '-install_name', '@rpath/' + target_basename,
+ '-undefined', 'dynamic_lookup', '-flat_namespace']
+ args)
def _include_dirs_for_libffi(self):
diff --git a/rpython/translator/platform/linux.py
b/rpython/translator/platform/linux.py
--- a/rpython/translator/platform/linux.py
+++ b/rpython/translator/platform/linux.py
@@ -24,7 +24,7 @@
from rpython.translator.platform.arch import s390x
cflags = s390x.update_cflags(cflags)
- def _args_for_shared(self, args):
+ def _args_for_shared(self, args, **kwds):
return ['-shared'] + args
def _include_dirs_for_libffi(self):
diff --git a/rpython/translator/platform/netbsd.py
b/rpython/translator/platform/netbsd.py
--- a/rpython/translator/platform/netbsd.py
+++ b/rpython/translator/platform/netbsd.py
@@ -34,7 +34,7 @@
cc = get_env("CC", "gcc")
super(Netbsd, self).__init__(cc)
- def _args_for_shared(self, args):
+ def _args_for_shared(self, args, **kwds):
return ['-shared'] + args
def _preprocess_include_dirs(self, include_dirs):
diff --git a/rpython/translator/platform/posix.py
b/rpython/translator/platform/posix.py
--- a/rpython/translator/platform/posix.py
+++ b/rpython/translator/platform/posix.py
@@ -54,9 +54,7 @@
args = [str(ofile) for ofile in ofiles] + link_args
args += ['-o', str(exe_name)]
if not standalone:
- self._exe_name = str(exe_name)
- args = self._args_for_shared(args)
- del self._exe_name # remove, otherwise __eq__() fails
+ args = self._args_for_shared(args, exe_name=exe_name)
self._execute_c_compiler(cc, args, exe_name,
cwd=str(exe_name.dirpath()))
return exe_name
diff --git a/rpython/translator/platform/windows.py
b/rpython/translator/platform/windows.py
--- a/rpython/translator/platform/windows.py
+++ b/rpython/translator/platform/windows.py
@@ -200,7 +200,7 @@
def _linkfiles(self, link_files):
return list(link_files)
- def _args_for_shared(self, args):
+ def _args_for_shared(self, args, **kwds):
return ['/dll'] + args
def check___thread(self):
@@ -555,7 +555,7 @@
cc = 'gcc'
Platform.__init__(self, cc)
- def _args_for_shared(self, args):
+ def _args_for_shared(self, args, **kwds):
return ['-shared'] + args
def _include_dirs_for_libffi(self):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit