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.cc \ 17 ubsan_flags.cc \ 18 ubsan_handlers.cc \ 19 ubsan_handlers_cxx.cc \ 20 ubsan_init.cc \ 21 ubsan_type_hash.cc \ 22 ubsan_type_hash_itanium.cc \ 23 ubsan_type_hash_win.cc \ 24 ubsan_value.cc 25 26ubsan_files = $(ubsan_plugin_files) 27 28libubsan_la_SOURCES = $(ubsan_files) 29libubsan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la 30if !USING_MAC_INTERPOSE 31libubsan_la_LIBADD += $(top_builddir)/interception/libinterception.la 32endif 33if LIBBACKTRACE_SUPPORTED 34libubsan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la 35endif 36libubsan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS) 37libubsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libubsan) 38 39# Use special rules for files that require RTTI support. 40ubsan_handlers_cxx.% ubsan_type_hash.% ubsan_type_hash_itanium.% : AM_CXXFLAGS += -frtti 41 42# Work around what appears to be a GNU make bug handling MAKEFLAGS 43# values defined in terms of make variables, as is the case for CC and 44# friends when we are called from the top level Makefile. 45AM_MAKEFLAGS = \ 46 "AR_FLAGS=$(AR_FLAGS)" \ 47 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ 48 "CFLAGS=$(CFLAGS)" \ 49 "CXXFLAGS=$(CXXFLAGS)" \ 50 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ 51 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ 52 "INSTALL=$(INSTALL)" \ 53 "INSTALL_DATA=$(INSTALL_DATA)" \ 54 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ 55 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ 56 "JC1FLAGS=$(JC1FLAGS)" \ 57 "LDFLAGS=$(LDFLAGS)" \ 58 "LIBCFLAGS=$(LIBCFLAGS)" \ 59 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ 60 "MAKE=$(MAKE)" \ 61 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ 62 "PICFLAG=$(PICFLAG)" \ 63 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ 64 "SHELL=$(SHELL)" \ 65 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ 66 "exec_prefix=$(exec_prefix)" \ 67 "infodir=$(infodir)" \ 68 "libdir=$(libdir)" \ 69 "prefix=$(prefix)" \ 70 "includedir=$(includedir)" \ 71 "AR=$(AR)" \ 72 "AS=$(AS)" \ 73 "LD=$(LD)" \ 74 "LIBCFLAGS=$(LIBCFLAGS)" \ 75 "NM=$(NM)" \ 76 "PICFLAG=$(PICFLAG)" \ 77 "RANLIB=$(RANLIB)" \ 78 "DESTDIR=$(DESTDIR)" 79 80MAKEOVERRIDES= 81 82## ################################################################ 83 84