svn commit: r563073 - head/science/cgribex/files
Piotr Kubaj
pkubaj at FreeBSD.org
Wed Jan 27 13:16:17 UTC 2021
Author: pkubaj
Date: Wed Jan 27 13:16:16 2021
New Revision: 563073
URL: https://svnweb.freebsd.org/changeset/ports/563073
Log:
science/cgribex: fix build on powerpc64le, powerpc64 with CPUTYPE=power6 and newer with Clang
Clang doesn't have __fsel function.
Taken from https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config/rs6000/ppu_intrinsics.h;h=e17faae05932e33c22697a3178b26314b88c9a31;hb=HEAD#l530
Added:
head/science/cgribex/files/
head/science/cgribex/files/patch-src_minmax__val.c (contents, props changed)
Added: head/science/cgribex/files/patch-src_minmax__val.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/science/cgribex/files/patch-src_minmax__val.c Wed Jan 27 13:16:16 2021 (r563073)
@@ -0,0 +1,22 @@
+--- src/minmax_val.c.orig 2021-01-26 13:07:53 UTC
++++ src/minmax_val.c
+@@ -292,6 +291,19 @@ void sse2_minmax_val_double(const double *restrict buf
+ #endif // SIMD
+
+ #if defined(_ARCH_PWR6)
++
++#ifndef __fsel
++static __inline__ double __fsel(double x, double y, double z)
++ __attribute__((always_inline));
++static __inline__ double
++__fsel(double x, double y, double z)
++{
++ double r;
++ __asm__("fsel %0,%1,%2,%3" : "=d"(r) : "d"(x),"d"(y),"d"(z));
++ return r;
++}
++#endif
++
+ static
+ void pwr6_minmax_val_double_unrolled6(const double *restrict data, size_t datasize, double *fmin, double *fmax)
+ {
More information about the svn-ports-all
mailing list