| 1 |
AM_CPPFLAGS = -I $(top_srcdir) -I $(top_srcdir)/include |
| 2 |
|
| 3 |
# May be used by toolexeclibdir. |
| 4 |
gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) |
| 5 |
|
| 6 |
DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DCAN_SANITIZE_UB=0 |
| 7 |
AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros |
| 8 |
AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS) |
| 9 |
AM_CXXFLAGS += -std=gnu++17 |
| 10 |
AM_CXXFLAGS += $(EXTRA_CXXFLAGS) |
| 11 |
AM_CCASFLAGS = $(EXTRA_ASFLAGS) |
| 12 |
ACLOCAL_AMFLAGS = -I m4 |
| 13 |
|
| 14 |
toolexeclib_LTLIBRARIES = libtsan.la |
| 15 |
nodist_toolexeclib_HEADERS = libtsan_preinit.o |
| 16 |
|
| 17 |
tsan_files = \ |
| 18 |
tsan_debugging.cpp \ |
| 19 |
tsan_external.cpp \ |
| 20 |
tsan_fd.cpp \ |
| 21 |
tsan_flags.cpp \ |
| 22 |
tsan_ignoreset.cpp \ |
| 23 |
tsan_interceptors_posix.cpp \ |
| 24 |
tsan_interceptors_mac.cpp \ |
| 25 |
tsan_interceptors_memintrinsics.cpp \ |
| 26 |
tsan_interface_ann.cpp \ |
| 27 |
tsan_interface_atomic.cpp \ |
| 28 |
tsan_interface.cpp \ |
| 29 |
tsan_interface_java.cpp \ |
| 30 |
tsan_malloc_mac.cpp \ |
| 31 |
tsan_md5.cpp \ |
| 32 |
tsan_mman.cpp \ |
| 33 |
tsan_mutexset.cpp \ |
| 34 |
tsan_new_delete.cpp \ |
| 35 |
tsan_platform_linux.cpp \ |
| 36 |
tsan_platform_mac.cpp \ |
| 37 |
tsan_platform_posix.cpp \ |
| 38 |
tsan_platform_windows.cpp \ |
| 39 |
tsan_report.cpp \ |
| 40 |
tsan_rtl.cpp \ |
| 41 |
tsan_rtl_access.cpp \ |
| 42 |
tsan_rtl_mutex.cpp \ |
| 43 |
tsan_rtl_proc.cpp \ |
| 44 |
tsan_rtl_report.cpp \ |
| 45 |
tsan_rtl_thread.cpp \ |
| 46 |
tsan_stack_trace.cpp \ |
| 47 |
tsan_suppressions.cpp \ |
| 48 |
tsan_symbolize.cpp \ |
| 49 |
tsan_sync.cpp \ |
| 50 |
tsan_vector_clock.cpp |
| 51 |
|
| 52 |
libtsan_la_SOURCES = $(tsan_files) |
| 53 |
EXTRA_libtsan_la_SOURCES = tsan_rtl_amd64.S tsan_rtl_aarch64.S tsan_rtl_loongarch64.S tsan_rtl_mips64.S tsan_rtl_ppc64.S tsan_rtl_s390x.S tsan_rtl_riscv64.S |
| 54 |
libtsan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/interception/libinterception.la $(TSAN_TARGET_DEPENDENT_OBJECTS) |
| 55 |
libtsan_la_DEPENDENCIES = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/interception/libinterception.la $(TSAN_TARGET_DEPENDENT_OBJECTS) |
| 56 |
if LIBBACKTRACE_SUPPORTED |
| 57 |
libtsan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la |
| 58 |
libtsan_la_DEPENDENCIES +=$(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la |
| 59 |
endif |
| 60 |
libtsan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS) |
| 61 |
if ENABLE_DARWIN_AT_RPATH |
| 62 |
libtsan_darwin_rpath = -nodefaultrpaths -Wl,-rpath,@loader_path/ |
| 63 |
endif |
| 64 |
libtsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ |
| 65 |
$(link_libtsan) $(libtsan_darwin_rpath) |
| 66 |
|
| 67 |
libtsan_preinit.o: tsan_preinit.o |
| 68 |
cp $< $@ |
| 69 |
|
| 70 |
# Work around what appears to be a GNU make bug handling MAKEFLAGS |
| 71 |
# values defined in terms of make variables, as is the case for CC and |
| 72 |
# friends when we are called from the top level Makefile. |
| 73 |
AM_MAKEFLAGS = \ |
| 74 |
"AR_FLAGS=$(AR_FLAGS)" \ |
| 75 |
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \ |
| 76 |
"CFLAGS=$(CFLAGS)" \ |
| 77 |
"CXXFLAGS=$(CXXFLAGS)" \ |
| 78 |
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ |
| 79 |
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ |
| 80 |
"INSTALL=$(INSTALL)" \ |
| 81 |
"INSTALL_DATA=$(INSTALL_DATA)" \ |
| 82 |
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ |
| 83 |
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ |
| 84 |
"JC1FLAGS=$(JC1FLAGS)" \ |
| 85 |
"LDFLAGS=$(LDFLAGS)" \ |
| 86 |
"LIBCFLAGS=$(LIBCFLAGS)" \ |
| 87 |
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ |
| 88 |
"MAKE=$(MAKE)" \ |
| 89 |
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ |
| 90 |
"PICFLAG=$(PICFLAG)" \ |
| 91 |
"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ |
| 92 |
"SHELL=$(SHELL)" \ |
| 93 |
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \ |
| 94 |
"exec_prefix=$(exec_prefix)" \ |
| 95 |
"infodir=$(infodir)" \ |
| 96 |
"libdir=$(libdir)" \ |
| 97 |
"prefix=$(prefix)" \ |
| 98 |
"includedir=$(includedir)" \ |
| 99 |
"AR=$(AR)" \ |
| 100 |
"AS=$(AS)" \ |
| 101 |
"LD=$(LD)" \ |
| 102 |
"LIBCFLAGS=$(LIBCFLAGS)" \ |
| 103 |
"NM=$(NM)" \ |
| 104 |
"PICFLAG=$(PICFLAG)" \ |
| 105 |
"RANLIB=$(RANLIB)" \ |
| 106 |
"DESTDIR=$(DESTDIR)" |
| 107 |
|
| 108 |
MAKEOVERRIDES= |
| 109 |
|
| 110 |
## ################################################################ |
| 111 |
|