Print this page
11528 Makefile.noget can get gone
11529 Use -Wno-maybe-initialized
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/ptools/Makefile.bld
+++ new/usr/src/cmd/ptools/Makefile.bld
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 #
23 23 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 24 # Use is subject to license terms.
25 25 #
26 26 # Copyright (c) 2018, Joyent, Inc.
27 27
28 28 PROG:sh = basename `cd ..; pwd`
29 29
30 30 OBJS = $(PROG).o
31 31
32 32 SRCS = ../$(PROG).c
33 33
34 34 FILEMODE = 0555
35 35
36 36 # libproc is added individually as pwait doesn't need it.
37 37 # These are defined this way so lint can use them
38 38 LDLIBS_pargs = -lproc
39 39 LDLIBS_pcred = -lproc
40 40 LDLIBS_pfiles = -lproc -lnsl
41 41 LDLIBS_pflags = -lproc
42 42 LDLIBS_pldd = -lproc
43 43 LDLIBS_plgrp = -lproc -llgrp
44 44 LDLIBS_pmap = -lproc
45 45 LDLIBS_pmadvise = -lproc
46 46 LDLIBS_ppriv = -lproc
47 47 LDLIBS_preap = -lproc
48 48 LDLIBS_prun = -lproc
49 49 LDLIBS_psecflags = -lproc -lproject
50 50 LDLIBS_psig = -lproc
51 51 LDLIBS_pstack = -lproc -lc_db
52 52 LDLIBS_pstop = -lproc
53 53 LDLIBS_ptime = -lproc
54 54 LDLIBS_ptree = -lproc -lcontract
↓ open down ↓ |
54 lines elided |
↑ open up ↑ |
55 55 LDLIBS_pwdx = -lproc
56 56
57 57 LDLIBS += $(LDLIBS_$(PROG))
58 58
59 59 CERRWARN_plgrp += -_gcc=-Wno-parentheses
60 60 CERRWARN_plgrp += -_smatch=off
61 61
62 62 CERRWARN_pmadvise += -_smatch=off
63 63
64 64 CERRWARN_ppriv += -_gcc=-Wno-parentheses
65 -CERRWARN_ppriv += -_gcc=-Wno-uninitialized
65 +CERRWARN_ppriv += $(CNOWARN_UNINIT)
66 66
67 67 CERRWARN_ptree += -_gcc=-Wno-parentheses
68 68 CERRWARN_ptree += -_smatch=off
69 69
70 -CERRWARN_pstack += -_gcc=-Wno-uninitialized
70 +CERRWARN_pstack += $(CNOWARN_UNINIT)
71 71 CERRWARN_pstack += -_gcc=-Wno-clobbered
72 72
73 73 CERRWARN_pargs += -_gcc=-Wno-clobbered
74 74 CERRWARN_pargs += -_gcc=-Wno-type-limits
75 75
76 76 CERRWARN_pwait += -_smatch=off
77 77
78 78 CERRWARN += $(CERRWARN_$(PROG))
79 79
80 80 # pargs depends on ../../common/elfcap components
81 81 # pmadvise depends on pmap components
82 82
83 83 ELFCAP = $(SRC)/common/elfcap
84 84 PMAP = $(SRC)/cmd/ptools/pmap
85 85
86 86 CPPFLAGS_pargs = -I$(ELFCAP)
87 87 OBJS_pargs = elfcap.o
88 88 SRCS_pargs = $(ELFCAP)/elfcap.c
89 89
90 90 CPPFLAGS_pmap = -I$(PMAP)
91 91 OBJS_pmap = pmap_common.o
92 92 SRCS_pmap = $(PMAP)/pmap_common.c
93 93
94 94 CPPFLAGS_pmadvise = -I$(PMAP)
95 95 OBJS_pmadvise = pmap_common.o
96 96 SRCS_pmadvise = $(PMAP)/pmap_common.c
97 97
98 98 LN_pargs = penv pauxv
99 99
100 100 CPPFLAGS += $(CPPFLAGS_$(PROG))
101 101 OBJS += $(OBJS_$(PROG))
102 102 SRCS += $(SRCS_$(PROG))
103 103
104 104 INSTALL_NEW=
105 105 INSTALL_LEGACY=$(RM) $(ROOTPROCBINSYMLINK) ; \
106 106 $(LN) -s ../../bin/$(PROG) $(ROOTPROCBINSYMLINK)
107 107
108 108 .KEEP_STATE:
109 109
110 110 elfcap.o: $(ELFCAP)/elfcap.c
111 111 $(COMPILE.c) -o $@ $(ELFCAP)/elfcap.c
112 112
113 113 pmap_common.o: $(PMAP)/pmap_common.c
114 114 $(COMPILE.c) -o $@ $(PMAP)/pmap_common.c
115 115
116 116 %.o: ../%.c
117 117 $(COMPILE.c) $<
118 118
119 119 all: $(PROG) $(LN_$(PROG))
120 120
121 121 ROOTBINLN=$(LN_$(PROG):%=$(ROOTBIN)/%)
122 122 ROOTBINPROG=$(ROOTBIN)/$(PROG)
123 123 ROOTPROCBINSYMLINK=$(ROOT)/usr/proc/bin/$(PROG)
124 124
125 125 $(PROG): $$(OBJS)
126 126 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
127 127 $(POST_PROCESS)
128 128
129 129 #
130 130 # Install the ptool, symlinking it into /usr/proc/bin if PTOOL_TYPE is set
131 131 # to LEGACY.
132 132 #
133 133 install: all $(ROOTISAPROG) $(ROOTISALN) $(ROOTBINLN)
134 134 -$(RM) $(ROOTBINPROG)
135 135 -$(LN) $(ISAEXEC) $(ROOTBINPROG)
136 136 -$(INSTALL_$(PTOOL_TYPE))
137 137
138 138 $(ROOTBINLN): $(ROOTISAPROG)
139 139 -$(RM) $@
140 140 -$(LN) $(ISAEXEC) $@
141 141
142 142 $(ROOTISALN): $(ROOTISAPROG)
143 143 -$(RM) $@
144 144 -$(LN) $(ROOTISAPROG) $@
145 145
146 146 $(LN_$(PROG)): $(PROG)
147 147 -$(RM) $@
148 148 -$(LN) $(PROG) $@
149 149
150 150 clean:
151 151 $(RM) $(OBJS)
152 152
153 153 lint:
154 154 $(LINT.c) $(SRCS) $(LDLIBS)
↓ open down ↓ |
74 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX