1AM_CPPFLAGS = -I $(top_srcdir) -I $(top_srcdir)/include 2 3# May be used by toolexeclibdir. 4gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) 5 6DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DPIC -DCAN_SANITIZE_UB=1 -DUBSAN_CAN_USE_CXXABI=1 7AM_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 8AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS) 9AM_CXXFLAGS += -std=gnu++11 10AM_CXXFLAGS += $(EXTRA_CXXFLAGS) 11ACLOCAL_AMFLAGS = -I m4 12 13toolexeclib_LTLIBRARIES = libubsan.la 14 15ubsan_plugin_files = \ 16 ubsan_diag.cpp \ 17 ubsan_flags.cpp \ 18 ubsan_handlers.cpp \ 19 ubsan_handlers_cxx.cpp \ 20 ubsan_init.cpp \ 21 ubsan_monitor.cpp \ 22 ubsan_type_hash.cpp \ 23 ubsan_type_hash_itanium.cpp \ 24 ubsan_type_hash_win.cpp \ 25 ubsan_value.cpp 26 27ubsan_files = $(ubsan_plugin_files) 28 29libubsan_la_SOURCES = $(ubsan_files) 30libubsan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la 31if !USING_MAC_INTERPOSE 32libubsan_la_LIBADD += $(top_builddir)/interception/libinterception.la 33endif 34if LIBBACKTRACE_SUPPORTED 35libubsan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la 36endif 37libubsan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS) 38libubsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libubsan) 39 40# Use special rules for files that require RTTI support. 41ubsan_handlers_cxx.% ubsan_type_hash.% ubsan_type_hash_itanium.% : AM_CXXFLAGS += -frtti 42 43# Work around what appears to be a GNU make bug handling MAKEFLAGS 44# values defined in terms of make variables, as is the case for CC and 45# friends when we are called from the top level Makefile. 46AM_MAKEFLAGS = \ 47 "AR_FLAGS=$(AR_FLAGS)" \ 48 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ 49 "CFLAGS=$(CFLAGS)" \ 50 "CXXFLAGS=$(CXXFLAGS)" \ 51 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ 52 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ 53 "INSTALL=$(INSTALL)" \ 54 "INSTALL_DATA=$(INSTALL_DATA)" \ 55 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ 56 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ 57 "JC1FLAGS=$(JC1FLAGS)" \ 58 "LDFLAGS=$(LDFLAGS)" \ 59 "LIBCFLAGS=$(LIBCFLAGS)" \ 60 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ 61 "MAKE=$(MAKE)" \ 62 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ 63 "PICFLAG=$(PICFLAG)" \ 64 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ 65 "SHELL=$(SHELL)" \ 66 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ 67 "exec_prefix=$(exec_prefix)" \ 68 "infodir=$(infodir)" \ 69 "libdir=$(libdir)" \ 70 "prefix=$(prefix)" \ 71 "includedir=$(includedir)" \ 72 "AR=$(AR)" \ 73 "AS=$(AS)" \ 74 "LD=$(LD)" \ 75 "LIBCFLAGS=$(LIBCFLAGS)" \ 76 "NM=$(NM)" \ 77 "PICFLAG=$(PICFLAG)" \ 78 "RANLIB=$(RANLIB)" \ 79 "DESTDIR=$(DESTDIR)" 80 81MAKEOVERRIDES= 82 83## ################################################################ 84 85