1 2SUBDIRS = . tests 3 4include $(top_srcdir)/Makefile.all.am 5 6#---------------------------------------------------------------------------- 7# <tool>-<platform> stuff 8#---------------------------------------------------------------------------- 9 10TOOL_DEPENDENCIES_@VGCONF_PLATFORM_PRI_CAPS@ = \ 11 $(top_builddir)/coregrind/libcoregrind-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a \ 12 $(top_builddir)/VEX/libvex-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a 13if VGCONF_HAVE_PLATFORM_SEC 14TOOL_DEPENDENCIES_@VGCONF_PLATFORM_SEC_CAPS@ = \ 15 $(top_builddir)/coregrind/libcoregrind-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a \ 16 $(top_builddir)/VEX/libvex-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a 17endif 18 19 20TOOL_LDADD_COMMON = -lgcc 21TOOL_LDADD_@VGCONF_PLATFORM_PRI_CAPS@ = \ 22 $(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_PRI_CAPS@) $(TOOL_LDADD_COMMON) 23if VGCONF_HAVE_PLATFORM_SEC 24TOOL_LDADD_@VGCONF_PLATFORM_SEC_CAPS@ = \ 25 $(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_SEC_CAPS@) $(TOOL_LDADD_COMMON) 26endif 27 28 29# -Wl,--build-id=none is needed when linking tools on Linux. Without this 30# flag newer ld versions (2.20 and later) create a .note.gnu.build-id at the 31# default text segment address, which of course means the resulting executable 32# is unusable. So we have to tell ld not to generate that, with --build-id=none. 33TOOL_LDFLAGS_COMMON_LINUX = \ 34 -static -nodefaultlibs -nostartfiles -u _start @FLAG_NO_BUILD_ID@ 35TOOL_LDFLAGS_COMMON_AIX5 = \ 36 -static -Wl,-e_start_valgrind 37TOOL_LDFLAGS_COMMON_DARWIN = \ 38 -nodefaultlibs -nostartfiles -Wl,-u,__start -Wl,-e,__start 39 40TOOL_LDFLAGS_X86_LINUX = \ 41 $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ 42 43TOOL_LDFLAGS_AMD64_LINUX = \ 44 $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ 45 46TOOL_LDFLAGS_PPC32_LINUX = \ 47 $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ 48 49TOOL_LDFLAGS_PPC64_LINUX = \ 50 $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ 51 52TOOL_LDFLAGS_ARM_LINUX = \ 53 $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ 54 55TOOL_LDFLAGS_PPC32_AIX5 = \ 56 $(TOOL_LDFLAGS_COMMON_AIX5) @FLAG_MAIX32@ 57 58TOOL_LDFLAGS_PPC64_AIX5 = \ 59 $(TOOL_LDFLAGS_COMMON_AIX5) @FLAG_MAIX64@ -Wl,-bbigtoc 60 61TOOL_LDFLAGS_X86_DARWIN = \ 62 $(TOOL_LDFLAGS_COMMON_DARWIN) -arch i386 63 64TOOL_LDFLAGS_AMD64_DARWIN = \ 65 $(TOOL_LDFLAGS_COMMON_DARWIN) -arch x86_64 66 67# NB for 64-bit darwin. We may want to set -Wl,-pagezero_size to 68# something smaller than the default of 4G, so as to facilitate 69# loading clients who are also linked thusly (currently m_ume.c 70# will fail to load them). Although such setting is probably 71# better done in link_tool_exe.c. 72# 73# -Wl,-pagezero_size,0x100000000 74 75 76#---------------------------------------------------------------------------- 77# vgpreload_<tool>-<platform>.a stuff 78#---------------------------------------------------------------------------- 79 80LIBREPLACEMALLOC_X86_LINUX = \ 81 $(top_builddir)/coregrind/libreplacemalloc_toolpreload-x86-linux.a 82 83LIBREPLACEMALLOC_AMD64_LINUX = \ 84 $(top_builddir)/coregrind/libreplacemalloc_toolpreload-amd64-linux.a 85 86LIBREPLACEMALLOC_PPC32_LINUX = \ 87 $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc32-linux.a 88 89LIBREPLACEMALLOC_PPC64_LINUX = \ 90 $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-linux.a 91 92LIBREPLACEMALLOC_ARM_LINUX = \ 93 $(top_builddir)/coregrind/libreplacemalloc_toolpreload-arm-linux.a 94 95LIBREPLACEMALLOC_PPC32_AIX5 = \ 96 $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc32-aix5.a 97 98LIBREPLACEMALLOC_PPC64_AIX5 = \ 99 $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-aix5.a 100 101LIBREPLACEMALLOC_X86_DARWIN = \ 102 $(top_builddir)/coregrind/libreplacemalloc_toolpreload-x86-darwin.a 103 104LIBREPLACEMALLOC_AMD64_DARWIN = \ 105 $(top_builddir)/coregrind/libreplacemalloc_toolpreload-amd64-darwin.a 106 107 108LIBREPLACEMALLOC_LDFLAGS_X86_LINUX = \ 109 -Wl,--whole-archive \ 110 $(LIBREPLACEMALLOC_X86_LINUX) \ 111 -Wl,--no-whole-archive 112 113LIBREPLACEMALLOC_LDFLAGS_AMD64_LINUX = \ 114 -Wl,--whole-archive \ 115 $(LIBREPLACEMALLOC_AMD64_LINUX) \ 116 -Wl,--no-whole-archive 117 118LIBREPLACEMALLOC_LDFLAGS_PPC32_LINUX = \ 119 -Wl,--whole-archive \ 120 $(LIBREPLACEMALLOC_PPC32_LINUX) \ 121 -Wl,--no-whole-archive 122 123LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX = \ 124 -Wl,--whole-archive \ 125 $(LIBREPLACEMALLOC_PPC64_LINUX) \ 126 -Wl,--no-whole-archive 127 128LIBREPLACEMALLOC_LDFLAGS_ARM_LINUX = \ 129 -Wl,--whole-archive \ 130 $(LIBREPLACEMALLOC_ARM_LINUX) \ 131 -Wl,--no-whole-archive 132 133LIBREPLACEMALLOC_LDFLAGS_PPC32_AIX5 = \ 134 $(LIBREPLACEMALLOC_PPC32_AIX5) 135 136LIBREPLACEMALLOC_LDFLAGS_PPC64_AIX5 = \ 137 $(LIBREPLACEMALLOC_PPC64_AIX5) 138 139LIBREPLACEMALLOC_LDFLAGS_X86_DARWIN = \ 140 $(LIBREPLACEMALLOC_X86_DARWIN) 141 142LIBREPLACEMALLOC_LDFLAGS_AMD64_DARWIN = \ 143 $(LIBREPLACEMALLOC_AMD64_DARWIN) 144 145#---------------------------------------------------------------------------- 146# General stuff 147#---------------------------------------------------------------------------- 148 149all-local: inplace-noinst_PROGRAMS inplace-noinst_DSYMS 150 151clean-local: clean-noinst_DSYMS 152 153install-exec-local: install-noinst_PROGRAMS install-noinst_DSYMS 154 155