Fix numpy breakage found by landry@ via macppc bulk build.

This commit is contained in:
daniel 2018-08-02 00:15:24 +00:00
parent 2f797b7f24
commit 4bcdc69496

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.50 2018/06/30 21:49:33 daniel Exp $
# $OpenBSD: Makefile,v 1.51 2018/08/02 00:15:24 daniel Exp $
BROKEN-alpha = numpy/linalg/umath_linalg.c.src:3231: internal compiler error: in extract_insn, at recog.c:2077
@ -7,11 +7,12 @@ COMMENT= fast array and numeric programming library for Python
MODPY_EGG_VERSION= 1.14.5
DISTNAME= numpy-${MODPY_EGG_VERSION}
PKGNAME= py-${DISTNAME}
REVISION= 0
EXTRACT_SUFX= .zip
CATEGORIES= math devel
HOMEPAGE= http://numpy.scipy.org/
HOMEPAGE= https://www.numpy.org/
MAINTAINER= Daniel Dickman <daniel@openbsd.org>
@ -39,6 +40,20 @@ BUILD_DEPENDS = ${MODFORTRAN_BUILD_DEPENDS}
LIB_DEPENDS= math/lapack \
${MODFORTRAN_LIB_DEPENDS}
# Cython 0.28.* uses __attribute__((optimize("Os"))) which
# leads to breakage at runtime on at least macppc.
# -- see: https://marc.info/?l=openbsd-ports&m=153312266209561&w=2
#
# gcc docs also explicitly say that the optimize attribute "is not suitable in production code".
# So let's disable to be safe.
# -- see: https://gcc.gnu.org/onlinedocs/gcc-8.2.0/gcc/Common-Function-Attributes.html
#
# Some related Cython issues:
# https://github.com/cython/cython/issues/2102
# https://github.com/cython/cython/issues/2235
# https://github.com/cython/cython/issues/2494
CFLAGS += -D CYTHON_SMALL_CODE=
pre-build:
cp -f ${WRKSRC}/numpy/distutils/site.cfg ${WRKSRC}/site.cfg