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 AF01D138239 for ; Mon, 22 Mar 2021 08:59:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 12E5DE083B; Mon, 22 Mar 2021 08:59:16 +0000 (UTC) Received: from smtp.gentoo.org (mail.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 EE211E083B for ; Mon, 22 Mar 2021 08:59:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 8DAB633BEC2 for ; Mon, 22 Mar 2021 08:59:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 85CD35FC for ; Mon, 22 Mar 2021 08:59:11 +0000 (UTC) From: "Lars Wendler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" Message-ID: <1616403465.45b09e06d88073cbb2a59b2dcadc7b5139000285.polynomial-c@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/zlib-ng/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/zlib-ng/zlib-ng-2.0.1-r1.ebuild X-VCS-Directories: sys-libs/zlib-ng/ X-VCS-Committer: polynomial-c X-VCS-Committer-Name: Lars Wendler X-VCS-Revision: 45b09e06d88073cbb2a59b2dcadc7b5139000285 X-VCS-Branch: master Date: Mon, 22 Mar 2021 08:59:11 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a875e7c0-65b1-4aca-a137-3f66b358fe4c X-Archives-Hash: 659232cbfa62324082ed0701e9eb2c31 commit: 45b09e06d88073cbb2a59b2dcadc7b5139000285 Author: Sam James gentoo org> AuthorDate: Wed Mar 17 23:39:36 2021 +0000 Commit: Lars Wendler gentoo org> CommitDate: Mon Mar 22 08:57:45 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45b09e06 sys-libs/zlib-ng: add preliminary intrinics Adds support various intrinsics for amd64, arm{,64}, ppc{,64}, x86. Signed-off-by: Sam James gentoo.org> Signed-off-by: Lars Wendler gentoo.org> sys-libs/zlib-ng/zlib-ng-2.0.1-r1.ebuild | 34 +++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/sys-libs/zlib-ng/zlib-ng-2.0.1-r1.ebuild b/sys-libs/zlib-ng/zlib-ng-2.0.1-r1.ebuild index 5fd01079542..c00074bbf78 100644 --- a/sys-libs/zlib-ng/zlib-ng-2.0.1-r1.ebuild +++ b/sys-libs/zlib-ng/zlib-ng-2.0.1-r1.ebuild @@ -12,7 +12,9 @@ SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" LICENSE="ZLIB" SLOT="0" #KEYWORDS="~amd64 ~x86" -IUSE="compat test" + +CPU_USE=( cpu_flags_{x86_{avx2,sse2,ssse3,sse4a,pclmul},arm_{crc32,neon},ppc_vsx2} ) +IUSE="compat ${CPU_USE[@]} test" RESTRICT="!test? ( test )" @@ -33,5 +35,35 @@ src_configure() { # https://github.com/gentoo/gentoo/pull/17167 -DWITH_UNALIGNED="OFF" ) + + # The intrinsics options are all defined conditionally, so we need + # to enable them on/off per-arch here for now. + if use amd64 || use x86 ; then + mycmakeargs+=( + -DWITH_AVX2=$(usex cpu_flags_x86_avx2) + -DWITH_SSE2=$(usex cpu_flags_x86_sse2) + -DWITH_SSSE3=$(usex cpu_flags_x86_ssse3) + -DWITH_SSE4=$(usex cpu_flags_x86_sse4a) + -DWITH_PCLMULQDQ=$(usex cpu_flags_x86_pclmul) + ) + fi + + if use arm || use arm64 ; then + mycmakeargs+=( + -DWITH_ACLE=$(usex cpu_flags_arm_crc32) + -DWITH_NEON=$(usex cpu_flags_arm_neon) + ) + fi + + if use ppc || use ppc64 ; then + # The POWER8 support is VSX which was introduced + # VSX2 was introduced with POWER8, so use that as a proxy for it + mycmakeargs+=( + -DWITH_POWER8=$(usex cpu_flags_ppc_vsx2) + ) + fi + + # TODO: There's no s390x USE_EXPAND yet + cmake_src_configure }