llvm-capstone/openmp/runtime/test
Dimitry Andric 956168c802 Ensure correct pthread flags and libraries are used
On most platforms, certain compiler and linker flags have to be passed
when using pthreads, otherwise linking against libomp.so might fail with
undefined references to several pthread functions.

Use CMake's `find_package(Threads)` to determine these for standalone
builds, or take them (and optionally modify them) from the top-level
LLVM cmake files.

Also, On FreeBSD, ensure that libomp.so is linked against libm.so,
similar to NetBSD.

Adjust test cases with hardcoded `-lpthread` flag to use the common
build flags, which should now have the required pthread flags.

Reviewers: emaste, jlpeyton, krytarowski, mgorny, protze.joachim, Hahnfeld

Reviewed By: Hahnfeld

Subscribers: AndreyChurbanov, tra, EricWF, Hahnfeld, jfb, jdoerfert, openmp-commits

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D59451

llvm-svn: 357618
2019-04-03 18:11:36 +00:00
..
affinity [OpenMP] Fix for nested proc_bind affinity bug 2019-01-15 19:39:32 +00:00
api [OpenMP] Add omp_pause_resource* API 2019-01-16 20:07:39 +00:00
atomic Remove trailing whitespace from tests 2016-05-17 21:08:52 +00:00
barrier omp_barrier.c test fixed in order to reliably and faster run on any number of processors 2016-01-25 16:52:10 +00:00
critical
env Fix implementation of OMP_THREAD_LIMIT 2017-07-27 20:58:41 +00:00
flush Fix for bugzilla https://bugs.llvm.org/show_bug.cgi?id=39970 2018-12-13 10:04:10 +00:00
lock Revert "Updating implementation of OMPT as specified in OpenMP 5.0 Preview 2 (TR6)" 2017-11-03 18:28:19 +00:00
master Remove trailing whitespace from tests 2016-05-17 21:08:52 +00:00
misc_bugs Ensure correct pthread flags and libraries are used 2019-04-03 18:11:36 +00:00
ompt Fix interoperability test compilation on FreeBSD 2019-03-25 18:37:49 +00:00
parallel [OpenMP 5.0] Add omp_get_supported_active_levels() 2019-02-19 18:51:11 +00:00
tasking Ensure correct pthread flags and libraries are used 2019-04-03 18:11:36 +00:00
threadprivate Remove trailing whitespace from tests 2016-05-17 21:08:52 +00:00
worksharing [OpenMP] Fixes for LIBOMP_OMP_VERSION=45/40 2018-12-15 09:23:39 +00:00
CMakeLists.txt [OpenMP] Fix check-openmp after r354553 2019-02-21 12:00:57 +00:00
lit.cfg [OPENMP] Deal with additional store inserted by Clang under -fno-PIC for PowerPC. 2019-03-01 21:16:45 +00:00
lit.site.cfg.in [OPENMP] Deal with additional store inserted by Clang under -fno-PIC for PowerPC. 2019-03-01 21:16:45 +00:00
omp_my_sleep.h
omp_testsuite.h Allow unit testing on Windows 2016-05-23 17:50:32 +00:00