1 2.include <bsd.compiler.mk> 3 4SHLIB_NAME= libomp.so 5 6OMPSRC= ${SRCTOP}/contrib/llvm-project/openmp/runtime/src 7ITTSRC= ${OMPSRC}/thirdparty/ittnotify 8.PATH: ${OMPSRC} 9.PATH: ${ITTSRC} 10 11SRCS+= ittnotify_static.cpp 12SRCS+= kmp_affinity.cpp 13SRCS+= kmp_alloc.cpp 14SRCS+= kmp_atomic.cpp 15SRCS+= kmp_barrier.cpp 16SRCS+= kmp_cancel.cpp 17SRCS+= kmp_csupport.cpp 18SRCS+= kmp_debug.cpp 19SRCS+= kmp_dispatch.cpp 20SRCS+= kmp_environment.cpp 21SRCS+= kmp_error.cpp 22SRCS+= kmp_ftn_cdecl.cpp 23SRCS+= kmp_ftn_extra.cpp 24SRCS+= kmp_global.cpp 25SRCS+= kmp_gsupport.cpp 26SRCS+= kmp_i18n.cpp 27SRCS+= kmp_io.cpp 28SRCS+= kmp_itt.cpp 29SRCS+= kmp_lock.cpp 30SRCS+= kmp_runtime.cpp 31SRCS+= kmp_sched.cpp 32SRCS+= kmp_settings.cpp 33SRCS+= kmp_str.cpp 34SRCS+= kmp_taskdeps.cpp 35SRCS+= kmp_tasking.cpp 36SRCS+= kmp_threadprivate.cpp 37SRCS+= kmp_utility.cpp 38SRCS+= kmp_version.cpp 39SRCS+= kmp_wait_release.cpp 40SRCS+= ompt-general.cpp 41SRCS+= z_Linux_asm.S 42SRCS+= z_Linux_util.cpp 43INCS+= omp.h 44 45WARNS?= 1 46 47CFLAGS+= -D__STDC_CONSTANT_MACROS 48CFLAGS+= -D__STDC_FORMAT_MACROS 49CFLAGS+= -D__STDC_LIMIT_MACROS 50CFLAGS+= -I${.CURDIR} 51CFLAGS+= -I${OMPSRC} 52CFLAGS+= -I${ITTSRC} 53CFLAGS+= -ffunction-sections 54CFLAGS+= -fdata-sections 55CXXFLAGS+= -fvisibility-inlines-hidden 56CXXFLAGS+= -fno-exceptions 57CXXFLAGS+= -fno-rtti 58CXXSTD= c++17 59 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. 65CWARNFLAGS+= -Wno-atomic-alignment 66.endif 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 70# can do about it. 71CWARNFLAGS+= -Wno-sync-alignment 72.endif 73.endif 74 75LDFLAGS+= -Wl,--warn-shared-textrel 76LDFLAGS+= -Wl,--gc-sections 77LDFLAGS+= -Wl,-z,noexecstack 78LDFLAGS+= -Wl,-fini=__kmp_internal_end_fini 79LDFLAGS+= -Wl,-soname,libomp.so 80 81VERSION_MAP= ${OMPSRC}/exports_so.txt 82 83LIBADD+= pthread 84LIBADD+= m 85 86SYMLINKS+= ${SHLIB_NAME} ${LIBDIR}/libgomp.so 87 88.include <bsd.lib.mk> 89