2 .include <bsd.compiler.mk>
6 OMPSRC= ${SRCTOP}/contrib/llvm-project/openmp/runtime/src
7 ITTSRC= ${OMPSRC}/thirdparty/ittnotify
11 SRCS+= ittnotify_static.cpp
12 SRCS+= kmp_affinity.cpp
15 SRCS+= kmp_barrier.cpp
17 SRCS+= kmp_csupport.cpp
19 SRCS+= kmp_dispatch.cpp
20 SRCS+= kmp_environment.cpp
22 SRCS+= kmp_ftn_cdecl.cpp
23 SRCS+= kmp_ftn_extra.cpp
25 SRCS+= kmp_gsupport.cpp
30 SRCS+= kmp_runtime.cpp
32 SRCS+= kmp_settings.cpp
34 SRCS+= kmp_taskdeps.cpp
35 SRCS+= kmp_tasking.cpp
36 SRCS+= kmp_threadprivate.cpp
37 SRCS+= kmp_utility.cpp
38 SRCS+= kmp_version.cpp
39 SRCS+= kmp_wait_release.cpp
40 SRCS+= ompt-general.cpp
42 SRCS+= z_Linux_util.cpp
47 CFLAGS+= -D__STDC_CONSTANT_MACROS
48 CFLAGS+= -D__STDC_FORMAT_MACROS
49 CFLAGS+= -D__STDC_LIMIT_MACROS
53 CFLAGS+= -ffunction-sections
54 CFLAGS+= -fdata-sections
55 CXXFLAGS+= -fvisibility-inlines-hidden
56 CXXFLAGS+= -fno-exceptions
60 .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 90000
61 # When targeting i386, clang 9.0.0 produces a new warning about large atomic
62 # operations "possibly incurring significant performance penalties", but there
63 # is not much we can do about it.
64 CWARNFLAGS+= -Wno-atomic-alignment
67 LDFLAGS+= -Wl,--warn-shared-textrel
68 LDFLAGS+= -Wl,--gc-sections
69 LDFLAGS+= -Wl,-z,noexecstack
70 LDFLAGS+= -Wl,-fini=__kmp_internal_end_fini
71 LDFLAGS+= -Wl,-soname,libomp.so
73 VERSION_MAP= ${OMPSRC}/exports_so.txt
78 SYMLINKS+= ${SHLIB_NAME} ${LIBDIR}/libgomp.so