diff options
author | dbn <dbn@FreeBSD.org> | 2016-08-22 02:36:49 +0800 |
---|---|---|
committer | dbn <dbn@FreeBSD.org> | 2016-08-22 02:36:49 +0800 |
commit | a3e109f0817968fa387e7290dae509f2fb07112d (patch) | |
tree | feedf2c7754192b99eb61362b61a8d43b985c2c9 /lang | |
parent | 25463ad20269ea5ed38ced38c9dab810795398f8 (diff) | |
download | freebsd-ports-gnome-a3e109f0817968fa387e7290dae509f2fb07112d.tar.gz freebsd-ports-gnome-a3e109f0817968fa387e7290dae509f2fb07112d.tar.zst freebsd-ports-gnome-a3e109f0817968fa387e7290dae509f2fb07112d.zip |
lang/pypy(3): unbreak on PowerPC.
Unbreak build by:
- correctly detecting PowerPC architecture,
- excluding PowerPC specific assembler code (as there is none), and
- fixing the JIT due to long double == double for PowerPC.
Special thanks to swills who diligently tested multiple iterations of patches
to eventually end up at a solution.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/pypy/Makefile | 2 | ||||
-rw-r--r-- | lang/pypy/files/patch-pypy_module___cffi__backend_misc.py | 10 | ||||
-rw-r--r-- | lang/pypy/files/patch-rpython_jit_backend_detect__cpu.py | 10 | ||||
-rw-r--r-- | lang/pypy/files/patch-rpython_translator_c_src_asm.c | 13 | ||||
-rw-r--r-- | lang/pypy/files/patch-rpython_translator_c_src_asm.h | 13 | ||||
-rw-r--r-- | lang/pypy3/files/patch-pypy_module___cffi__backend_misc.py | 10 | ||||
-rw-r--r-- | lang/pypy3/files/patch-rpython_jit_backend_detect__cpu.py | 10 | ||||
-rw-r--r-- | lang/pypy3/files/patch-rpython_translator_c_src_asm.c | 13 | ||||
-rw-r--r-- | lang/pypy3/files/patch-rpython_translator_c_src_asm.h | 13 |
9 files changed, 92 insertions, 2 deletions
diff --git a/lang/pypy/Makefile b/lang/pypy/Makefile index b468589fc7f9..da0d0a9b244b 100644 --- a/lang/pypy/Makefile +++ b/lang/pypy/Makefile @@ -10,8 +10,6 @@ DISTNAME?= ${PORTNAME}2-v${PORTVERSION}-src MAINTAINER= python@FreeBSD.org COMMENT= Fast, compliant implementation of the Python language -BROKEN_powerpc64= Does not build - LIB_DEPENDS= libexpat.so:textproc/expat2 \ libffi.so:devel/libffi TEST_DEPENDS= ${PREFIX}/${PYPY_DIR}/lib_pypy/_gdbm_cffi.${PYPY_CFFI_VER}.so:databases/pypy-gdbm \ diff --git a/lang/pypy/files/patch-pypy_module___cffi__backend_misc.py b/lang/pypy/files/patch-pypy_module___cffi__backend_misc.py new file mode 100644 index 000000000000..7dd747682e45 --- /dev/null +++ b/lang/pypy/files/patch-pypy_module___cffi__backend_misc.py @@ -0,0 +1,10 @@ +--- pypy/module/_cffi_backend/misc.py.orig 2016-06-14 07:46:04 UTC ++++ pypy/module/_cffi_backend/misc.py +@@ -253,6 +253,7 @@ _is_nonnull_longdouble = rffi.llexternal + sandboxsafe=True) + + # split here for JIT backends that don't support floats/longlongs/etc. ++@jit.dont_look_inside + def is_nonnull_longdouble(cdata): + return _is_nonnull_longdouble(read_raw_longdouble_data(cdata)) + def is_nonnull_float(cdata, size): diff --git a/lang/pypy/files/patch-rpython_jit_backend_detect__cpu.py b/lang/pypy/files/patch-rpython_jit_backend_detect__cpu.py new file mode 100644 index 000000000000..26dd2cb4238e --- /dev/null +++ b/lang/pypy/files/patch-rpython_jit_backend_detect__cpu.py @@ -0,0 +1,10 @@ +--- rpython/jit/backend/detect_cpu.py.orig 2016-06-14 07:46:04 UTC ++++ rpython/jit/backend/detect_cpu.py +@@ -61,6 +61,7 @@ def detect_model_from_host_platform(): + 'i86pc': MODEL_X86, # Solaris/Intel + 'x86': MODEL_X86, # Apple + 'Power Macintosh': MODEL_PPC_64, ++ 'powerpc': MODEL_PPC_64, # freebsd + 'ppc64': MODEL_PPC_64, + 'ppc64le': MODEL_PPC_64, + 'x86_64': MODEL_X86, diff --git a/lang/pypy/files/patch-rpython_translator_c_src_asm.c b/lang/pypy/files/patch-rpython_translator_c_src_asm.c new file mode 100644 index 000000000000..50d2c7102882 --- /dev/null +++ b/lang/pypy/files/patch-rpython_translator_c_src_asm.c @@ -0,0 +1,13 @@ +--- rpython/translator/c/src/asm.c.orig 2016-06-14 07:46:04 UTC ++++ rpython/translator/c/src/asm.c +@@ -8,10 +8,6 @@ + /* # include "src/asm_gcc_x86_64.c" */ + #endif + +-#if defined(__GNUC__) && defined(__ppc__) +-# include "src/asm_ppc.c" +-#endif +- + #if defined(_MSC_VER) + # include "src/asm_msvc.c" + #endif diff --git a/lang/pypy/files/patch-rpython_translator_c_src_asm.h b/lang/pypy/files/patch-rpython_translator_c_src_asm.h new file mode 100644 index 000000000000..352938fe7b2f --- /dev/null +++ b/lang/pypy/files/patch-rpython_translator_c_src_asm.h @@ -0,0 +1,13 @@ +--- rpython/translator/c/src/asm.h.orig 2016-06-14 07:46:04 UTC ++++ rpython/translator/c/src/asm.h +@@ -10,10 +10,6 @@ + # include "src/asm_gcc_x86_64.h" + #endif + +-#if defined(__GNUC__) && defined(__ppc__) +-# include "src/asm_ppc.h" +-#endif +- + #if defined(MS_WINDOWS) && defined(_MSC_VER) + # include "src/asm_msvc.h" + #endif diff --git a/lang/pypy3/files/patch-pypy_module___cffi__backend_misc.py b/lang/pypy3/files/patch-pypy_module___cffi__backend_misc.py new file mode 100644 index 000000000000..7dd747682e45 --- /dev/null +++ b/lang/pypy3/files/patch-pypy_module___cffi__backend_misc.py @@ -0,0 +1,10 @@ +--- pypy/module/_cffi_backend/misc.py.orig 2016-06-14 07:46:04 UTC ++++ pypy/module/_cffi_backend/misc.py +@@ -253,6 +253,7 @@ _is_nonnull_longdouble = rffi.llexternal + sandboxsafe=True) + + # split here for JIT backends that don't support floats/longlongs/etc. ++@jit.dont_look_inside + def is_nonnull_longdouble(cdata): + return _is_nonnull_longdouble(read_raw_longdouble_data(cdata)) + def is_nonnull_float(cdata, size): diff --git a/lang/pypy3/files/patch-rpython_jit_backend_detect__cpu.py b/lang/pypy3/files/patch-rpython_jit_backend_detect__cpu.py new file mode 100644 index 000000000000..26dd2cb4238e --- /dev/null +++ b/lang/pypy3/files/patch-rpython_jit_backend_detect__cpu.py @@ -0,0 +1,10 @@ +--- rpython/jit/backend/detect_cpu.py.orig 2016-06-14 07:46:04 UTC ++++ rpython/jit/backend/detect_cpu.py +@@ -61,6 +61,7 @@ def detect_model_from_host_platform(): + 'i86pc': MODEL_X86, # Solaris/Intel + 'x86': MODEL_X86, # Apple + 'Power Macintosh': MODEL_PPC_64, ++ 'powerpc': MODEL_PPC_64, # freebsd + 'ppc64': MODEL_PPC_64, + 'ppc64le': MODEL_PPC_64, + 'x86_64': MODEL_X86, diff --git a/lang/pypy3/files/patch-rpython_translator_c_src_asm.c b/lang/pypy3/files/patch-rpython_translator_c_src_asm.c new file mode 100644 index 000000000000..50d2c7102882 --- /dev/null +++ b/lang/pypy3/files/patch-rpython_translator_c_src_asm.c @@ -0,0 +1,13 @@ +--- rpython/translator/c/src/asm.c.orig 2016-06-14 07:46:04 UTC ++++ rpython/translator/c/src/asm.c +@@ -8,10 +8,6 @@ + /* # include "src/asm_gcc_x86_64.c" */ + #endif + +-#if defined(__GNUC__) && defined(__ppc__) +-# include "src/asm_ppc.c" +-#endif +- + #if defined(_MSC_VER) + # include "src/asm_msvc.c" + #endif diff --git a/lang/pypy3/files/patch-rpython_translator_c_src_asm.h b/lang/pypy3/files/patch-rpython_translator_c_src_asm.h new file mode 100644 index 000000000000..352938fe7b2f --- /dev/null +++ b/lang/pypy3/files/patch-rpython_translator_c_src_asm.h @@ -0,0 +1,13 @@ +--- rpython/translator/c/src/asm.h.orig 2016-06-14 07:46:04 UTC ++++ rpython/translator/c/src/asm.h +@@ -10,10 +10,6 @@ + # include "src/asm_gcc_x86_64.h" + #endif + +-#if defined(__GNUC__) && defined(__ppc__) +-# include "src/asm_ppc.h" +-#endif +- + #if defined(MS_WINDOWS) && defined(_MSC_VER) + # include "src/asm_msvc.h" + #endif |