Print this page
11528 Makefile.noget can get gone
11529 Use -Wno-maybe-initialized
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/sun4u/unix/Makefile
+++ new/usr/src/uts/sun4u/unix/Makefile
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
27 27 #
28 28 # This makefile drives the production of unix (and unix.o).
29 29 #
30 30 # sun4u implementation architecture dependent
31 31 #
32 32
33 33 #
34 34 # Path to the base of the uts directory tree (usually /usr/src/uts).
35 35 #
36 36 UTSBASE = ../..
37 37
38 38 #
39 39 # Define the module and object file sets.
40 40 #
41 41 UNIX = unix
42 42 OBJECTS = $(SPECIAL_OBJS:%=$(OBJS_DIR)/%) \
43 43 $(CORE_OBJS:%=$(OBJS_DIR)/%) \
44 44 $(MACH_NOT_YET_KMODS:%=$(OBJS_DIR)/%)
45 45 LINTS = $(SPECIAL_OBJS:%.o=$(LINTS_DIR)/%.ln) \
46 46 $(CORE_OBJS:%.o=$(LINTS_DIR)/%.ln) \
47 47 $(KRTLD_OBJS:%.o=$(LINTS_DIR)/%.ln) \
48 48 $(MACH_NOT_YET_KMODS:%.o=$(LINTS_DIR)/%.ln) \
49 49 $(LINTS_DIR)/vers.ln \
50 50 $(LINTS_DIR)/modstubs.ln
51 51
52 52 KRTLD_MAPFILE = $(UTSBASE)/sparc/krtld/mapfile
53 53 KRTLD_OBJECTS = $(KRTLD_OBJS:%=$(OBJS_DIR)/%)
54 54 KRTLD_O = $(OBJS_DIR)/krtld.o
55 55
56 56 ROOTMODULE = $(ROOT_PSM_KERN_DIR)/$(UNIX)
57 57 UNIX32_LINK = $(ROOT_PSM_KERN_DIR_32)/$(UNIX)
58 58 UNIX_BIN = $(OBJS_DIR)/$(UNIX)
59 59 #UNIX_GLOM = $(OBJS_DIR)/unix.glom
60 60
61 61 LIBS = $(GENLIB) $(PLATLIB) $(CPULIB)
62 62
63 63 GENUNIX = genunix
64 64 GENUNIX_DIR = ../$(GENUNIX)
65 65 GENOPTS = -L $(GENUNIX_DIR)/$(OBJS_DIR) -l $(GENUNIX)
66 66
67 67 CPU_DIR = .
68 68 CPUOPTS = -L $(CPU_DIR)/$(OBJS_DIR) -l $(CPUNAME)
69 69
70 70 PLAT_DIR = ../platmod
71 71 PLATOPTS = -L $(PLAT_DIR)/$(OBJS_DIR) -l $(PLATMOD)
72 72
73 73 LIBOPTS = $(GENOPTS) $(PLATOPTS) $(CPUOPTS)
74 74
75 75 CTFEXTRAOBJS = $(OBJS_DIR)/vers.o
76 76
77 77 #
78 78 # Include common rules.
79 79 #
80 80 include $(UTSBASE)/sun4u/Makefile.sun4u
81 81
82 82 #
83 83 # Define targets
84 84 #
85 85 ALL_TARGET = $(UNIX_BIN)
86 86 LINT_TARGET = $(LINT_LIB)
87 87 INSTALL_TARGET = $(UNIX_BIN) $(ROOTMODULE) $(UNIX32_LINK)
88 88
89 89 #
90 90 # This is UNIX_DIR. Use a short path.
91 91 #
92 92 UNIX_DIR = .
93 93
94 94 #
95 95 # Overrides
96 96 #
97 97 CLEANFILES += $(UNIX_O) $(MODSTUBS_O) $(KRTLD_O) $(KRTLD_OBJECTS) \
98 98 $(OBJS_DIR)/vers.c $(OBJS_DIR)/vers.o \
99 99 $(CPU_OBJ) $(CPULIB) \
100 100 $(DTRACESTUBS_O) $(DTRACESTUBS)
101 101
102 102 CLOBBERFILES = $(CLEANFILES) $(UNIX_BIN)
103 103 CLEANLINTFILES += $(LINT_LIB)
104 104
105 105 #
106 106 # lint pass one enforcement
107 107 # Turn on doubleword alignment for 64 bit counter timer registers
108 108 #
109 109 CFLAGS += $(CCVERBOSE) -dalign
110 110
111 111 #
112 112 # For now, disable these lint checks; maintainers should endeavor
113 113 # to investigate and remove these for maximum lint coverage.
↓ open down ↓ |
113 lines elided |
↑ open up ↑ |
114 114 # Please do not carry these forward to new Makefiles.
115 115 #
116 116 LINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
117 117 LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
118 118 LINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
119 119 LINTTAGS += -erroff=E_STATIC_UNUSED
120 120 LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
121 121 LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
122 122
123 123 CERRWARN += -_gcc=-Wno-parentheses
124 -CERRWARN += -_gcc=-Wno-uninitialized
124 +CERRWARN += $(CNOWARN_UNINIT)
125 125 CERRWARN += -_gcc=-Wno-char-subscripts
126 126 CERRWARN += -_gcc=-Wno-unused-variable
127 127 CERRWARN += -_gcc=-Wno-unused-function
128 128 CERRWARN += -_gcc=-Wno-unused-label
129 129 CERRWARN += -_gcc=-Wno-type-limits
130 130 CERRWARN += -_gcc=-Wno-clobbered
131 131 CERRWARN += -_gcc=-Wno-empty-body
132 132 CERRWARN += -_gcc=-Wno-unused-value
133 133 CERRWARN += -_gcc=-Wno-switch
134 134
135 135 #
136 136 # Default build targets.
137 137 #
138 138 .KEEP_STATE:
139 139
140 140 def: $(DEF_DEPS)
141 141
142 142 all: $(ALL_DEPS)
143 143
144 144 clean: $(CLEAN_DEPS)
145 145
146 146 clobber: $(CLOBBER_DEPS)
147 147
148 148 lint: $(LINT_DEPS)
149 149
150 150 clean.lint: $(CLEAN_LINT_DEPS)
151 151
152 152 install: $(INSTALL_DEPS)
153 153
154 154
155 155 $(UNIX_BIN): $(UNIX_O) $(KRTLD_O) $(MODSTUBS_O) $(MAPFILE) $(LIBS) \
156 156 $(DTRACESTUBS)
157 157 $(LD) -dy -b -o $@ -e _start -M $(MAPFILE) \
158 158 $(UNIX_O) $(KRTLD_O) $(MODSTUBS_O) $(LIBOPTS) $(DTRACESTUBS)
159 159 $(CTFMERGE_UNIQUIFY_AGAINST_GENUNIX)
160 160 $(POST_PROCESS)
161 161 $(CHK4UBINARY)
162 162
163 163 $(UNIX32_LINK): $(ROOT_PSM_KERN_DIR_32) $(UNIX_BIN)
164 164 -$(RM) $@; ln -s $(SUBDIR64)/$(UNIX) $@
165 165
166 166 symcheck: $(UNIX_O) $(KRTLD_O) $(MODSTUBS_O) $(LIBS)
167 167 $(LD) -dy -b -o $(SYM_MOD) -M $(MAPFILE) \
168 168 $(UNIX_O) $(KRTLD_O) $(MODSTUBS_O) $(LIBOPTS) $(DTRACESTUBS)
169 169
170 170 $(UNIX_O): $(OBJECTS) $(OBJS_DIR)/vers.o
171 171 $(LD) -r -o $@ $(OBJECTS) $(OBJS_DIR)/vers.o
172 172
173 173 $(KRTLD_O): $(KRTLD_OBJECTS)
174 174 $(LD) -r -o $@ -M$(KRTLD_MAPFILE) $(KRTLD_OBJECTS)
175 175
176 176 #
177 177 # CPU_OBJ now comprises of 2 object files which come from sun4 common
178 178 # and from architecture dependent code. OBJS_DIR is prepended where
179 179 # CPU_OBJ is defined to allow for building multiple CPU_OBJ's
180 180 #
181 181 $(CPULIB): $(CPU_OBJ)
182 182 $(BUILD.SO) $(CPU_OBJ)
183 183
184 184 $(PLATLIB):
185 185 ?@(cd $(PLAT_DIR); pwd; $(MAKE) all.targ)
186 186 ?@pwd
187 187
188 188 #
189 189 # The global lint target builds the kernel lint library (llib-lunix.ln)
190 190 # which is equivalent to a lint of /unix.o. Then all kernel modules for
191 191 # this architecture are linted against the kernel lint library.
192 192 #
193 193 # Note: lint errors in the kernel lint library will be repeated for
194 194 # each module. It is important that the kernel lint library
195 195 # be clean to keep the textual output to a reasonable level.
196 196 #
197 197
198 198 $(LINT_LIB): $(LINT_LIB_DIR) $(LINTS)
199 199 @pwd
200 200 @-$(ECHO) "\n$(UNIX): (library construction):"
201 201 @$(LINT) -o $(UNIX) $(LINTFLAGS) $(LINTS)
202 202 @$(MV) $(@F) $@
203 203
204 204 lintlib: $(LINT_DEPS)
205 205
206 206 #
207 207 # Include common targets.
208 208 #
209 209 include $(UTSBASE)/sun4u/Makefile.targ
210 210
↓ open down ↓ |
76 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX