Print this page
OS-279 #pragma D option zone= does not work on installed, halted zones
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/libdtrace/Makefile.com
+++ new/usr/src/lib/libdtrace/Makefile.com
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21 #
22 22 # Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
23 23 # Copyright (c) 2011, 2016 by Delphix. All rights reserved.
24 24 #
25 25 # Copyright (c) 2018, Joyent, Inc.
26 26
27 27 LIBRARY = libdtrace.a
28 28 VERS = .1
29 29
30 30 LIBSRCS = \
31 31 dt_aggregate.c \
32 32 dt_as.c \
33 33 dt_buf.c \
34 34 dt_cc.c \
35 35 dt_cg.c \
36 36 dt_consume.c \
37 37 dt_decl.c \
38 38 dt_dis.c \
39 39 dt_dof.c \
40 40 dt_error.c \
41 41 dt_errtags.c \
42 42 dt_sugar.c \
43 43 dt_handle.c \
44 44 dt_ident.c \
45 45 dt_inttab.c \
46 46 dt_link.c \
47 47 dt_list.c \
48 48 dt_open.c \
49 49 dt_options.c \
50 50 dt_program.c \
51 51 dt_map.c \
52 52 dt_module.c \
53 53 dt_names.c \
54 54 dt_parser.c \
55 55 dt_pcb.c \
56 56 dt_pid.c \
57 57 dt_pq.c \
58 58 dt_pragma.c \
59 59 dt_print.c \
60 60 dt_printf.c \
61 61 dt_proc.c \
62 62 dt_provider.c \
63 63 dt_regset.c \
64 64 dt_string.c \
65 65 dt_strtab.c \
66 66 dt_subr.c \
67 67 dt_work.c \
68 68 dt_xlator.c
69 69
70 70 LIBISASRCS = \
71 71 dt_isadep.c
72 72
73 73 OBJECTS = dt_lex.o dt_grammar.o $(MACHOBJS) $(LIBSRCS:%.c=%.o) $(LIBISASRCS:%.c=%.o)
74 74
75 75 DRTISRCS = dlink_init.c dlink_common.c
76 76 DRTIOBJS = $(DRTISRCS:%.c=pics/%.o)
77 77 DRTIOBJ = drti.o
78 78
79 79 LIBDAUDITSRCS = dlink_audit.c dlink_common.c
80 80 LIBDAUDITOBJS = $(LIBDAUDITSRCS:%.c=pics/%.o)
81 81 LIBDAUDIT = libdtrace_forceload.so
82 82
83 83 DLINKSRCS = dlink_common.c dlink_init.c dlink_audit.c
84 84
85 85 DLIBSRCS += \
86 86 errno.d \
87 87 fc.d \
88 88 io.d \
89 89 ip.d \
90 90 iscsit.d \
91 91 net.d \
92 92 nfs.d \
93 93 nfssrv.d \
94 94 procfs.d \
95 95 regs.d \
96 96 sched.d \
97 97 signal.d \
98 98 scsi.d \
99 99 smb.d \
100 100 srp.d \
101 101 sysevent.d \
102 102 tcp.d \
103 103 udp.d \
104 104 unistd.d
105 105
106 106 include ../../Makefile.lib
107 107
108 108 SRCS = $(LIBSRCS:%.c=../common/%.c) $(LIBISASRCS:%.c=../$(MACH)/%.c)
109 109 LIBS = $(DYNLIB) $(LINTLIB)
110 110
111 111 SRCDIR = ../common
112 112
113 113 CLEANFILES += dt_lex.c dt_grammar.c dt_grammar.h y.output
114 114 CLEANFILES += ../common/procfs.sed ../common/procfs.d
115 115 CLEANFILES += ../common/io.sed ../common/io.d
116 116 CLEANFILES += ../common/ip.sed ../common/ip.d
117 117 CLEANFILES += ../common/net.sed ../common/net.d
118 118 CLEANFILES += ../common/errno.d ../common/signal.d
119 119 CLEANFILES += ../common/dt_errtags.c ../common/dt_names.c
120 120 CLEANFILES += ../common/sysevent.sed ../common/sysevent.d
121 121 CLEANFILES += ../common/tcp.sed ../common/tcp.d
122 122 CLEANFILES += ../common/udp.sed ../common/udp.d
123 123 CLEANFILES += $(LIBDAUDITOBJS) $(DRTIOBJS)
124 124
125 125 CLOBBERFILES += $(LIBDAUDIT) drti.o
126 126
127 127 CPPFLAGS += -I../common -I.
128 128 CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
129 129 CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
130 130
↓ open down ↓ |
130 lines elided |
↑ open up ↑ |
131 131 CERRWARN += -_gcc=-Wno-unused-label
132 132 CERRWARN += -_gcc=-Wno-unused-variable
133 133 CERRWARN += -_gcc=-Wno-parentheses
134 134 CERRWARN += $(CNOWARN_UNINIT)
135 135 CERRWARN += -_gcc=-Wno-switch
136 136
137 137 # not linted
138 138 SMATCH=off
139 139
140 140 YYCFLAGS =
141 -LDLIBS += -lgen -lproc -lrtld_db -lnsl -lsocket -lctf -lelf -lc
141 +LDLIBS += -lgen -lproc -lrtld_db -lnsl -lsocket -lctf -lelf -lc -lzonecfg
142 142 DRTILDLIBS = $(LDLIBS.lib) -lc
143 143 LIBDAUDITLIBS = $(LDLIBS.lib) -lmapmalloc -lc -lproc
144 144
145 145 yydebug := YYCFLAGS += -DYYDEBUG
146 146
147 147 $(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
148 148
149 149 LFLAGS = -t -v
150 150 YFLAGS = -d -v
151 151
152 152 ROOTDLIBDIR = $(ROOT)/usr/lib/dtrace
153 153 ROOTDLIBDIR64 = $(ROOT)/usr/lib/dtrace/64
154 154
155 155 ROOTDLIBS = $(DLIBSRCS:%=$(ROOTDLIBDIR)/%)
156 156 ROOTDOBJS = $(ROOTDLIBDIR)/$(DRTIOBJ) $(ROOTDLIBDIR)/$(LIBDAUDIT)
157 157 ROOTDOBJS64 = $(ROOTDLIBDIR64)/$(DRTIOBJ) $(ROOTDLIBDIR64)/$(LIBDAUDIT)
158 158
159 159 $(ROOTDLIBDIR)/%.d := FILEMODE=444
160 160 $(ROOTDLIBDIR)/%.o := FILEMODE=444
161 161 $(ROOTDLIBDIR64)/%.o := FILEMODE=444
162 162 $(ROOTDLIBDIR)/%.so := FILEMODE=555
163 163 $(ROOTDLIBDIR64)/%.so := FILEMODE=555
164 164
165 165 .KEEP_STATE:
166 166
167 167 all: $(LIBS) $(DRTIOBJ) $(LIBDAUDIT)
168 168
169 169 lint: lintdlink lintcheck
170 170
171 171 lintdlink: $(DLINKSRCS:%.c=../common/%.c)
172 172 $(LINT.c) $(DLINKSRCS:%.c=../common/%.c) $(DRTILDLIBS)
173 173
174 174 dt_lex.c: $(SRCDIR)/dt_lex.l dt_grammar.h
175 175 $(LEX) $(LFLAGS) $(SRCDIR)/dt_lex.l > $@
176 176
177 177 dt_grammar.c dt_grammar.h: $(SRCDIR)/dt_grammar.y
178 178 $(YACC) $(YFLAGS) $(SRCDIR)/dt_grammar.y
179 179 @mv y.tab.h dt_grammar.h
180 180 @mv y.tab.c dt_grammar.c
181 181
182 182 pics/dt_lex.o pics/dt_grammar.o := CFLAGS += $(YYCFLAGS)
183 183 pics/dt_lex.o pics/dt_grammar.o := CFLAGS64 += $(YYCFLAGS)
184 184
185 185 pics/dt_lex.o pics/dt_grammar.o := CERRWARN += -erroff=E_STATEMENT_NOT_REACHED
186 186 pics/dt_lex.o pics/dt_grammar.o := CCVERBOSE =
187 187
188 188 ../common/dt_errtags.c: ../common/mkerrtags.sh ../common/dt_errtags.h
189 189 sh ../common/mkerrtags.sh < ../common/dt_errtags.h > $@
190 190
191 191 ../common/dt_names.c: ../common/mknames.sh $(SRC)/uts/common/sys/dtrace.h
192 192 sh ../common/mknames.sh < $(SRC)/uts/common/sys/dtrace.h > $@
193 193
194 194 ../common/errno.d: ../common/mkerrno.sh $(SRC)/uts/common/sys/errno.h
195 195 sh ../common/mkerrno.sh < $(SRC)/uts/common/sys/errno.h > $@
196 196
197 197 ../common/signal.d: ../common/mksignal.sh $(SRC)/uts/common/sys/iso/signal_iso.h
198 198 sh ../common/mksignal.sh < $(SRC)/uts/common/sys/iso/signal_iso.h > $@
199 199
200 200 ../common/%.sed: ../common/%.sed.in
201 201 $(COMPILE.cpp) -D_KERNEL $< | tr -d ' ' | tr '"' '@' | \
202 202 sed 's/\&/\\\&/g' | grep '^s/' > $@
203 203
204 204 ../common/procfs.d: ../common/procfs.sed ../common/procfs.d.in
205 205 sed -f ../common/procfs.sed < ../common/procfs.d.in > $@
206 206
207 207 ../common/io.d: ../common/io.sed ../common/io.d.in
208 208 sed -f ../common/io.sed < ../common/io.d.in > $@
209 209
210 210 ../common/ip.d: ../common/ip.sed ../common/ip.d.in
211 211 sed -f ../common/ip.sed < ../common/ip.d.in > $@
212 212
213 213 ../common/net.d: ../common/net.sed ../common/net.d.in
214 214 sed -f ../common/net.sed < ../common/net.d.in > $@
215 215
216 216 ../common/sysevent.d: ../common/sysevent.sed ../common/sysevent.d.in
217 217 sed -f ../common/sysevent.sed < ../common/sysevent.d.in > $@
218 218
219 219 ../common/tcp.d: ..//common/tcp.sed ../common/tcp.d.in
220 220 sed -f ../common/tcp.sed < ../common/tcp.d.in > $@
221 221
222 222 ../common/udp.d: ../common/udp.sed ../common/udp.d.in
223 223 sed -f ../common/udp.sed < ../common/udp.d.in > $@
224 224
225 225 pics/%.o: ../$(MACH)/%.c
226 226 $(COMPILE.c) -o $@ $<
227 227 $(POST_PROCESS_O)
228 228
229 229 pics/%.o: ../$(MACH)/%.s
230 230 $(COMPILE.s) -o $@ $<
231 231 $(POST_PROCESS_O)
232 232
233 233 $(DRTIOBJ): $(DRTIOBJS)
234 234 $(LD) -o $@ -r -Blocal -Breduce $(DRTIOBJS)
235 235 $(POST_PROCESS_O)
236 236
237 237 $(LIBDAUDIT): $(LIBDAUDITOBJS)
238 238 $(LINK.c) -o $@ $(GSHARED) -h$(LIBDAUDIT) $(ZTEXT) $(ZDEFS) $(BDIRECT) \
239 239 $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) $(LIBDAUDITOBJS) \
240 240 $(LIBDAUDITLIBS)
241 241 $(POST_PROCESS_SO)
242 242
243 243 $(ROOTDLIBDIR):
244 244 $(INS.dir)
245 245
246 246 $(ROOTDLIBDIR64): $(ROOTDLIBDIR)
247 247 $(INS.dir)
248 248
249 249 $(ROOTDLIBDIR)/%.d: ../common/%.d
250 250 $(INS.file)
251 251
252 252 $(ROOTDLIBDIR)/%.d: ../$(MACH)/%.d
253 253 $(INS.file)
254 254
255 255 $(ROOTDLIBDIR)/%.d: %.d
256 256 $(INS.file)
257 257
258 258 $(ROOTDLIBDIR)/%.o: %.o
259 259 $(INS.file)
260 260
261 261 $(ROOTDLIBDIR64)/%.o: %.o
262 262 $(INS.file)
263 263
264 264 $(ROOTDLIBDIR)/%.so: %.so
265 265 $(INS.file)
266 266
267 267 $(ROOTDLIBDIR64)/%.so: %.so
268 268 $(INS.file)
269 269
270 270 $(ROOTDLIBS): $(ROOTDLIBDIR)
271 271
272 272 $(ROOTDOBJS): $(ROOTDLIBDIR)
273 273
274 274 $(ROOTDOBJS64): $(ROOTDLIBDIR64)
275 275
276 276 include ../../Makefile.targ
↓ open down ↓ |
125 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX