From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 450C51396D9 for ; Sun, 22 Oct 2017 09:34:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 54CE8E090A; Sun, 22 Oct 2017 09:34:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 31D3BE090A for ; Sun, 22 Oct 2017 09:34:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B2B7C33BE18 for ; Sun, 22 Oct 2017 09:34:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 29E3D316 for ; Sun, 22 Oct 2017 09:34:13 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1508664844.fc0ba0fc7c93d56aeb421fbb8154fd57e7695623.grobian@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pyblake2/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/pyblake2/pyblake2-0.9.3.ebuild X-VCS-Directories: dev-python/pyblake2/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: fc0ba0fc7c93d56aeb421fbb8154fd57e7695623 X-VCS-Branch: master Date: Sun, 22 Oct 2017 09:34:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 8aecb7a4-eb01-4c89-acf2-bdf0881ddbbc X-Archives-Hash: 178d4c374dd0b6029af30e77c799c22b commit: fc0ba0fc7c93d56aeb421fbb8154fd57e7695623 Author: Fabian Groffen gentoo org> AuthorDate: Sun Oct 22 09:32:51 2017 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sun Oct 22 09:34:04 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc0ba0fc dev-python/pyblake2: fix and keyword for *-macos, bug #634936 Package-Manager: Portage-2.3.11-prefix, Repoman-2.3.3 dev-python/pyblake2/pyblake2-0.9.3.ebuild | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/dev-python/pyblake2/pyblake2-0.9.3.ebuild b/dev-python/pyblake2/pyblake2-0.9.3.ebuild index 10da95058c1..cdfe223ded1 100644 --- a/dev-python/pyblake2/pyblake2-0.9.3.ebuild +++ b/dev-python/pyblake2/pyblake2-0.9.3.ebuild @@ -4,7 +4,7 @@ EAPI=6 PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} pypy ) -inherit distutils-r1 +inherit distutils-r1 flag-o-matic DESCRIPTION="BLAKE2 hash function extension module" HOMEPAGE="https://github.com/dchest/pyblake2 https://pypi.python.org/pypi/pyblake2" @@ -12,7 +12,7 @@ SRC_URI="mirror://pypi/${PN::1}/${PN}/${P}.tar.gz" LICENSE="CC0-1.0" SLOT="0" -KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~x86 ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~x86 ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" IUSE="cpu_flags_x86_ssse3 cpu_flags_x86_avx cpu_flags_x86_xop" python_prepare_all() { @@ -26,6 +26,27 @@ python_prepare_all() { # uncomment the implementation of choice sed -i -e "/BLAKE2_COMPRESS_${impl}/s:^#::" setup.py || die + # avoid segfault due to over(?) optimisation + if [[ ${CHOST} == *86*-darwin* ]] ; then + local march=$(get-flag march) + # expand "native" into the used cpu optmisation + if [[ ${march} == native ]] ; then + # we're always on Clang here + march=$(llc --version | grep "Host CPU:") + march=${march##*: } + fi + # compiling for haswell cpu results in a segfault when used + # with optimisation >O1, since optimisation here benefits more + # than cpu specific instructions, reduce to ivybridge level + case ${march} in + haswell|broadwell|skylake*) + local opt=$(get-flag -O) + [[ ${opt#-O} -gt 1 ]] && \ + replace-flags -march=* -march=ivybridge + ;; + esac + fi + distutils-r1_python_prepare_all }