Print this page
OS-5601 comm page symbols need ctf augmentation
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Ryan Zezeski <ryan.zezeski@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Jerry Jelinek <jerry.jelinek@joyent.com>
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/uts/i86pc/unix/Makefile
+++ new/usr/src/uts/i86pc/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 # i86pc 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 MULTIBOOT = multiboot
42 42
43 43 OBJECTS = $(SPECIAL_OBJS:%=$(OBJS_DIR)/%) \
44 44 $(CORE_OBJS:%=$(OBJS_DIR)/%) \
45 45 $(KRTLD_OBJS:%=$(OBJS_DIR)/%) \
46 46 $(MACH_NOT_YET_KMODS:%=$(OBJS_DIR)/%)
47 47
48 48 LINTS = $(SPECIAL_OBJS:%.o=$(LINTS_DIR)/%.ln) \
49 49 $(CORE_OBJS:%.o=$(LINTS_DIR)/%.ln) \
50 50 $(KRTLD_OBJS:%.o=$(LINTS_DIR)/%.ln) \
51 51 $(MACH_NOT_YET_KMODS:%.o=$(LINTS_DIR)/%.ln) \
52 52 $(LINTS_DIR)/vers.ln \
53 53 $(LINTS_DIR)/modstubs.ln
54 54
55 55 ROOTMODULE = $(ROOT_PSM_KERN_DIR)/$(UNIX)
56 56 ROOT_MULTIBOOT = $(ROOT_PSM_DIR)/$(MULTIBOOT)
|
↓ open down ↓ |
56 lines elided |
↑ open up ↑ |
57 57
58 58 UNIX_BIN = $(OBJS_DIR)/$(UNIX)
59 59
60 60 LIBS = $(GENLIB)
61 61
62 62 GENUNIX = genunix
63 63 GENUNIX_DIR = ../../intel/$(GENUNIX)
64 64
65 65 LIBOPTS = -L $(GENUNIX_DIR)/$(OBJS_DIR) -l $(GENUNIX)
66 66
67 -CTFEXTRAOBJS = $(OBJS_DIR)/vers.o
67 +CTFEXTRAOBJS = $(OBJS_DIR)/vers.o $(OBJS_DIR)/comm_page_ctf.o
68 68
69 69 DBOOT_OBJS_DIR = dboot/$(OBJS_DIR)
70 70 DBOOT_OBJECTS = $(DBOOT_OBJS:%=$(DBOOT_OBJS_DIR)/%)
71 71 DBOOT_BIN = $(DBOOT_OBJS_DIR)/$(DBOOT)
72 72 DBOOT_O = $(OBJS_DIR)/$(DBOOT).o
73 73 DBOOT_S = $(DBOOT_O:%.o=%.s)
74 74 DBOOT_LINTS = $(DBOOT_OBJS:%.o=$(DBOOT_OBJS_DIR)/%.ln)
75 75 DBOOT_LINT = $(i386_LINT)
76 76 DBOOT_LINTTAGS = -erroff=E_STATIC_UNUSED
77 77
78 78 #
79 79 # Include common rules.
80 80 #
81 81 include $(UTSBASE)/i86pc/Makefile.i86pc
82 82
83 83 #
84 84 # Define targets
85 85 #
86 86 ALL_TARGET = $(UNIX_BIN) $(MULTIBOOT)
87 87 LINT_TARGET = $(LINT_LIB) $(DBOOT_LINT_LIB)
88 88 INSTALL_TARGET = $(UNIX_BIN) $(MULTIBOOT) $(ROOTMODULE) $(ROOT_MULTIBOOT)
89 89
|
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
90 90 #
91 91 # This is UNIX_DIR. Use a short path.
92 92 #
93 93 UNIX_DIR = .
94 94
95 95 #
96 96 # Overrides
97 97 #
98 98 CLEANFILES += \
99 99 $(UNIX_O) $(MODSTUBS_O) \
100 - $(OBJS_DIR)/vers.c $(OBJS_DIR)/vers.o \
100 + $(OBJS_DIR)/vers.c \
101 101 $(OBJS_DIR)/dtracestubs.s \
102 - $(DTRACESTUBS_O) $(DTRACESTUBS)
102 + $(DTRACESTUBS_O) $(DTRACESTUBS) \
103 + $(CTFEXTRAOBJS)
103 104
104 105 CLEANFILES += \
105 106 $(DBOOT_O) $(DBOOT_S) \
106 107 $(DBOOT_OBJECTS) \
107 108 $(OBJS_DIR)/bios_call_src.o \
108 109 $(OBJS_DIR)/bios_call_src \
109 110 $(OBJS_DIR)/bios_call.s \
110 111 $(DBOOT_BIN)
111 112
112 113 CLEANFILES += \
113 114 $(OBJS_DIR)/fb_swtch_src.o \
114 115 $(OBJS_DIR)/fb_swtch_src \
115 116 $(OBJS_DIR)/fb_swtch.s
116 117
117 118 CLEANFILES += \
118 119 $(ZLIB_OBJS:%.o=$(OBJS_DIR)/%.o) \
119 120 $(ZLIB_OBJS:%.o=$(OBJS_DIR)/%.ln)
120 121
121 122 CLOBBERFILES = $(CLEANFILES) $(UNIX_BIN) $(MULTIBOOT)
122 123 CLEANLINTFILES += $(LINT_LIB) $(DBOOT_LINT_LIB) $(DBOOT_LINTS)
123 124
124 125 # instr_size needs a special header
125 126 $(OBJS_DIR)/instr_size.o := EXTRA_OPTIONS = -I$(SRC)/common/dis/i386
126 127 $(OBJS_DIR)/instr_size.ln := EXTRA_OPTIONS = -I$(SRC)/common/dis/i386
127 128
128 129 CFLAGS += -DDIS_MEM
129 130
130 131 #
131 132 # For now, disable these lint checks; maintainers should endeavor
132 133 # to investigate and remove these for maximum lint coverage.
133 134 # Please do not carry these forward to new Makefiles.
134 135 #
135 136 LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
136 137 LINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
137 138 LINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
138 139 LINTTAGS += -erroff=E_STATIC_UNUSED
139 140 LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
140 141 LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
141 142
142 143 CERRWARN += -_gcc=-Wno-parentheses
143 144 CERRWARN += -_gcc=-Wno-uninitialized
144 145 CERRWARN += -_gcc=-Wno-char-subscripts
145 146 CERRWARN += -_gcc=-Wno-unused-variable
146 147 CERRWARN += -_gcc=-Wno-unused-function
147 148 CERRWARN += -_gcc=-Wno-unused-label
148 149 CERRWARN += -_gcc=-Wno-type-limits
149 150 CERRWARN += -_gcc=-Wno-clobbered
150 151 CERRWARN += -_gcc=-Wno-empty-body
151 152 CERRWARN += -_gcc=-Wno-unused-value
152 153
153 154 # Ensure that lint sees 'struct cpu' containing a fully declared
154 155 # embedded 'struct machcpu'
155 156 #
156 157 LINTFLAGS += -D_MACHDEP -I../../i86pc
157 158
158 159 #
159 160 # Default build targets.
160 161 #
161 162 .KEEP_STATE:
162 163
163 164 def: $(DEF_DEPS)
164 165
165 166 all: $(ALL_DEPS)
166 167
167 168 clean: $(CLEAN_DEPS)
168 169
169 170 clobber: $(CLOBBER_DEPS)
170 171
171 172 lint: $(LINT_DEPS)
172 173
173 174 clean.lint: $(CLEAN_LINT_DEPS)
174 175
175 176 install: $(INSTALL_DEPS)
176 177
177 178 MAPFILE_32 = $(MAPFILE)
178 179 MAPFILE_64 = $(MAPFILE).amd64
179 180
180 181 MAPFILE_NAME = $(MAPFILE_$(CLASS))
|
↓ open down ↓ |
68 lines elided |
↑ open up ↑ |
181 182
182 183 $(UNIX_BIN): $(UNIX_O) $(MODSTUBS_O) $(MAPFILE_NAME) \
183 184 $(GENLIB) $(DTRACESTUBS) $(DBOOT_O)
184 185 $(LD) -dy -b -o $@ -e dboot_image -znointerp -M $(MAPFILE_NAME) \
185 186 $(UNIX_O) $(DBOOT_O) $(MODSTUBS_O) $(LIBOPTS) \
186 187 $(DTRACESTUBS)
187 188 $(MBH_PATCH) $(UNIX_BIN)
188 189 $(CTFMERGE_UNIQUIFY_AGAINST_GENUNIX)
189 190 $(POST_PROCESS)
190 191
191 -$(UNIX_O): $(OBJECTS) $(OBJS_DIR)/vers.o
192 +$(UNIX_O): $(OBJECTS) $(CTFEXTRAOBJS)
192 193 $(LD) -r -o $@ $(OBJECTS) $(OBJS_DIR)/vers.o
193 194
194 195 $(DBOOT_BIN): $(DBOOT_OBJS_DIR) $(DBOOT_OBJECTS) dboot/Mapfile.dboot
195 196 $(LD) -dn -e _start -M dboot/Mapfile.dboot \
196 197 -o $(DBOOT_BIN) $(DBOOT_OBJECTS)
197 198
198 199 $(DBOOT_O): $(DBOOT_BIN)
199 200 @echo " .data" > $(DBOOT_S)
200 201 @echo " .globl dboot_image" >> $(DBOOT_S)
201 202 @echo "dboot_image:" >> $(DBOOT_S)
202 203 $(ELFEXTRACT) $(DBOOT_BIN) >> $(DBOOT_S)
203 204 $(COMPILE.s) -o $(DBOOT_O) $(DBOOT_S)
204 205
205 206 $(DBOOT_OBJS_DIR):
206 207 -@mkdir -p $@ 2> /dev/null
207 208
209 +$(OBJS_DIR)/comm_page_ctf.o: $(UTSBASE)/i86pc/ml/comm_page.s
210 + $(COMPILE.c) -_gcc=-xc -D_GENCTF -o $@ $(UTSBASE)/i86pc/ml/comm_page.s
211 + $(CTFCONVERT_O)
212 +
208 213 #
209 214 # dboot is built as an intermediate target in dboot.o, so just make
210 215 # dboot.o the dependency here.
211 216 #
212 217 $(MULTIBOOT): $(DBOOT_O)
213 218 $(CP) $(DBOOT_BIN) $(MULTIBOOT)
214 219 $(POST_PROCESS)
215 220
216 221 #
217 222 # Special rules for generating assym.h for inclusion in assembly files.
218 223 #
219 224 $(DSF_DIR)/$(OBJS_DIR)/assym.h $(DSF_DIR)/$(OBJS_DIR)/kdi_assym.h: FRC
220 225 @cd $(DSF_DIR); $(MAKE) all.targ
221 226
222 227 #
223 228 # The global lint target builds the kernel lint library (llib-lunix.ln)
224 229 # which is equivalent to a lint of /unix.o. Then all kernel modules for
225 230 # this architecture are linted against the kernel lint library.
226 231 #
227 232 # Note: lint errors in the kernel lint library will be repeated for
228 233 # each module. It is important that the kernel lint library
229 234 # be clean to keep the textual output to a reasonable level.
230 235 #
231 236
232 237 $(LINT_LIB): $(LINT_LIB_DIR) $(LINTS)
233 238 @pwd
234 239 @-$(ECHO) "\n$(UNIX): (library construction):"
235 240 @$(LINT) -o$(UNIX) $(LINTFLAGS) $(LINTS)
236 241 @$(MV) $(@F) $@
237 242
238 243 $(DBOOT_LINT_LIB): $(LINT_LIB_DIR) $(DBOOT_LINTS)
239 244 @pwd
240 245 @-$(ECHO) "\n$(DBOOT): (library construction):"
241 246 @$(LINT) -o$(DBOOT) $(DBOOT_LINTFLAGS) $(DBOOT_LINTS)
242 247 @$(MV) $(@F) $@
243 248
244 249 lintlib: $(LINT_DEPS)
245 250
246 251 #
247 252 # Include common targets.
248 253 #
249 254 include $(UTSBASE)/i86pc/Makefile.targ
|
↓ open down ↓ |
32 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX