Print this page
1961 investigate stopping uniquifying CTF information
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Joshua M. Clulow <josh@sysmgr.org>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/i86xpv/unix/Makefile
+++ new/usr/src/uts/i86xpv/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 2008 Sun Microsystems, Inc. All rights reserved.
24 24 # Use is subject to license terms.
25 25 #
26 26 # This makefile drives the production of unix (and unix.o).
27 27 #
28 28 # i86xpv implementation architecture dependent
29 29 #
30 30
31 31 #
32 32 # Path to the base of the uts directory tree (usually /usr/src/uts).
33 33 #
34 34 UTSBASE = ../..
35 35
36 36 #
37 37 # Define the module and object file sets.
38 38 #
39 39 UNIX = unix
40 40 DBOOT = dboot
41 41
42 42 OBJECTS = $(SPECIAL_OBJS:%=$(OBJS_DIR)/%) \
43 43 $(CORE_OBJS:%=$(OBJS_DIR)/%) \
44 44 $(KRTLD_OBJS:%=$(OBJS_DIR)/%) \
45 45 $(MACH_NOT_YET_KMODS:%=$(OBJS_DIR)/%)
46 46
47 47 LINTS = $(SPECIAL_OBJS:%.o=$(LINTS_DIR)/%.ln) \
48 48 $(CORE_OBJS:%.o=$(LINTS_DIR)/%.ln) \
49 49 $(KRTLD_OBJS:%.o=$(LINTS_DIR)/%.ln) \
50 50 $(MACH_NOT_YET_KMODS:%.o=$(LINTS_DIR)/%.ln) \
51 51 $(LINTS_DIR)/vers.ln \
52 52 $(LINTS_DIR)/modstubs.ln
53 53
54 54 ROOTMODULE = $(ROOT_PSM_KERN_DIR)/$(UNIX)
55 55
56 56 UNIX_BIN = $(OBJS_DIR)/$(UNIX)
57 57
58 58 LIBS = $(GENLIB)
59 59
60 60 GENUNIX = genunix
61 61 GENUNIX_DIR = ../../intel/$(GENUNIX)
62 62
63 63 LIBOPTS = -L $(GENUNIX_DIR)/$(OBJS_DIR) -l $(GENUNIX)
64 64
65 65 CTFEXTRAOBJS = $(OBJS_DIR)/vers.o
66 66
67 67 DBOOT_OBJS_DIR = dboot/$(OBJS_DIR)
68 68 DBOOT_OBJECTS = $(DBOOT_OBJS:%=$(DBOOT_OBJS_DIR)/%)
69 69 DBOOT_BIN = $(DBOOT_OBJS_DIR)/$(DBOOT)
70 70 DBOOT_O = $(OBJS_DIR)/$(DBOOT).o
71 71 DBOOT_S = $(DBOOT_O:%.o=%.s)
72 72 DBOOT_LINTS = $(DBOOT_OBJS:%.o=$(DBOOT_OBJS_DIR)/%.ln)
73 73 DBOOT_LINT = $(LINT_$(MACH)_$(CLASS))
74 74
75 75 #
76 76 # Include common rules.
77 77 #
78 78 include $(UTSBASE)/i86xpv/Makefile.i86xpv
79 79
80 80 #
81 81 # Define targets
82 82 #
83 83 ALL_TARGET = $(UNIX_BIN)
84 84 LINT_TARGET = $(LINT_LIB) $(DBOOT_LINT_LIB)
85 85 INSTALL_TARGET = $(UNIX_BIN) $(ROOTMODULE)
86 86
87 87 #
88 88 # This is UNIX_DIR. Use a short path.
89 89 #
90 90 UNIX_DIR = .
91 91
92 92 #
93 93 # Overrides
94 94 #
95 95 CLEANFILES += \
96 96 $(UNIX_O) $(MODSTUBS_O) \
97 97 $(OBJS_DIR)/vers.c $(OBJS_DIR)/vers.o \
98 98 $(OBJS_DIR)/dtracestubs.s \
99 99 $(DTRACESTUBS_O) $(DTRACESTUBS)
100 100
101 101 CLEANFILES += \
102 102 $(DBOOT_O) $(DBOOT_S) \
103 103 $(DBOOT_OBJECTS) \
104 104 $(DBOOT_BIN)
105 105
106 106 CLEANFILES += \
107 107 $(OBJS_DIR)/fb_swtch_src.o \
108 108 $(OBJS_DIR)/fb_swtch_src \
109 109 $(OBJS_DIR)/fb_swtch.s
110 110
111 111 CLEANFILES += \
112 112 $(ZLIB_OBJS:%.o=$(OBJS_DIR)/%.o) \
113 113 $(ZLIB_OBJS:%.o=$(OBJS_DIR)/%.ln)
114 114
115 115 CLOBBERFILES = $(CLEANFILES) $(UNIX_BIN)
116 116 CLEANLINTFILES += $(LINT_LIB) $(DBOOT_LINT_LIB) $(DBOOT_LINTS)
117 117
118 118 # instr_size needs a special header
119 119 $(OBJS_DIR)/instr_size.o := EXTRA_OPTIONS = -I$(SRC)/common/dis/i386
120 120 $(OBJS_DIR)/instr_size.ln := EXTRA_OPTIONS = -I$(SRC)/common/dis/i386
121 121
122 122 CFLAGS += -DDIS_MEM
123 123
124 124 #
125 125 # For now, disable these lint checks; maintainers should endeavor
126 126 # to investigate and remove these for maximum lint coverage.
127 127 # Please do not carry these forward to new Makefiles.
128 128 #
129 129 LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
130 130 LINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
131 131 LINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
132 132 LINTTAGS += -erroff=E_STATIC_UNUSED
133 133 LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
134 134 LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
135 135
136 136 CERRWARN += -_gcc=-Wno-parentheses
137 137 CERRWARN += -_gcc=-Wno-uninitialized
138 138 CERRWARN += -_gcc=-Wno-char-subscripts
139 139 CERRWARN += -_gcc=-Wno-unused-variable
140 140 CERRWARN += -_gcc=-Wno-unused-function
141 141 CERRWARN += -_gcc=-Wno-unused-label
142 142 CERRWARN += -_gcc=-Wno-type-limits
143 143 CERRWARN += -_gcc=-Wno-clobbered
144 144 CERRWARN += -_gcc=-Wno-unused-value
145 145 CERRWARN += -_gcc=-Wno-empty-body
146 146
147 147 # Ensure that lint sees 'struct cpu' containing a fully declared
148 148 # embedded 'struct machcpu'
149 149 #
150 150 LINTFLAGS += -D_MACHDEP -I../../i86pc
151 151
152 152 #
153 153 # Default build targets.
154 154 #
155 155 .KEEP_STATE:
156 156
157 157 def: $(DEF_DEPS)
158 158
159 159 all: $(ALL_DEPS)
160 160
161 161 clean: $(CLEAN_DEPS)
162 162
163 163 clobber: $(CLOBBER_DEPS)
164 164
165 165 lint: $(LINT_DEPS)
166 166
167 167 clean.lint: $(CLEAN_LINT_DEPS)
168 168
169 169 install: $(INSTALL_DEPS)
170 170
↓ open down ↓ |
170 lines elided |
↑ open up ↑ |
171 171 MAPFILE_32 = $(MAPFILE)
172 172 MAPFILE_64 = $(MAPFILE).amd64
173 173
174 174 MAPFILE_NAME = $(MAPFILE_$(CLASS))
175 175
176 176 $(UNIX_BIN): $(UNIX_O) $(MODSTUBS_O) $(MAPFILE_NAME) \
177 177 $(GENLIB) $(DTRACESTUBS) $(DBOOT_O)
178 178 $(LD) -dy -b -o $@ -e dboot_image -znointerp -M $(MAPFILE_NAME) \
179 179 $(UNIX_O) $(DBOOT_O) $(MODSTUBS_O) $(LIBOPTS) \
180 180 $(DTRACESTUBS)
181 - $(CTFMERGE_UNIQUIFY_AGAINST_GENUNIX)
181 + $(CTFMERGE_MODULE)
182 182 $(POST_PROCESS)
183 183
184 184 $(UNIX_O): $(OBJECTS) $(OBJS_DIR)/vers.o
185 185 $(LD) -r -o $@ $(OBJECTS) $(OBJS_DIR)/vers.o
186 186
187 187 $(DBOOT_BIN): $(DBOOT_OBJS_DIR) $(DBOOT_OBJECTS) dboot/Mapfile.dboot
188 188 $(LD) -dn -e _start -M dboot/Mapfile.dboot \
189 189 -o $(DBOOT_BIN) $(DBOOT_OBJECTS)
190 190
191 191 $(DBOOT_O): $(DBOOT_BIN)
192 192 @echo " .data" > $(DBOOT_S)
193 193 @echo " .globl dboot_image" >> $(DBOOT_S)
194 194 @echo "dboot_image:" >> $(DBOOT_S)
195 195 $(ELFEXTRACT) $(DBOOT_BIN) >> $(DBOOT_S)
196 196 $(COMPILE.s) -o $(DBOOT_O) $(DBOOT_S)
197 197
198 198 $(DBOOT_OBJS_DIR):
199 199 -@mkdir -p $@ 2> /dev/null
200 200
201 201 #
202 202 # Special rules for generating assym.h for inclusion in assembly files.
203 203 #
204 204 $(DSF_DIR)/$(OBJS_DIR)/assym.h $(DSF_DIR)/$(OBJS_DIR)/kdi_assym.h: FRC
205 205 @cd $(DSF_DIR); $(MAKE) all.targ
206 206
207 207 #
208 208 # The global lint target builds the kernel lint library (llib-lunix.ln)
209 209 # which is equivalent to a lint of /unix.o. Then all kernel modules for
210 210 # this architecture are linted against the kernel lint library.
211 211 #
212 212 # Note: lint errors in the kernel lint library will be repeated for
213 213 # each module. It is important that the kernel lint library
214 214 # be clean to keep the textual output to a reasonable level.
215 215 #
216 216
217 217 $(LINT_LIB): $(LINT_LIB_DIR) $(LINTS)
218 218 @pwd
219 219 @-$(ECHO) "\n$(UNIX): (library construction):"
220 220 @$(LINT) -o$(UNIX) $(LINTFLAGS) $(LINTS)
221 221 @$(MV) $(@F) $@
222 222
223 223 $(DBOOT_LINT_LIB): $(LINT_LIB_DIR) $(DBOOT_LINTS)
224 224 @pwd
225 225 @-$(ECHO) "\n$(DBOOT): (library construction):"
226 226 @$(LINT) -o$(DBOOT) $(DBOOT_LINTFLAGS) $(DBOOT_LINTS)
227 227 @$(MV) $(@F) $@
228 228
229 229 lintlib: $(LINT_DEPS)
230 230
231 231 #
232 232 # Include common targets.
233 233 #
234 234 include $(UTSBASE)/i86xpv/Makefile.targ
↓ open down ↓ |
43 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX