]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libomp/Makefile
Merge llvm-project release/17.x llvmorg-17.0.2-0-gb2417f51dbbd
[FreeBSD/FreeBSD.git] / lib / libomp / Makefile
1
2 .include <bsd.compiler.mk>
3
4 SHLIB_NAME=     libomp.so
5
6 OMPSRC=         ${SRCTOP}/contrib/llvm-project/openmp/runtime/src
7 ITTSRC=         ${OMPSRC}/thirdparty/ittnotify
8 .PATH:          ${OMPSRC}
9 .PATH:          ${ITTSRC}
10
11 SRCS+=          ittnotify_static.cpp
12 SRCS+=          kmp_affinity.cpp
13 SRCS+=          kmp_alloc.cpp
14 SRCS+=          kmp_atomic.cpp
15 SRCS+=          kmp_barrier.cpp
16 SRCS+=          kmp_cancel.cpp
17 SRCS+=          kmp_csupport.cpp
18 SRCS+=          kmp_debug.cpp
19 SRCS+=          kmp_dispatch.cpp
20 SRCS+=          kmp_environment.cpp
21 SRCS+=          kmp_error.cpp
22 SRCS+=          kmp_ftn_cdecl.cpp
23 SRCS+=          kmp_ftn_extra.cpp
24 SRCS+=          kmp_global.cpp
25 SRCS+=          kmp_gsupport.cpp
26 SRCS+=          kmp_i18n.cpp
27 SRCS+=          kmp_io.cpp
28 SRCS+=          kmp_itt.cpp
29 SRCS+=          kmp_lock.cpp
30 SRCS+=          kmp_runtime.cpp
31 SRCS+=          kmp_sched.cpp
32 SRCS+=          kmp_settings.cpp
33 SRCS+=          kmp_str.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
41 SRCS+=          z_Linux_asm.S
42 SRCS+=          z_Linux_util.cpp
43 INCS+=          omp.h
44
45 WARNS?=         1
46
47 CFLAGS+=        -D__STDC_CONSTANT_MACROS
48 CFLAGS+=        -D__STDC_FORMAT_MACROS
49 CFLAGS+=        -D__STDC_LIMIT_MACROS
50 CFLAGS+=        -I${.CURDIR}
51 CFLAGS+=        -I${OMPSRC}
52 CFLAGS+=        -I${ITTSRC}
53 CFLAGS+=        -ffunction-sections
54 CFLAGS+=        -fdata-sections
55 CXXFLAGS+=      -fvisibility-inlines-hidden
56 CXXFLAGS+=      -fno-exceptions
57 CXXFLAGS+=      -fno-rtti
58 CXXSTD=         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.
65 CWARNFLAGS+=    -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.
71 CWARNFLAGS+=    -Wno-sync-alignment
72 .endif
73 .endif
74
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
80
81 VERSION_MAP=    ${OMPSRC}/exports_so.txt
82
83 LIBADD+=        pthread
84 LIBADD+=        m
85
86 SYMLINKS+=      ${SHLIB_NAME} ${LIBDIR}/libgomp.so
87
88 .include <bsd.lib.mk>