Permalink
Browse files

[runtime] Disable KMP_HAVE_QUAD on NetBSD gcc

Disable KMP_HAVE_QUAD when building via gcc on NetBSD system,
as the build fails due to unimplemented builtins:

  .../kmp_atomic.cpp.o: In function `__kmpc_atomic_cmplx16_mul':
  .../kmp_atomic.cpp:1332: undefined reference to `__multc3'
  .../kmp_atomic.cpp.o: In function `__kmpc_atomic_cmplx16_div':
  .../kmp_atomic.cpp:1334: undefined reference to `__divtc3'
  ...

Differential Revision: https://reviews.llvm.org/D55478
  • Loading branch information...
mgorny committed Dec 11, 2018
1 parent 5667f50 commit 201a345010980c5e178b04048281d118e698a5f5
Showing with 3 additions and 0 deletions.
  1. +3 −0 openmp/runtime/src/kmp_os.h
@@ -86,9 +86,12 @@
128-bit extended precision type yet */
typedef long double _Quad;
#elif KMP_COMPILER_GCC
/* GCC on NetBSD lacks __multc3/__divtc3 builtins needed for quad */
#if !KMP_OS_NETBSD
typedef __float128 _Quad;
#undef KMP_HAVE_QUAD
#define KMP_HAVE_QUAD 1
#endif
#elif KMP_COMPILER_MSVC
typedef long double _Quad;
#endif

0 comments on commit 201a345

Please sign in to comment.