llvm-project/openmp/runtime/test/tasking
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
..
bug_36720.c [test] Convert test for PR36720 to c89 2018-08-01 06:26:55 +00:00
bug_nested_proxy_task.c Ensure correct pthread flags and libraries are used 2019-04-03 18:11:36 +00:00
bug_proxy_task_dep_waiting.c Ensure correct pthread flags and libraries are used 2019-04-03 18:11:36 +00:00
bug_serial_taskgroup.c kmp_gsupport: Fix library initialization with taskgroup 2016-08-08 13:23:08 +00:00
kmp_task_reduction_nest.cpp [OpenMP] Fixes for LIBOMP_OMP_VERSION=45/40 2018-12-15 09:23:39 +00:00
kmp_taskloop.c [OpenMP] Fixes for LIBOMP_OMP_VERSION=45/40 2018-12-15 09:23:39 +00:00
nested_parallel_tasking.c
nested_task_creation.c Add test case for nested creation of tasks 2016-08-04 14:55:56 +00:00
omp50_task_depend_mtx.c Implementation of OpenMP 5.0 mutexinoutset task dependency type. 2018-11-07 12:19:57 +00:00
omp50_task_depend_mtx2.c Implementation of OpenMP 5.0 mutexinoutset task dependency type. 2018-11-07 12:19:57 +00:00
omp_task.c Fix for bugzilla https://bugs.llvm.org/show_bug.cgi?id=39970 2018-12-13 10:04:10 +00:00
omp_task_final.c
omp_task_firstprivate.c
omp_task_if.c
omp_task_imp_firstprivate.c
omp_task_priority.c [OpenMP] Fixes for LIBOMP_OMP_VERSION=45/40 2018-12-15 09:23:39 +00:00
omp_task_private.c
omp_task_shared.c
omp_taskloop_grainsize.c [OpenMP] Fixes for LIBOMP_OMP_VERSION=45/40 2018-12-15 09:23:39 +00:00
omp_taskloop_num_tasks.c [OpenMP] Fixes for LIBOMP_OMP_VERSION=45/40 2018-12-15 09:23:39 +00:00
omp_taskwait.c
omp_taskyield.c Fix for bugzilla https://bugs.llvm.org/show_bug.cgi?id=39970 2018-12-13 10:04:10 +00:00