Print this page
5196 The cw wrapper restricts gcc to -O2
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/sun4u/Makefile.sun4u
+++ new/usr/src/uts/sun4u/Makefile.sun4u
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
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
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 2010 Sun Microsystems, Inc. All rights reserved.
24 24 # Use is subject to license terms.
25 25 # Copyright (c) 2013 Andrew Stormont. All rights reserved.
26 +# Copyright 2014 Gary Mills
26 27 #
27 28 # This makefile contains the common definitions for the sun4u unix
28 29 # and all sun4u implementation architecture dependent modules.
29 30 #
30 31
31 32 #
32 33 # Machine type (implementation architecture):
33 34 #
34 35 PLATFORM = sun4u
35 36 PROMIF = ieee1275
36 37 PSMBASE = $(UTSBASE)/../psm
37 38
38 39 #
39 40 # uname -m value
40 41 #
41 42 UNAME_M = $(PLATFORM)
42 43
43 44 #
44 45 # Definitions for the platform-specific /platform directories.
45 46 #
46 47 # PLATFORMS designates those sun4u machines which have no platform
47 48 # specific code.
48 49 #
49 50 # IMPLEMENTATIONS is used to designate sun4u machines which do have
50 51 # platform specific modules (perhaps including their own unix). All
51 52 # code specific to a given implementation resides in the appropriately
52 53 # named subdirectory. This requires these platforms to have their
53 54 # own Makefiles to define ROOT_PLAT_DIRS, USR_PLAT_DIRS, etc.
54 55 #
55 56 # So if we had an implementation named 'foo', we would need the following
56 57 # Makefiles in the foo subdirectory:
57 58 #
58 59 # sun4u/foo/Makefile
59 60 # sun4u/foo/Makefile.foo
60 61 # sun4u/foo/Makefile.targ
61 62 #
62 63
63 64 #
64 65 # /usr/platform/$(IMPLEMENTED_PLATFORM) is created as a directory that
65 66 # all the $(LINKED_PLATFORMS) link to.
66 67 #
67 68 IMPLEMENTED_PLATFORM = SUNW,Ultra-2
68 69
69 70 LINKED_PLATFORMS += SUNW,Ultra-30
70 71 LINKED_PLATFORMS += SUNW,Ultra-60
71 72
72 73 #
73 74 # all PLATFORMS that do not belong in the $(IMPLEMENTATIONS) list
74 75 # ie. all desktop platforms
75 76 #
76 77 PLATFORMS = $(IMPLEMENTED_PLATFORM)
77 78 PLATFORMS += $(LINKED_PLATFORMS)
78 79
79 80 ROOT_PLAT_DIRS = $(PLATFORMS:%=$(ROOT_PLAT_DIR)/%)
80 81 USR_PLAT_DIRS = $(PLATFORMS:%=$(USR_PLAT_DIR)/%)
81 82
82 83 USR_DESKTOP_DIR = $(USR_PLAT_DIR)/$(IMPLEMENTED_PLATFORM)
83 84 USR_DESKTOP_INC_DIR = $(USR_DESKTOP_DIR)/include
84 85 USR_DESKTOP_SBIN_DIR = $(USR_DESKTOP_DIR)/sbin
85 86 USR_DESKTOP_LIB_DIR = $(USR_DESKTOP_DIR)/lib
86 87
87 88 #
88 89 # Welcome to SPARC V9.
89 90 #
90 91
91 92 #
92 93 # Define supported builds
93 94 #
94 95 DEF_BUILDS = $(DEF_BUILDS64)
95 96 ALL_BUILDS = $(ALL_BUILDS64)
96 97
97 98 #
98 99 # Everybody needs to know how to build modstubs.o and to locate unix.o
99 100 #
100 101 UNIX_DIR = $(UTSBASE)/$(PLATFORM)/unix
101 102 GENLIB_DIR = $(UTSBASE)/$(PLATFORM)/genunix
102 103 MODSTUBS_DIR = $(UNIX_DIR)
103 104 DSF_DIR = $(UTSBASE)/$(PLATFORM)/genassym
104 105 LINTS_DIR = $(OBJS_DIR)
105 106 LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/lint-libs/$(OBJS_DIR)
106 107
107 108 DTRACESTUBS_O = $(OBJS_DIR)/dtracestubs.o
108 109 DTRACESTUBS = $(OBJS_DIR)/libdtracestubs.so
109 110
110 111 UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
111 112 MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o
112 113 GENLIB = $(GENLIB_DIR)/$(OBJS_DIR)/libgenunix.so
113 114
114 115 LINT_LIB = $(LINT_LIB_DIR)/llib-lunix.ln
115 116 GEN_LINT_LIB = $(LINT_LIB_DIR)/llib-lgenunix.ln
116 117
117 118 LINT64_DIRS = $(LINT64_BUILDS:%=$(UTSBASE)/$(PLATFORM)/lint-libs/%)
118 119 LINT64_FILES = $(LINT64_DIRS:%=%/llib-l$(MODULE).ln)
119 120
120 121 #
121 122 # cpu and platform modules need to know how to build their own symcheck module
122 123 #
123 124 PLATMOD = platmod
124 125 PLATLIB = $(PLAT_DIR)/$(OBJS_DIR)/libplatmod.so
125 126
126 127 CPUNAME = cpu
127 128 CPULIB = $(CPU_DIR)/$(OBJS_DIR)/libcpu.so
128 129
129 130 SYM_MOD = $(OBJS_DIR)/unix.sym
130 131
131 132 #
132 133 # Include the makefiles which define build rule templates, the
133 134 # collection of files per module, and a few specific flags. Note
134 135 # that order is significant, just as with an include path. The
135 136 # first build rule template which matches the files name will be
136 137 # used. By including these in order from most machine dependent
137 138 # to most machine independent, we allow a machine dependent file
138 139 # to be used in preference over a machine independent version
139 140 # (Such as a machine specific optimization, which preserves the
140 141 # interfaces.)
141 142 #
142 143 include $(UTSBASE)/sun4/Makefile.files
143 144 include $(UTSBASE)/$(PLATFORM)/Makefile.files
144 145 include $(UTSBASE)/sfmmu/Makefile.files
145 146 include $(UTSBASE)/sparc/v9/Makefile.files
146 147 include $(UTSBASE)/sparc/Makefile.files
147 148 include $(UTSBASE)/sun/Makefile.files
148 149 include $(SRC)/psm/promif/$(PROMIF)/common/Makefile.files
149 150 include $(SRC)/psm/promif/$(PROMIF)/$(PLATFORM)/Makefile.files
150 151 include $(UTSBASE)/common/Makefile.files
151 152
152 153 #
153 154 # Include machine independent rules. Note that this does not imply
154 155 # that the resulting module from rules in Makefile.uts is machine
155 156 # independent. Only that the build rules are machine independent.
156 157 #
157 158 include $(UTSBASE)/Makefile.uts
158 159
159 160 # These come after Makefile.uts.
160 161 IMPLEMENTATIONS = tazmo
161 162 IMPLEMENTATIONS += starfire
162 163 IMPLEMENTATIONS += javelin
163 164 IMPLEMENTATIONS += darwin
164 165 IMPLEMENTATIONS += quasar
165 166 IMPLEMENTATIONS += grover
166 167 IMPLEMENTATIONS += enchilada
167 168 IMPLEMENTATIONS += taco
168 169 IMPLEMENTATIONS += mpxu
169 170 IMPLEMENTATIONS += excalibur
170 171 IMPLEMENTATIONS += montecarlo
171 172 IMPLEMENTATIONS += serengeti
172 173 IMPLEMENTATIONS += littleneck
173 174 IMPLEMENTATIONS += starcat
174 175 IMPLEMENTATIONS += daktari
175 176 IMPLEMENTATIONS += cherrystone
176 177 IMPLEMENTATIONS += fjlite
177 178 IMPLEMENTATIONS += snowbird
178 179 IMPLEMENTATIONS += schumacher
179 180 IMPLEMENTATIONS += blade
180 181 IMPLEMENTATIONS += boston
181 182 IMPLEMENTATIONS += seattle
182 183 IMPLEMENTATIONS += chicago
183 184 IMPLEMENTATIONS += sunfire
↓ open down ↓ |
148 lines elided |
↑ open up ↑ |
184 185 IMPLEMENTATIONS += lw8
185 186 IMPLEMENTATIONS += makaha
186 187 IMPLEMENTATIONS += opl
187 188 IMPLEMENTATIONS += lw2plus
188 189
189 190 #
190 191 # machine specific optimization, override default in Makefile.master
191 192 #
192 193 CC_XARCH = -m64 -xarch=sparcvis
193 194 AS_XARCH = -xarch=v9a
194 -COPTIMIZE = -xO3
195 +COPTIMIZE = -_cc=-xO3 -_gcc=-O2
195 196 CCMODE = -Xa
196 197
197 198 CFLAGS = -xchip=ultra $(CCABS32) $(CCREGSYM)
198 199 CFLAGS += $(CC_XARCH)
199 200 CFLAGS += $(COPTIMIZE)
200 201 CFLAGS += $(EXTRA_CFLAGS)
201 202 CFLAGS += $(XAOPT)
202 203 CFLAGS += $(INLINES) -D_ASM_INLINES
203 204 CFLAGS += $(CCMODE)
204 205 CFLAGS += $(SPACEFLAG)
205 206 CFLAGS += $(CERRWARN)
206 207 CFLAGS += $(CTF_FLAGS_$(CLASS))
207 208 CFLAGS += $(C99MODE)
208 209 CFLAGS += $(CCUNBOUND)
209 210 CFLAGS += $(CCNOAUTOINLINE)
210 211 CFLAGS += $(CCSTATICSYM)
211 212 CFLAGS += $(CC32BITCALLERS)
212 213 CFLAGS += $(IROPTFLAG)
213 214 CFLAGS += $(CGLOBALSTATIC)
214 215 CFLAGS += -xregs=no%float
215 216 CFLAGS += -xstrconst
216 217 CFLAGS += $(CSOURCEDEBUGFLAGS)
217 218 CFLAGS += $(CUSERFLAGS)
218 219
219 220 ASFLAGS += $(AS_XARCH)
220 221
221 222 AS_INC_PATH += -I$(DSF_DIR)/$(OBJS_DIR)
222 223
223 224 LINT_KMODS += $(GENUNIX_KMODS)
224 225
225 226 LINT_DEFS = -m64
226 227
227 228 #
228 229 # The following must be defined for all implementations:
229 230 #
230 231 # MAPFILE: ld mapfile for the build of kernel/unix.
231 232 # MODSTUBS: Module stubs source file.
232 233 # GENCONST_SRC: genconst.c
233 234 # OFFSETS: offsets.in
234 235 # PLATFORM_OFFSETS: Platform specific mach_offsets.in
235 236 # FDOFFSETS: fd_offsets.in
236 237 #
237 238 MAPFILE = $(UTSBASE)/sun4/conf/Mapfile
238 239 MODSTUBS = $(UTSBASE)/sparc/ml/modstubs.s
239 240 GENCONST_SRC = $(UTSBASE)/sun4/ml/genconst.c
240 241 OFFSETS = $(UTSBASE)/sun4/ml/offsets.in
241 242 PLATFORM_OFFSETS = $(UTSBASE)/sun4u/ml/mach_offsets.in
242 243 FDOFFSETS = $(UTSBASE)/sun/io/fd_offsets.in
243 244
244 245 #
245 246 # Define the actual specific platforms
246 247 #
247 248
248 249 MACHINE_DEFS = -D$(PLATFORM) -D_MACHDEP -DSFMMU
249 250
250 251 #
251 252 # Software workarounds for hardware "features"
252 253 #
253 254
254 255 include $(UTSBASE)/$(PLATFORM)/Makefile.workarounds
255 256
256 257 #
257 258 # Debugging level
258 259 #
259 260 # Special knowledge of which special debugging options effect which
260 261 # file is used to optimize the build if these flags are changed.
261 262 #
262 263 # XXX: The above could possibly be done for more flags and files, but
263 264 # is left as an experiment to the interested reader. Be forewarned,
264 265 # that excessive use could lead to maintenance difficulties.
265 266 #
266 267 # Note: kslice can be enabled for the sun4u, but is disabled by default
267 268 # in all cases.
268 269 #
269 270
270 271 DEBUG_DEFS_OBJ64 =
271 272 DEBUG_DEFS_DBG64 = -DDEBUG
272 273 DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE))
273 274
274 275 DEBUG_COND_OBJ64 = $(POUND_SIGN)
275 276 DEBUG_COND_DBG64 =
276 277 IF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/
277 278
278 279 $(IF_DEBUG_OBJ)trap.o := DEBUG_DEFS += -DTRAPDEBUG
279 280 $(IF_DEBUG_OBJ)mach_trap.o := DEBUG_DEFS += -DTRAPDEBUG
280 281 $(IF_DEBUG_OBJ)syscall_trap.o := DEBUG_DEFS += -DSYSCALLTRACE
281 282 $(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=0
282 283
283 284 IF_TRAPTRACE_OBJ = $(IF_DEBUG_OBJ)
284 285 # comment this out for a non-debug kernel with TRAPTRACE
285 286 #IF_TRAPTRACE_OBJ = $(OBJS_DIR)/
286 287
287 288 $(IF_TRAPTRACE_OBJ)mach_locore.o := DEBUG_DEFS += -DTRAPTRACE
288 289 $(IF_TRAPTRACE_OBJ)mlsetup.o := DEBUG_DEFS += -DTRAPTRACE
289 290 $(IF_TRAPTRACE_OBJ)syscall_trap.o := DEBUG_DEFS += -DTRAPTRACE
290 291 $(IF_TRAPTRACE_OBJ)startup.o := DEBUG_DEFS += -DTRAPTRACE
291 292 $(IF_TRAPTRACE_OBJ)mach_startup.o := DEBUG_DEFS += -DTRAPTRACE
292 293 $(IF_TRAPTRACE_OBJ)mp_startup.o := DEBUG_DEFS += -DTRAPTRACE
293 294 $(IF_TRAPTRACE_OBJ)cpu_states.o := DEBUG_DEFS += -DTRAPTRACE
294 295 $(IF_TRAPTRACE_OBJ)mach_cpu_states.o := DEBUG_DEFS += -DTRAPTRACE
295 296 $(IF_TRAPTRACE_OBJ)interrupt.o := DEBUG_DEFS += -DTRAPTRACE
296 297 $(IF_TRAPTRACE_OBJ)mach_interrupt.o := DEBUG_DEFS += -DTRAPTRACE
297 298 $(IF_TRAPTRACE_OBJ)sfmmu_asm.o := DEBUG_DEFS += -DTRAPTRACE
298 299 $(IF_TRAPTRACE_OBJ)trap_table.o := DEBUG_DEFS += -DTRAPTRACE
299 300 $(IF_TRAPTRACE_OBJ)xc.o := DEBUG_DEFS += -DTRAPTRACE
300 301 $(IF_TRAPTRACE_OBJ)mach_xc.o := DEBUG_DEFS += -DTRAPTRACE
301 302 $(IF_TRAPTRACE_OBJ)wbuf.o := DEBUG_DEFS += -DTRAPTRACE
302 303 $(IF_TRAPTRACE_OBJ)trap.o := DEBUG_DEFS += -DTRAPTRACE
303 304 $(IF_TRAPTRACE_OBJ)mach_trap.o := DEBUG_DEFS += -DTRAPTRACE
304 305 $(IF_TRAPTRACE_OBJ)x_call.o := DEBUG_DEFS += -DTRAPTRACE
305 306 $(IF_TRAPTRACE_OBJ)spitfire_asm.o := DEBUG_DEFS += -DTRAPTRACE
306 307 $(IF_TRAPTRACE_OBJ)us3_common_asm.o := DEBUG_DEFS += -DTRAPTRACE
307 308 $(IF_TRAPTRACE_OBJ)us3_cheetah_asm.o := DEBUG_DEFS += -DTRAPTRACE
308 309 $(IF_TRAPTRACE_OBJ)us3_cheetahplus_asm.o := DEBUG_DEFS += -DTRAPTRACE
309 310 $(IF_TRAPTRACE_OBJ)us3_jalapeno_asm.o := DEBUG_DEFS += -DTRAPTRACE
310 311 $(IF_TRAPTRACE_OBJ)opl_olympus_asm.o := DEBUG_DEFS += -DTRAPTRACE
311 312
312 313 # Comment these out if you don't want dispatcher lock statistics.
313 314
314 315 #$(IF_DEBUG_OBJ)lock_prim.o := DEBUG_DEFS += -DDISP_LOCK_STATS
315 316 #$(IF_DEBUG_OBJ)disp.o := DEBUG_DEFS += -DDISP_LOCK_STATS
316 317
317 318 # Comment these out if you don't want dispatcher debugging
318 319
319 320 #$(IF_DEBUG_OBJ)lock_prim.o := DEBUG_DEFS += -DDISP_DEBUG
320 321
321 322 #
322 323 # Collect the preprocessor definitions to be associated with *all*
323 324 # files.
324 325 #
325 326 ALL_DEFS = $(MACHINE_DEFS) $(WORKAROUND_DEFS) $(DEBUG_DEFS) \
326 327 $(OPTION_DEFS)
327 328 GENCONST_DEFS = $(MACHINE_DEFS) $(OPTION_DEFS)
328 329
329 330 #
330 331 # ----- TRANSITIONAL SECTION --------------------------------------------------
331 332 #
332 333
333 334 #
334 335 # Not everything which *should* be a module is a module yet. The
335 336 # following is a list of such objects which are currently part of
336 337 # the base kernel but should soon become kmods.
337 338 #
338 339 MACH_NOT_YET_KMODS = $(AUTOCONF_OBJS)
339 340
340 341 #
341 342 # ----- END OF TRANSITIONAL SECTION -------------------------------------------
342 343 #
343 344
344 345 #
345 346 # The kernels modules which are "implementation architecture"
346 347 # specific for this machine are enumerated below. Note that most
347 348 # of these modules must exist (in one form or another) for each
348 349 # architecture.
349 350 #
350 351 # Common Drivers (usually pseudo drivers) (/kernel/drv):
351 352 #
352 353
353 354 #
354 355 # Machine Specific Driver Modules (/kernel/drv):
355 356 #
356 357 # XXX: How many of these are really machine specific?
357 358 #
358 359 DRV_KMODS += bbc_beep
359 360 DRV_KMODS += cpc
360 361 DRV_KMODS += fd
361 362 DRV_KMODS += rootnex sbusmem upa64s zs zsh
362 363 DRV_KMODS += sbus
363 364 DRV_KMODS += pcisch pcipsy simba
364 365 DRV_KMODS += px
365 366 DRV_KMODS += ebus
366 367 DRV_KMODS += su
367 368 DRV_KMODS += tod
368 369 DRV_KMODS += power
369 370 DRV_KMODS += epic
370 371 DRV_KMODS += grbeep
371 372 DRV_KMODS += pcf8584 max1617 seeprom tda8444 pca9556
372 373 DRV_KMODS += ics951601 adm1031
373 374 DRV_KMODS += lm75 ltc1427 pcf8591 pcf8574 ssc050 ssc100
374 375 DRV_KMODS += pic16f819
375 376 DRV_KMODS += pic16f747
376 377 DRV_KMODS += adm1026
377 378 DRV_KMODS += us
378 379 DRV_KMODS += ppm schppm jbusppm
379 380 DRV_KMODS += mc-us3
380 381 DRV_KMODS += mc-us3i
381 382 DRV_KMODS += smbus
382 383 DRV_KMODS += db21554
383 384 DRV_KMODS += gpio_87317
384 385 DRV_KMODS += isadma
385 386 DRV_KMODS += sbbc
386 387 DRV_KMODS += pmubus
387 388 DRV_KMODS += pmugpio
388 389 DRV_KMODS += pmc
389 390 DRV_KMODS += trapstat
390 391 DRV_KMODS += rmc_comm
391 392 DRV_KMODS += rmcadm
392 393 DRV_KMODS += rmclomv
393 394 DRV_KMODS += sf
394 395 DRV_KMODS += nxge
395 396 DRV_KMODS += i2bsc
396 397 DRV_KMODS += mem_cache
397 398
398 399 #
399 400 # Exec Class Modules (/kernel/exec):
400 401 #
401 402 EXEC_KMODS +=
402 403
403 404 #
404 405 # Scheduling Class Modules (/kernel/sched):
405 406 #
406 407 SCHED_KMODS +=
407 408
408 409 #
409 410 # File System Modules (/kernel/fs):
410 411 #
411 412 FS_KMODS +=
412 413
413 414 #
414 415 # Streams Modules (/kernel/strmod):
415 416 #
416 417 STRMOD_KMODS += kb
417 418
418 419 #
419 420 # 'System' Modules (/kernel/sys):
420 421 #
421 422 SYS_KMODS +=
422 423
423 424 #
424 425 # 'User' Modules (/kernel/misc):
425 426 #
426 427 MISC_KMODS += bignum
427 428 MISC_KMODS += obpsym bootdev vis cpr platmod md5 sha1 i2c_svc
428 429 MISC_KMODS += sbd
429 430
430 431 MISC_KMODS += opl_cfg
431 432 MISC_KMODS += zuluvm
432 433 MISC_KMODS += gptwo_cpu gptwocfg
433 434 MISC_KMODS += pcie
434 435
435 436 #
436 437 # Brand modules
437 438 #
438 439 BRAND_KMODS += sn1_brand s10_brand
439 440
440 441 #
441 442 # Software Cryptographic Providers (/kernel/crypto):
442 443 #
443 444 CRYPTO_KMODS += aes
444 445 CRYPTO_KMODS += arcfour
445 446 CRYPTO_KMODS += des
446 447
447 448 #
448 449 # generic-unix module (/kernel/genunix):
449 450 #
450 451 GENUNIX_KMODS += genunix
451 452
452 453 # 'User' "Modules" excluded from the Full Kernel lint target:
453 454 #
454 455
455 456 #
456 457 # Modules eXcluded from the product:
457 458 #
458 459 XMODS +=
459 460
460 461 #
461 462 # cpu modules
462 463 #
463 464 CPU_KMODS += cheetah cheetahplus jalapeno serrano spitfire hummingbird
464 465
465 466 #
466 467 # sun4u 'TOD' Modules (/platform/.../kernel/tod):
467 468 #
468 469 TOD_KMODS += todds1287 todds1337 todmostek todstarfire
469 470 TOD_KMODS += todm5819 todblade todbq4802 todsg todopl
470 471 TOD_KMODS += todm5819p_rmc todstarcat
471 472
472 473 #
473 474 # Performance Counter BackEnd Modules (/usr/kernel/pcbe):
474 475 #
475 476 PCBE_KMODS += us234_pcbe
476 477 PCBE_KMODS += opl_pcbe
↓ open down ↓ |
272 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX