This is an archive of the discontinued LLVM Phabricator instance.

[openmp] [runtime] Disable KMP_HAVE_QUAD on NetBSD gcc
ClosedPublic

Authored by mgorny on Dec 8 2018, 10:26 AM.

Details

Summary

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'
...

Diff Detail

Repository
rL LLVM

Event Timeline

mgorny created this revision.Dec 8 2018, 10:26 AM

I propose to detect it based on _GLIBCXX_USE_FLOAT128 && __GLIBCXX__.

Is float128 in libc++ with GCC?

Hmm on the other hand, we enable _GLIBCXX_USE_FLOAT128 on NetBSD for i386/amd64.. however it doesn't work here. Can we add a feature detection?

Hmm on the other hand, we enable _GLIBCXX_USE_FLOAT128 on NetBSD for i386/amd64.. however it doesn't work here. Can we add a feature detection?

What should it detect? If using __float128 works?

Hmm on the other hand, we enable _GLIBCXX_USE_FLOAT128 on NetBSD for i386/amd64.. however it doesn't work here. Can we add a feature detection?

What should it detect? If using __float128 works?

Yes, and whether _Complex __float128 works in particular.

krytarowski accepted this revision.Dec 11 2018, 11:02 AM

After some more analysis, this is not trivial to check dynamically right now and unless there is support in the toolchain, we can get this patch as is and move on.

This revision is now accepted and ready to land.Dec 11 2018, 11:02 AM
This revision was automatically updated to reflect the committed changes.