Print this page
6648 illumos build should be explicit about C standards
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/i86xpv/Makefile.rules
+++ new/usr/src/uts/i86xpv/Makefile.rules
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 defines the build rules for the directory uts/i86xpv
29 29 # and its children. These are the source files which are i86xpv
30 30 # "implementation architecture" dependent.
31 31 #
32 32 # The following two-level ordering must be maintained in this file.
33 33 #
34 34 # - Lines are sorted first in order of decreasing specificity based on
35 35 # the first directory component. That is, sun4u rules come before
36 36 # sparc rules come before common rules.
37 37 #
38 38 # - Lines whose initial directory components are equal are sorted
39 39 # alphabetically by the remaining components.
40 40 #
41 41
42 42 #
43 43 # We share many files with the i86pc implementation to reduce
44 44 # the amount of merge work
45 45 #
46 46
47 47 #
48 48 # Section 1a: C object build rules
49 49 #
50 50 $(OBJS_DIR)/%.o: $(UTSBASE)/i86xpv/conf/%.c
51 51 $(COMPILE.c) -o $@ $<
52 52 $(CTFCONVERT_O)
53 53
54 54 $(OBJS_DIR)/%.o: $(UTSBASE)/i86xpv/cpu/generic_cpu/%.c
55 55 $(COMPILE.c) -o $@ $<
56 56 $(CTFCONVERT_O)
57 57
58 58 $(OBJS_DIR)/%.o: $(UTSBASE)/i86xpv/io/%.c
59 59 $(COMPILE.c) -o $@ $<
60 60 $(CTFCONVERT_O)
61 61
62 62 $(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/ioat/%.c
63 63 $(COMPILE.c) -o $@ $<
64 64 $(CTFCONVERT_O)
65 65
66 66 $(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/pci/%.c
67 67 $(COMPILE.c) -o $@ $<
68 68 $(CTFCONVERT_O)
69 69
70 70 $(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/pciex/%.c
71 71 $(COMPILE.c) -o $@ $<
72 72 $(CTFCONVERT_O)
73 73
74 74 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/pciex/hotplug/%.c
75 75 $(COMPILE.c) -o $@ $<
76 76 $(CTFCONVERT_O)
77 77
78 78 $(OBJS_DIR)/%.o: $(UTSBASE)/i86xpv/io/psm/%.c
79 79 $(COMPILE.c) -o $@ $<
80 80 $(CTFCONVERT_O)
81 81
82 82 $(OBJS_DIR)/%.o: $(UTSBASE)/i86xpv/ml/%.s
83 83 $(COMPILE.s) -o $@ $<
84 84
85 85 $(OBJS_DIR)/%.o: $(UTSBASE)/i86xpv/os/%.c
86 86 $(COMPILE.c) -o $@ $<
87 87 $(CTFCONVERT_O)
88 88
89 89 $(OBJS_DIR)/%.o: $(UTSBASE)/i86xpv/vm/%.c
90 90 $(COMPILE.c) -o $@ $<
91 91 $(CTFCONVERT_O)
92 92
93 93 $(OBJS_DIR)/%.o: $(UTSBASE)/i86xpv/boot/%.c
94 94 $(COMPILE.c) -o $@ $<
95 95 $(CTFCONVERT_O)
96 96
97 97 $(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/boot/%.c
98 98 $(COMPILE.c) -o $@ $<
99 99 $(CTFCONVERT_O)
100 100
101 101 $(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/gfx_private/%.c
102 102 $(COMPILE.c) -o $@ $<
103 103 $(CTFCONVERT_O)
104 104
105 105 $(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/xsvc/%.c
106 106 $(COMPILE.c) -o $@ $<
107 107 $(CTFCONVERT_O)
108 108
109 109 $(OBJS_DIR)/%.o: $(UTSBASE)/common/io/pciex/%.c
110 110 $(COMPILE.c) -o $@ $<
111 111 $(CTFCONVERT_O)
112 112
113 113 # We need this one to make sure we share dtrace_subr.c with i86pc
114 114 # Otherwise we pick up common/os/dtrace_subr.c instead :(
115 115 # Note that only the non-commented versions of this hack end up
116 116 # in the lint section below.
117 117
118 118 $(OBJS_DIR)/dtrace_subr.o: $(UTSBASE)/i86pc/os/dtrace_subr.c
119 119 $(COMPILE.c) -o $@ $(UTSBASE)/i86pc/os/dtrace_subr.c
120 120 $(CTFCONVERT_O)
121 121
122 122 #
123 123 $(OBJS_DIR)/%.o: $(UTSBASE)/common/cpr/%.c
124 124 $(COMPILE.c) -o $@ $<
125 125 $(CTFCONVERT_O)
126 126
127 127 $(OBJS_DIR)/%.o: $(UTSBASE)/common/xen/io/%.c
128 128 $(COMPILE.c) -o $@ $<
129 129 $(CTFCONVERT_O)
130 130
131 131 $(OBJS_DIR)/%.o: $(UTSBASE)/common/xen/os/%.c
132 132 $(COMPILE.c) -o $@ $<
133 133 $(CTFCONVERT_O)
134 134
135 135 $(OBJS_DIR)/%.o: $(UTSBASE)/common/xen/dtrace/%.c
136 136 $(COMPILE.c) -o $@ $<
137 137 $(CTFCONVERT_O)
138 138
139 139 #
140 140 # Section 1b: Lint `object' build rules
141 141 #
142 142 $(LINTS_DIR)/%.ln: $(UTSBASE)/i86xpv/conf/%.c
143 143 @($(LHEAD) $(LINT.c) $< $(LTAIL))
144 144
145 145 $(LINTS_DIR)/%.ln: $(UTSBASE)/i86xpv/io/%.c
146 146 @($(LHEAD) $(LINT.c) $< $(LTAIL))
147 147
148 148 $(LINTS_DIR)/%.ln: $(UTSBASE)/i86xpv/io/psm/%.c
149 149 @($(LHEAD) $(LINT.c) $< $(LTAIL))
150 150
151 151 $(LINTS_DIR)/%.ln: $(UTSBASE)/i86xpv/ml/%.s
152 152 @($(LHEAD) $(LINT.s) $< $(LTAIL))
153 153
154 154 $(LINTS_DIR)/%.ln: $(UTSBASE)/i86xpv/os/%.c
155 155 @($(LHEAD) $(LINT.c) $< $(LTAIL))
156 156
157 157 $(LINTS_DIR)/%.ln: $(UTSBASE)/i86xpv/vm/%.c
158 158 @($(LHEAD) $(LINT.c) $< $(LTAIL))
159 159
160 160 $(LINTS_DIR)/%.ln: $(UTSBASE)/i86xpv/boot/%.c
161 161 @($(LHEAD) $(LINT.c) $< $(LTAIL))
162 162
163 163 $(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/boot/%.c
164 164 @($(LHEAD) $(LINT.c) $< $(LTAIL))
165 165
166 166 $(LINTS_DIR)/%.ln: $(UTSBASE)/common/xen/dtrace/%.c
167 167 @($(LHEAD) $(LINT.c) $< $(LTAIL))
168 168
169 169 # See note above.
170 170
171 171 $(LINTS_DIR)/dtrace_subr.ln: $(UTSBASE)/i86pc/os/dtrace_subr.c
172 172 @($(LHEAD) $(LINT.c) $(UTSBASE)/i86pc/os/dtrace_subr.c $(LTAIL))
173 173
174 174 #
175 175 # stuff for dboot
176 176 #
↓ open down ↓ |
176 lines elided |
↑ open up ↑ |
177 177 # This is different from i86pc - uses 64 bit compiler for 64 bit
178 178 #
179 179 # Note that we *don't* want to use the definitions that have been augmented
180 180 # by various bits of the context of the kernel build environment; so we
181 181 # start constructing flags and things afresh.
182 182
183 183 DBOOT_OBJS_DIR= dboot/$(OBJS_DIR)
184 184
185 185 DBOOT_XARCH_32 = $(i386_XARCH)
186 186 DBOOT_XARCH_64 = $(amd64_XARCH)
187 -DBOOT_CFLAGS = $(DBOOT_XARCH_$(CLASS)) $(CERRWARN) $(CCNOAUTOINLINE) -O
187 +DBOOT_CFLAGS = $(DBOOT_XARCH_$(CLASS)) $(C99MODE) $(CERRWARN) \
188 + $(CCNOAUTOINLINE) -O
188 189
189 190 DBOOT_AS_XARCH_32 = $(i386_AS_XARCH)
190 191 DBOOT_AS_XARCH_64 = $(amd64_AS_XARCH)
191 192 DBOOT_ASFLAGS = $(DBOOT_AS_XARCH_$(CLASS)) -P -D_ASM
192 193
193 194 DBOOT_LINTFLAGS_i86xpv = $(LINTFLAGS_i386_$(CLASS)) $(LINTTAGS_i386_$(CLASS))
194 195
195 196 $(DBOOT_OBJS_DIR)/%.o: $(UTSBASE)/common/xen/os/%.c
196 197 $(CC) $(DBOOT_CFLAGS) $(DBOOT_DEFS) $(DBOOT_CC_INCL) -c -o $@ $<
197 198
198 199 $(DBOOT_OBJS_DIR)/%.o: $(UTSBASE)/i86xpv/boot/%.c
199 200 $(CC) $(DBOOT_CFLAGS) $(DBOOT_DEFS) $(DBOOT_CC_INCL) -c -o $@ $<
200 201
201 202 $(DBOOT_OBJS_DIR)/%.o: $(UTSBASE)/i86pc/boot/%.c
202 203 $(CC) $(DBOOT_CFLAGS) $(DBOOT_DEFS) $(DBOOT_CC_INCL) -c -o $@ $<
203 204
204 205 $(DBOOT_OBJS_DIR)/%.o: $(UTSBASE)/i86pc/dboot/%.c
205 206 $(CC) $(DBOOT_CFLAGS) $(DBOOT_DEFS) $(DBOOT_CC_INCL) -c -o $@ $<
206 207
207 208 $(DBOOT_OBJS_DIR)/%.o: $(COMMONBASE)/util/%.c
208 209 $(CC) $(DBOOT_CFLAGS) $(DBOOT_DEFS) $(DBOOT_CC_INCL) -c -o $@ $<
209 210
210 211 $(DBOOT_OBJS_DIR)/%.o: $(UTSBASE)/i86xpv/os/%.c
211 212 $(CC) $(DBOOT_CFLAGS) $(DBOOT_DEFS) $(DBOOT_CC_INCL) -c -o $@ $<
212 213
213 214 $(DBOOT_OBJS_DIR)/%.o: $(UTSBASE)/intel/ia32/ml/%.s
214 215 $(AS) $(DBOOT_ASFLAGS) $(DBOOT_DEFS) $(DBOOT_AS_INCL) -o $@ $<
215 216
216 217 $(DBOOT_OBJS_DIR)/%.o: $(COMMONBASE)/util/i386/%.s
217 218 $(AS) $(DBOOT_ASFLAGS) $(DBOOT_DEFS) $(DBOOT_AS_INCL) -o $@ $<
218 219
219 220 $(DBOOT_OBJS_DIR)/%.o: $(UTSBASE)/i86xpv/ml/%.s
220 221 $(AS) $(DBOOT_ASFLAGS) $(DBOOT_DEFS) $(DBOOT_AS_INCL) -o $@ $<
221 222
222 223 $(DBOOT_OBJS_DIR)/%.o: $(UTSBASE)/i86pc/dboot/%.s
223 224 $(AS) $(DBOOT_ASFLAGS) $(DBOOT_DEFS) $(DBOOT_AS_INCL) -o $@ $<
224 225
225 226 include $(UTSBASE)/i86pc/Makefile.rules
226 227
227 228 DBOOT_DEFS += -D__xpv
228 229
229 230 $(LINTS_DIR)/%.ln: $(UTSBASE)/common/cpr/%.c
230 231 @($(LHEAD) $(LINT.c) $< $(LTAIL))
231 232
232 233 $(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/ioat/%.c
233 234 @($(LHEAD) $(LINT.c) $< $(LTAIL))
234 235
235 236 $(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/pci/%.c
236 237 @($(LHEAD) $(LINT.c) $< $(LTAIL))
237 238
238 239 $(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/pciex/%.c
239 240 @($(LHEAD) $(LINT.c) $< $(LTAIL))
240 241
241 242 $(LINTS_DIR)/%.ln: $(UTSBASE)/intel/io/pciex/hotplug/%.c
242 243 @($(LHEAD) $(LINT.c) $< $(LTAIL))
243 244
244 245 $(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/gfx_private/%.c
245 246 @($(LHEAD) $(LINT.c) $< $(LTAIL))
246 247
247 248 $(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/xsvc/%.c
248 249 @($(LHEAD) $(LINT.c) $< $(LTAIL))
249 250
250 251 $(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/pciex/%.c
251 252 @($(LHEAD) $(LINT.c) $< $(LTAIL))
252 253
253 254 $(LINTS_DIR)/%.ln: $(UTSBASE)/common/xen/io/%.c
254 255 @($(LHEAD) $(LINT.c) $< $(LTAIL))
255 256
256 257 $(LINTS_DIR)/%.ln: $(UTSBASE)/common/xen/os/%.c
257 258 @($(LHEAD) $(LINT.c) $< $(LTAIL))
258 259
259 260 $(DBOOT_LINTS_DIR)/%.ln: $(UTSBASE)/intel/ia32/ml/%.s
260 261 @($(LHEAD) $(DBOOT_LINT) $(DBOOT_LOCAL_LINTFLAGS) $< $(LTAIL))
261 262
262 263 $(DBOOT_LINTS_DIR)/%.ln: $(UTSBASE)/common/xen/os/%.c
263 264 @($(LHEAD) $(DBOOT_LINT) $(DBOOT_LOCAL_LINTFLAGS) $< $(LTAIL))
264 265
265 266 $(DBOOT_LINTS_DIR)/%.ln: $(UTSBASE)/i86xpv/os/%.c
266 267 @($(LHEAD) $(DBOOT_LINT) $(DBOOT_LOCAL_LINTFLAGS) $< $(LTAIL))
267 268
268 269 $(DBOOT_LINTS_DIR)/%.ln: $(UTSBASE)/i86xpv/ml/%.s
269 270 @($(LHEAD) $(DBOOT_LINT) $(DBOOT_LOCAL_LINTFLAGS) $< $(LTAIL))
270 271
271 272 $(DBOOT_LINTS_DIR)/%.ln: $(UTSBASE)/i86xpv/boot/%.c
272 273 @($(LHEAD) $(DBOOT_LINT) $(DBOOT_LOCAL_LINTFLAGS) $< $(LTAIL))
↓ open down ↓ |
75 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX