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