]> git.ipfire.org Git - thirdparty/gcc.git/blame - libsanitizer/hwasan/Makefile.am
Config,Darwin: Allow for configuring Darwin to use embedded runpath.
[thirdparty/gcc.git] / libsanitizer / hwasan / Makefile.am
CommitLineData
edb07cb9
MM
1AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir)
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 -DCAN_SANITIZE_UB=0 -DHWASAN_WITH_INTERCEPTORS=1
7AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti -funwind-tables -fvisibility=hidden -Wno-variadic-macros -fno-ipa-icf
8AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS)
9AM_CXXFLAGS += -std=gnu++14
10AM_CXXFLAGS += $(EXTRA_CXXFLAGS)
a23653c6 11AM_CCASFLAGS = $(EXTRA_ASFLAGS)
edb07cb9
MM
12ACLOCAL_AMFLAGS = -I $(top_srcdir) -I $(top_srcdir)/config
13
14toolexeclib_LTLIBRARIES = libhwasan.la
f39b7a4d 15nodist_toolexeclib_HEADERS = libhwasan_preinit.o
edb07cb9
MM
16
17hwasan_files = \
90e46074 18 hwasan_allocation_functions.cpp \
edb07cb9
MM
19 hwasan_allocator.cpp \
20 hwasan.cpp \
21 hwasan_dynamic_shadow.cpp \
22 hwasan_exceptions.cpp \
23 hwasan_flags.inc \
90e46074 24 hwasan_fuchsia.cpp \
edb07cb9
MM
25 hwasan_globals.cpp \
26 hwasan_interceptors.cpp \
27 hwasan_interceptors_vfork.S \
28 hwasan_linux.cpp \
29 hwasan_memintrinsics.cpp \
30 hwasan_new_delete.cpp \
31 hwasan_poisoning.cpp \
32 hwasan_report.cpp \
76288e1c
L
33 hwasan_setjmp_aarch64.S \
34 hwasan_setjmp_x86_64.S \
edb07cb9
MM
35 hwasan_tag_mismatch_aarch64.S \
36 hwasan_thread.cpp \
37 hwasan_thread_list.cpp \
38 hwasan_type_test.cpp
39
40libhwasan_la_SOURCES = $(hwasan_files)
54765c87 41libhwasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/lsan/libsanitizer_lsan.la
edb07cb9
MM
42if !USING_MAC_INTERPOSE
43libhwasan_la_LIBADD += $(top_builddir)/interception/libinterception.la
44endif
45if LIBBACKTRACE_SUPPORTED
46libhwasan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la
47endif
48libhwasan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS)
49
6a6d3817
IS
50if ENABLE_DARWIN_AT_RPATH
51libhwasan_darwin_rpath = -nodefaultrpaths -Wl,-rpath,@loader_path/
52endif
53libhwasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
54 $(link_libhwasan) $(libhwasan_darwin_rpath)
edb07cb9 55
f39b7a4d
JJ
56libhwasan_preinit.o: hwasan_preinit.o
57 cp $< $@
58
edb07cb9
MM
59# Work around what appears to be a GNU make bug handling MAKEFLAGS
60# values defined in terms of make variables, as is the case for CC and
61# friends when we are called from the top level Makefile.
62AM_MAKEFLAGS = \
63 "AR_FLAGS=$(AR_FLAGS)" \
64 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
65 "CFLAGS=$(CFLAGS)" \
66 "CXXFLAGS=$(CXXFLAGS)" \
67 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
68 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
69 "INSTALL=$(INSTALL)" \
70 "INSTALL_DATA=$(INSTALL_DATA)" \
71 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
72 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
73 "JC1FLAGS=$(JC1FLAGS)" \
74 "LDFLAGS=$(LDFLAGS)" \
75 "LIBCFLAGS=$(LIBCFLAGS)" \
76 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
77 "MAKE=$(MAKE)" \
78 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
79 "PICFLAG=$(PICFLAG)" \
80 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
81 "SHELL=$(SHELL)" \
82 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
83 "exec_prefix=$(exec_prefix)" \
84 "infodir=$(infodir)" \
85 "libdir=$(libdir)" \
86 "prefix=$(prefix)" \
87 "includedir=$(includedir)" \
88 "AR=$(AR)" \
89 "AS=$(AS)" \
90 "LD=$(LD)" \
91 "LIBCFLAGS=$(LIBCFLAGS)" \
92 "NM=$(NM)" \
93 "PICFLAG=$(PICFLAG)" \
94 "RANLIB=$(RANLIB)" \
95 "DESTDIR=$(DESTDIR)"
96
97MAKEOVERRIDES=
98
99## ################################################################
100
101