2019-08-15 14:13:10 +00:00
|
|
|
AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir) -isystem $(top_srcdir)/include/system
|
2014-01-09 19:15:41 +01:00
|
|
|
|
2012-11-15 16:00:47 +00:00
|
|
|
# May be used by toolexeclibdir.
|
2017-01-21 09:47:11 +01:00
|
|
|
gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
|
2012-11-15 16:00:47 +00:00
|
|
|
|
2015-04-13 08:59:55 +00:00
|
|
|
DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS @RPC_DEFS@
|
2013-11-18 08:03:16 +00:00
|
|
|
AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros
|
2012-12-11 13:32:11 -08:00
|
|
|
AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS)
|
2014-11-14 15:23:51 +01:00
|
|
|
AM_CXXFLAGS += -std=gnu++11
|
2017-11-17 22:34:50 +01:00
|
|
|
AM_CXXFLAGS += $(EXTRA_CXXFLAGS)
|
2014-01-09 19:13:39 +01:00
|
|
|
if LIBBACKTRACE_SUPPORTED
|
* sanitizer_common/sanitizer_symbolizer_libbacktrace.h
(LibbacktraceSymbolizer::Demangle): New declaration.
* sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
(POSIXSymbolizer::Demangle): Use libbacktrace_symbolizer_'s Demangle
method if possible.
* sanitizer_common/sanitizer_symbolizer_libbacktrace.cc: Include
"demangle.h" if SANITIZE_CP_DEMANGLE is defined.
(struct CplusV3DemangleData): New type.
(CplusV3DemangleCallback, CplusV3Demangle): New functions.
(SymbolizeCodePCInfoCallback, SymbolizeCodeCallback,
SymbolizeDataCallback): Use CplusV3Demangle.
* sanitizer_common/Makefile.am (AM_CXXFLAGS): Add
-DSANITIZE_CP_DEMANGLE and -I $(top_srcdir)/../include.
* libbacktrace/backtrace-rename.h (cplus_demangle_builtin_types,
cplus_demangle_fill_ctor, cplus_demangle_fill_dtor,
cplus_demangle_fill_extended_operator, cplus_demangle_fill_name,
cplus_demangle_init_info, cplus_demangle_mangled_name,
cplus_demangle_operators, cplus_demangle_print,
cplus_demangle_print_callback, cplus_demangle_type, cplus_demangle_v3,
cplus_demangle_v3_callback, is_gnu_v3_mangled_ctor,
is_gnu_v3_mangled_dtor, java_demangle_v3, java_demangle_v3_callback):
Define.
(__asan_internal_memcmp, __asan_internal_strncmp): New prototypes.
(memcmp, strncmp): Redefine.
* libbacktrace/Makefile.am (libsanitizer_libbacktrace_la_SOURCES): Add
../../libiberty/cp-demangle.c.
* libbacktrace/bridge.cc (__asan_internal_memcmp,
__asan_internal_strncmp): New functions.
* sanitizer_common/Makefile.in: Regenerated.
* libbacktrace/Makefile.in: Regenerated.
* configure: Regenerated.
* configure.ac: Regenerated.
* config.h.in: Regenerated.
From-SVN: r206477
2014-01-09 19:16:40 +01:00
|
|
|
AM_CXXFLAGS += -DSANITIZER_LIBBACKTRACE -DSANITIZER_CP_DEMANGLE \
|
|
|
|
-I $(top_srcdir)/../libbacktrace \
|
2014-01-09 19:13:39 +01:00
|
|
|
-I $(top_builddir)/libbacktrace \
|
* sanitizer_common/sanitizer_symbolizer_libbacktrace.h
(LibbacktraceSymbolizer::Demangle): New declaration.
* sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
(POSIXSymbolizer::Demangle): Use libbacktrace_symbolizer_'s Demangle
method if possible.
* sanitizer_common/sanitizer_symbolizer_libbacktrace.cc: Include
"demangle.h" if SANITIZE_CP_DEMANGLE is defined.
(struct CplusV3DemangleData): New type.
(CplusV3DemangleCallback, CplusV3Demangle): New functions.
(SymbolizeCodePCInfoCallback, SymbolizeCodeCallback,
SymbolizeDataCallback): Use CplusV3Demangle.
* sanitizer_common/Makefile.am (AM_CXXFLAGS): Add
-DSANITIZE_CP_DEMANGLE and -I $(top_srcdir)/../include.
* libbacktrace/backtrace-rename.h (cplus_demangle_builtin_types,
cplus_demangle_fill_ctor, cplus_demangle_fill_dtor,
cplus_demangle_fill_extended_operator, cplus_demangle_fill_name,
cplus_demangle_init_info, cplus_demangle_mangled_name,
cplus_demangle_operators, cplus_demangle_print,
cplus_demangle_print_callback, cplus_demangle_type, cplus_demangle_v3,
cplus_demangle_v3_callback, is_gnu_v3_mangled_ctor,
is_gnu_v3_mangled_dtor, java_demangle_v3, java_demangle_v3_callback):
Define.
(__asan_internal_memcmp, __asan_internal_strncmp): New prototypes.
(memcmp, strncmp): Redefine.
* libbacktrace/Makefile.am (libsanitizer_libbacktrace_la_SOURCES): Add
../../libiberty/cp-demangle.c.
* libbacktrace/bridge.cc (__asan_internal_memcmp,
__asan_internal_strncmp): New functions.
* sanitizer_common/Makefile.in: Regenerated.
* libbacktrace/Makefile.in: Regenerated.
* configure: Regenerated.
* configure.ac: Regenerated.
* config.h.in: Regenerated.
From-SVN: r206477
2014-01-09 19:16:40 +01:00
|
|
|
-I $(top_srcdir)/../include \
|
2014-01-09 19:13:39 +01:00
|
|
|
-include $(top_srcdir)/libbacktrace/backtrace-rename.h
|
|
|
|
endif
|
2017-11-17 22:34:50 +01:00
|
|
|
AM_CCASFLAGS = $(EXTRA_ASFLAGS)
|
2012-11-12 15:53:47 +00:00
|
|
|
ACLOCAL_AMFLAGS = -I m4
|
|
|
|
|
|
|
|
noinst_LTLIBRARIES = libsanitizer_common.la
|
|
|
|
|
|
|
|
sanitizer_common_files = \
|
2019-08-14 10:47:11 +02:00
|
|
|
sancov_flags.cpp \
|
|
|
|
sanitizer_allocator.cpp \
|
|
|
|
sanitizer_allocator_checks.cpp \
|
|
|
|
sanitizer_allocator_report.cpp \
|
|
|
|
sanitizer_common.cpp \
|
|
|
|
sanitizer_common_libcdep.cpp \
|
|
|
|
sanitizer_coverage_libcdep_new.cpp \
|
|
|
|
sanitizer_deadlock_detector1.cpp \
|
|
|
|
sanitizer_deadlock_detector2.cpp \
|
|
|
|
sanitizer_errno.cpp \
|
|
|
|
sanitizer_file.cpp \
|
|
|
|
sanitizer_flags.cpp \
|
|
|
|
sanitizer_flag_parser.cpp \
|
|
|
|
sanitizer_libc.cpp \
|
|
|
|
sanitizer_libignore.cpp \
|
|
|
|
sanitizer_linux.cpp \
|
|
|
|
sanitizer_linux_libcdep.cpp \
|
|
|
|
sanitizer_linux_s390.cpp \
|
|
|
|
sanitizer_mac.cpp \
|
|
|
|
sanitizer_mac_libcdep.cpp \
|
|
|
|
sanitizer_netbsd.cpp \
|
|
|
|
sanitizer_openbsd.cpp \
|
|
|
|
sanitizer_persistent_allocator.cpp \
|
|
|
|
sanitizer_platform_limits_linux.cpp \
|
|
|
|
sanitizer_platform_limits_openbsd.cpp \
|
|
|
|
sanitizer_platform_limits_posix.cpp \
|
|
|
|
sanitizer_platform_limits_solaris.cpp \
|
|
|
|
sanitizer_posix.cpp \
|
|
|
|
sanitizer_posix_libcdep.cpp \
|
|
|
|
sanitizer_printf.cpp \
|
|
|
|
sanitizer_procmaps_bsd.cpp \
|
|
|
|
sanitizer_procmaps_common.cpp \
|
|
|
|
sanitizer_procmaps_linux.cpp \
|
|
|
|
sanitizer_procmaps_mac.cpp \
|
|
|
|
sanitizer_procmaps_solaris.cpp \
|
|
|
|
sanitizer_rtems.cpp \
|
|
|
|
sanitizer_solaris.cpp \
|
|
|
|
sanitizer_stackdepot.cpp \
|
|
|
|
sanitizer_stacktrace.cpp \
|
|
|
|
sanitizer_stacktrace_libcdep.cpp \
|
|
|
|
sanitizer_stacktrace_sparc.cpp \
|
|
|
|
sanitizer_symbolizer_mac.cpp \
|
|
|
|
sanitizer_symbolizer_report.cpp \
|
|
|
|
sanitizer_stacktrace_printer.cpp \
|
|
|
|
sanitizer_stoptheworld_linux_libcdep.cpp \
|
|
|
|
sanitizer_stoptheworld_mac.cpp \
|
|
|
|
sanitizer_suppressions.cpp \
|
|
|
|
sanitizer_symbolizer.cpp \
|
|
|
|
sanitizer_symbolizer_libbacktrace.cpp \
|
|
|
|
sanitizer_symbolizer_libcdep.cpp \
|
|
|
|
sanitizer_symbolizer_posix_libcdep.cpp \
|
|
|
|
sanitizer_symbolizer_win.cpp \
|
|
|
|
sanitizer_termination.cpp \
|
|
|
|
sanitizer_thread_registry.cpp \
|
|
|
|
sanitizer_tls_get_addr.cpp \
|
|
|
|
sanitizer_unwind_linux_libcdep.cpp \
|
|
|
|
sanitizer_unwind_win.cpp \
|
|
|
|
sanitizer_win.cpp
|
2012-11-12 15:53:47 +00:00
|
|
|
|
2014-09-23 17:59:53 +00:00
|
|
|
|
2012-11-12 15:53:47 +00:00
|
|
|
libsanitizer_common_la_SOURCES = $(sanitizer_common_files)
|
2016-11-08 22:04:09 +00:00
|
|
|
libsanitizer_common_la_LIBADD = $(SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS)
|
|
|
|
libsanitizer_common_la_DEPENDENCIES = $(SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS)
|
2012-11-12 15:53:47 +00:00
|
|
|
|
2012-12-12 15:41:36 +00:00
|
|
|
# Work around what appears to be a GNU make bug handling MAKEFLAGS
|
|
|
|
# values defined in terms of make variables, as is the case for CC and
|
|
|
|
# friends when we are called from the top level Makefile.
|
|
|
|
AM_MAKEFLAGS = \
|
|
|
|
"AR_FLAGS=$(AR_FLAGS)" \
|
|
|
|
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
|
|
|
|
"CFLAGS=$(CFLAGS)" \
|
|
|
|
"CXXFLAGS=$(CXXFLAGS)" \
|
|
|
|
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
|
|
|
|
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
|
|
|
|
"INSTALL=$(INSTALL)" \
|
|
|
|
"INSTALL_DATA=$(INSTALL_DATA)" \
|
|
|
|
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
|
|
|
|
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
|
|
|
|
"JC1FLAGS=$(JC1FLAGS)" \
|
|
|
|
"LDFLAGS=$(LDFLAGS)" \
|
|
|
|
"LIBCFLAGS=$(LIBCFLAGS)" \
|
|
|
|
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
|
|
|
|
"MAKE=$(MAKE)" \
|
|
|
|
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
|
|
|
|
"PICFLAG=$(PICFLAG)" \
|
|
|
|
"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
|
|
|
|
"SHELL=$(SHELL)" \
|
|
|
|
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
|
|
|
|
"exec_prefix=$(exec_prefix)" \
|
|
|
|
"infodir=$(infodir)" \
|
|
|
|
"libdir=$(libdir)" \
|
|
|
|
"prefix=$(prefix)" \
|
|
|
|
"includedir=$(includedir)" \
|
|
|
|
"AR=$(AR)" \
|
|
|
|
"AS=$(AS)" \
|
|
|
|
"LD=$(LD)" \
|
|
|
|
"LIBCFLAGS=$(LIBCFLAGS)" \
|
|
|
|
"NM=$(NM)" \
|
|
|
|
"PICFLAG=$(PICFLAG)" \
|
|
|
|
"RANLIB=$(RANLIB)" \
|
|
|
|
"DESTDIR=$(DESTDIR)"
|
|
|
|
|
2012-12-12 14:36:27 +00:00
|
|
|
MAKEOVERRIDES=
|
|
|
|
|
2012-11-12 15:53:47 +00:00
|
|
|
## ################################################################
|
|
|
|
|