Add DragonFlyBSD support to OpenMP
authorKamil Rytarowski <n54@gmx.com>
Sun, 9 Dec 2018 16:40:33 +0000 (16:40 +0000)
committerKamil Rytarowski <n54@gmx.com>
Sun, 9 Dec 2018 16:40:33 +0000 (16:40 +0000)
commita56ac949ec7302a116591f1e07443d9e739c6a9d
tree56bcba91e51752f60bad5e2ab1b5cf664b70d46b
parentb961661977f83e23e8fe385ad0b3222f5dc3d165
Add DragonFlyBSD support to OpenMP

Summary:
Additions mostly follow FreeBSD and NetBSD and are not intrusive.
There is similar patch for OpenBSD: https://reviews.llvm.org/D34280

The -lm was being omitted due to -Wl,--as-needed in cmake rule, similar patch is in freebsd-ports/devel/llvm-devel port.

Simple OpenMP programs compile and work as expected:
$ clang-devel ~/omp_hello.c -fopenmp -I/usr/local/llvm-devel/include
$ LD_LIBRARY_PATH=/usr/local/llvm-devel/lib OMP_NUM_THREADS=100 ./a.out

The assertion in LLVMgold.so when -fopenmp was used together with -flto in 20170524 snapshot is no longer triggered on current svn-trunk and works fine as in llvm-4.0 with our local patches.

Reviewers: #openmp, krytarowski

Reviewed By: krytarowski

Subscribers: dexonsmith, jfb, krytarowski, guansong, gregrodgers, emaste, mgorny, mehdi_amini

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

llvm-svn: 348725
openmp/runtime/cmake/LibompHandleFlags.cmake
openmp/runtime/cmake/LibompMicroTests.cmake
openmp/runtime/src/kmp.h
openmp/runtime/src/kmp_ftn_entry.h
openmp/runtime/src/kmp_platform.h
openmp/runtime/src/kmp_runtime.cpp
openmp/runtime/src/kmp_wrapper_malloc.h
openmp/runtime/src/z_Linux_util.cpp