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" && ${MACHINE_CPUARCH} == "i386"
61 .if ${COMPILER_VERSION} >= 90000
62 # When targeting i386, clang 9.0.0 produces a new warning about large atomic
63 # operations "possibly incurring significant performance penalties", but there
64 # is not much we can do about it.
65 CWARNFLAGS+= -Wno-atomic-alignment
67 .if ${COMPILER_VERSION} >= 170000
68 # When targeting i386, clang 17.0.0 produces a new warning that __sync
69 # builtin operations must have natural alignment, but there is not much we
71 CWARNFLAGS+= -Wno-sync-alignment
75 LDFLAGS+= -Wl,--warn-shared-textrel
76 LDFLAGS+= -Wl,--gc-sections
77 LDFLAGS+= -Wl,-z,noexecstack
78 LDFLAGS+= -Wl,-fini=__kmp_internal_end_fini
79 LDFLAGS+= -Wl,-soname,libomp.so
81 VERSION_MAP= ${OMPSRC}/exports_so.txt
86 SYMLINKS+= ${SHLIB_NAME} ${LIBDIR}/libgomp.so