Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Feb 2021 16:42:28 +0000 (UTC)
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r565415 - head/science/cdo/files
Message-ID:  <202102161642.11GGgSRf055161@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pkubaj
Date: Tue Feb 16 16:42:28 2021
New Revision: 565415
URL: https://svnweb.freebsd.org/changeset/ports/565415

Log:
  science/cdo: 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/cdo/files/patch-libcdi_src_cgribexlib.c   (contents, props changed)

Added: head/science/cdo/files/patch-libcdi_src_cgribexlib.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/cdo/files/patch-libcdi_src_cgribexlib.c	Tue Feb 16 16:42:28 2021	(r565415)
@@ -0,0 +1,31 @@
+--- libcdi/src/cgribexlib.c.orig	2021-02-16 14:56:42 UTC
++++ libcdi/src/cgribexlib.c
+@@ -10,7 +10,7 @@
+ #pragma GCC diagnostic warning "-Wstrict-overflow"
+ #endif
+ 
+-#ifdef _ARCH_PWR6
++#if defined(_ARCH_PWR6) && defined(__GLIBC__)
+ #pragma options nostrict
+ #include <ppu_intrinsics.h>
+ #endif
+@@ -726,6 +726,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)
+ {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102161642.11GGgSRf055161>