Add libstdc++-raw-cxx.m4 and use it in libsanitizer
[gcc.git] / libsanitizer / asan / Makefile.am
1 AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir)
2
3 # May be used by toolexeclibdir.
4 gcc_version := $(shell cat $(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 -DASAN_HAS_EXCEPTIONS=1 -DASAN_FLEXIBLE_MAPPING_AND_OFFSET=0 -DASAN_NEEDS_SEGV=1
7 if USING_MAC_INTERPOSE
8 DEFS += -DMAC_INTERPOSE_FUNCTIONS -DMISSING_BLOCKS_SUPPORT
9 endif
10 AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros -Wno-c99-extensions
11 AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS)
12 ACLOCAL_AMFLAGS = -I $(top_srcdir) -I $(top_srcdir)/config
13
14 toolexeclib_LTLIBRARIES = libasan.la
15
16 asan_files = \
17 asan_allocator.cc \
18 asan_interceptors.cc \
19 asan_mac.cc \
20 asan_malloc_mac.cc \
21 asan_new_delete.cc \
22 asan_posix.cc \
23 asan_rtl.cc \
24 asan_stats.cc \
25 asan_thread_registry.cc \
26 asan_globals.cc \
27 asan_linux.cc \
28 asan_malloc_linux.cc \
29 asan_malloc_win.cc \
30 asan_poisoning.cc \
31 asan_report.cc \
32 asan_stack.cc \
33 asan_thread.cc \
34 asan_win.cc
35
36 libasan_la_SOURCES = $(asan_files)
37 if USING_MAC_INTERPOSE
38 libasan_la_SOURCES += dynamic/asan_interceptors_dynamic.cc
39 libasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/../libstdc++-v3/src/libstdc++.la
40 else
41 libasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/interception/libinterception.la $(top_builddir)/../libstdc++-v3/src/libstdc++.la
42 endif
43
44 libasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lpthread -ldl
45
46 # Work around what appears to be a GNU make bug handling MAKEFLAGS
47 # values defined in terms of make variables, as is the case for CC and
48 # friends when we are called from the top level Makefile.
49 AM_MAKEFLAGS = \
50 "AR_FLAGS=$(AR_FLAGS)" \
51 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
52 "CFLAGS=$(CFLAGS)" \
53 "CXXFLAGS=$(CXXFLAGS)" \
54 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
55 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
56 "INSTALL=$(INSTALL)" \
57 "INSTALL_DATA=$(INSTALL_DATA)" \
58 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
59 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
60 "JC1FLAGS=$(JC1FLAGS)" \
61 "LDFLAGS=$(LDFLAGS)" \
62 "LIBCFLAGS=$(LIBCFLAGS)" \
63 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
64 "MAKE=$(MAKE)" \
65 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
66 "PICFLAG=$(PICFLAG)" \
67 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
68 "SHELL=$(SHELL)" \
69 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
70 "exec_prefix=$(exec_prefix)" \
71 "infodir=$(infodir)" \
72 "libdir=$(libdir)" \
73 "prefix=$(prefix)" \
74 "includedir=$(includedir)" \
75 "AR=$(AR)" \
76 "AS=$(AS)" \
77 "LD=$(LD)" \
78 "LIBCFLAGS=$(LIBCFLAGS)" \
79 "NM=$(NM)" \
80 "PICFLAG=$(PICFLAG)" \
81 "RANLIB=$(RANLIB)" \
82 "DESTDIR=$(DESTDIR)"
83
84 MAKEOVERRIDES=
85
86 ## ################################################################
87