commit:     3b578343fd4bad730e2e0a331274cd5bba773e91
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 20 05:05:10 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jul 20 05:09:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b578343

dev-libs/pocl: add PPC64 support

No keyword yet as apparently virtual/opencl isn't keyworded on ppc64?

Closes: https://bugs.gentoo.org/831859
Thanks-to:  Chris Kerr <chris.kerr <AT> mykolab.ch>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/pocl/pocl-3.0.ebuild | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/dev-libs/pocl/pocl-3.0.ebuild b/dev-libs/pocl/pocl-3.0.ebuild
index 4845b2e15a71..629cf11a51ed 100644
--- a/dev-libs/pocl/pocl-3.0.ebuild
+++ b/dev-libs/pocl/pocl-3.0.ebuild
@@ -69,6 +69,18 @@ pkg_setup() {
 }
 
 src_configure() {
+       local host_cpu_variants="generic"
+
+       if use amd64 ; then
+               # Use pocl's curated list of CPU variants which should contain 
a good match for any given amd64 CPU
+               host_cpu_variants="distro"
+       elif use ppc64 ; then
+               # A selection of architectures in which new Altivec / VSX 
features were added
+               # This attempts to recreate the amd64 "distro" option for ppc64
+               # See discussion in bug #831859
+               host_cpu_variants="pwr10;pwr9;pwr8;pwr7;pwr6;g5;a2;generic"
+       fi
+
        local mycmakeargs=(
                -DENABLE_HSA=OFF
 
@@ -79,7 +91,7 @@ src_configure() {
                -DENABLE_IPO=$(usex lto)
 
                -DENABLE_POCL_BUILDING=ON
-               -DKERNELLIB_HOST_CPU_VARIANTS=distro
+               -DKERNELLIB_HOST_CPU_VARIANTS="${host_cpu_variants}"
 
                -DSTATIC_LLVM=OFF
                -DWITH_LLVM_CONFIG=$(get_llvm_prefix -d 
"${LLVM_MAX_SLOT}")/bin/llvm-config

Reply via email to