Print this page
*** NO COMMENTS ***
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/Makefile.master
+++ new/usr/src/Makefile.master
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 (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 # Copyright (c) 2012 by Delphix. All rights reserved.
25 25 #
26 26
27 27 #
28 28 # Makefile.master, global definitions for system source
29 29 #
30 30 ROOT= /proto
31 31
32 32 #
33 33 # RELEASE_BUILD should be cleared for final release builds.
34 34 # NOT_RELEASE_BUILD is exactly what the name implies.
35 35 #
36 36 # INTERNAL_RELEASE_BUILD is a subset of RELEASE_BUILD. It mostly controls
37 37 # identification strings. Enabling RELEASE_BUILD automatically enables
38 38 # INTERNAL_RELEASE_BUILD.
39 39 #
40 40 # EXPORT_RELEASE_BUILD controls whether binaries are built in a form that
41 41 # can be released for export under a binary license. It is orthogonal to
42 42 # the other *RELEASE_BUILD settings. ("#" means do an export release
43 43 # build, "" means do a normal build.)
44 44 #
45 45 # CLOSED_BUILD controls whether we try to build files under
46 46 # usr/closed. ("" means to build closed code, "#" means don't try to
47 47 # build it.) Skipping the closed code implies doing an export release
48 48 # build.
49 49 #
50 50 # STRIP_COMMENTS toggles comment section striping. Generally the same setting
51 51 # as INTERNAL_RELEASE_BUILD.
52 52 #
53 53 # __GNUC toggles the building of ON components using gcc and related tools.
54 54 # Normally set to `#', set it to `' to do gcc build.
55 55 #
56 56 # The declaration POUND_SIGN is always '#'. This is needed to get around the
57 57 # make feature that '#' is always a comment delimiter, even when escaped or
58 58 # quoted. We use this macro expansion method to get POUND_SIGN rather than
59 59 # always breaking out a shell because the general case can cause a noticable
60 60 # slowdown in build times when so many Makefiles include Makefile.master.
61 61 #
62 62 # While the majority of users are expected to override the setting below
63 63 # with an env file (via nightly or bldenv), if you aren't building that way
64 64 # (ie, you're using "ws" or some other bootstrapping method) then you need
65 65 # this definition in order to avoid the subshell invocation mentioned above.
66 66 #
67 67
68 68 PRE_POUND= pre\#
69 69 POUND_SIGN= $(PRE_POUND:pre\%=%)
70 70
71 71 NOT_RELEASE_BUILD=
72 72 INTERNAL_RELEASE_BUILD= $(POUND_SIGN)
73 73 RELEASE_BUILD= $(POUND_SIGN)
74 74 $(RELEASE_BUILD)NOT_RELEASE_BUILD= $(POUND_SIGN)
75 75 $(RELEASE_BUILD)INTERNAL_RELEASE_BUILD=
76 76 PATCH_BUILD= $(POUND_SIGN)
77 77
78 78 # If CLOSED_IS_PRESENT is not set, assume the closed tree is present.
79 79 CLOSED_BUILD_1= $(CLOSED_IS_PRESENT:yes=)
80 80 CLOSED_BUILD= $(CLOSED_BUILD_1:no=$(POUND_SIGN))
81 81
82 82 EXPORT_RELEASE_BUILD= $(POUND_SIGN)
83 83 $(CLOSED_BUILD)EXPORT_RELEASE_BUILD=
84 84
85 85 # SPARC_BLD is '#' for an Intel build.
86 86 # INTEL_BLD is '#' for a Sparc build.
87 87 SPARC_BLD_1= $(MACH:i386=$(POUND_SIGN))
88 88 SPARC_BLD= $(SPARC_BLD_1:sparc=)
89 89 INTEL_BLD_1= $(MACH:sparc=$(POUND_SIGN))
90 90 INTEL_BLD= $(INTEL_BLD_1:i386=)
91 91
92 92 STRIP_COMMENTS= $(INTERNAL_RELEASE_BUILD)
93 93
94 94 # Are we building tonic closedbins? Unless you have used the
95 95 # -O flag to nightly or bldenv, leave the definition of TONICBUILD
96 96 # as $(POUND_SIGN).
97 97 #
98 98 # IF YOU CHANGE CLOSEDROOT, you MUST change install.bin
99 99 # to match the new definition.
100 100 TONICBUILD= $(POUND_SIGN)
101 101 $(TONICBUILD)CLOSEDROOT= $(ROOT)-closed
102 102
103 103
104 104 # The variables below control the compilers used during the build.
105 105 # There are a number of permutations.
106 106 #
107 107 # __GNUC and __SUNC control (and indicate) the primary compiler. Whichever
108 108 # one is not POUND_SIGN is the primary, with the other as the shadow. They
109 109 # may also be used to control entirely compiler-specific Makefile assignments.
110 110 # __SUNC and Sun Studio are the default.
111 111 #
112 112 # __GNUC64 indicates that the 64bit build should use the GNU C compiler.
113 113 # There is no Sun C analogue.
114 114 #
115 115 # The following version-specific options are operative regardless of which
116 116 # compiler is primary, and control the versions of the given compilers to be
117 117 # used. They also allow compiler-version specific Makefile fragments.
118 118 #
119 119 # __SSNEXT when set to the empty string enables options specific to the 'next'
120 120 # version of the Sun Studio compiler.
121 121 #
122 122 # __GNUC3 when the empty string uses and refers to GCC 3.x, it is the default.
123 123 # __GNUC4 when the empty string uses and refers to GCC 4.x.
124 124
125 125 __GNUC= $(POUND_SIGN)
126 126 $(__GNUC)__SUNC= $(POUND_SIGN)
127 127 __GNUC64= $(__GNUC)
128 128
129 129 __SSNEXT= $(POUND_SIGN)
130 130
131 131 __GNUC3=
132 132 __GNUC4= $(POUND_SIGN)
133 133 $(__GNUC4)__GNUC3= $(POUND_SIGN)
134 134
135 135 # CLOSED is the root of the tree that contains source which isn't released
136 136 # as open source
137 137 CLOSED= $(SRC)/../closed
138 138
139 139 # BUILD_TOOLS is the root of all tools including compilers.
140 140 # ONBLD_TOOLS is the root of all the tools that are part of SUNWonbld.
141 141
142 142 BUILD_TOOLS= /ws/onnv-tools
143 143 ONBLD_TOOLS= $(BUILD_TOOLS)/onbld
144 144
145 145 JAVA_ROOT= /usr/java
146 146
147 147 SFW_ROOT= /usr/sfw
148 148 SFWINCDIR= $(SFW_ROOT)/include
149 149 SFWLIBDIR= $(SFW_ROOT)/lib
150 150 SFWLIBDIR64= $(SFW_ROOT)/lib/$(MACH64)
151 151
152 152 $(__GNUC3)GCC_ROOT= $(SFW_ROOT)
153 153 $(__GNUC4)GCC_ROOT= /opt/gcc/4.4.4
154 154 GCCLIBDIR= $(GCC_ROOT)/lib
155 155 GCCLIBDIR64= $(GCC_ROOT)/lib/$(MACH64)
156 156
157 157 RPCGEN= /usr/bin/rpcgen
158 158 STABS= $(ONBLD_TOOLS)/bin/$(MACH)/stabs
159 159 ELFEXTRACT= $(ONBLD_TOOLS)/bin/$(MACH)/elfextract
160 160 MBH_PATCH= $(ONBLD_TOOLS)/bin/$(MACH)/mbh_patch
161 161 ECHO= echo
162 162 INS= install
163 163 TRUE= true
164 164 SYMLINK= /usr/bin/ln -s
165 165 LN= /usr/bin/ln
166 166 CHMOD= /usr/bin/chmod
167 167 MV= /usr/bin/mv -f
168 168 RM= /usr/bin/rm -f
169 169 CUT= /usr/bin/cut
170 170 NM= /usr/ccs/bin/nm
171 171 DIFF= /usr/bin/diff
172 172 GREP= /usr/bin/grep
173 173 EGREP= /usr/bin/egrep
174 174 ELFWRAP= /usr/bin/elfwrap
175 175 KSH93= /usr/bin/ksh93
176 176 SED= /usr/bin/sed
177 177 NAWK= /usr/bin/nawk
178 178 CP= /usr/bin/cp -f
179 179 MCS= /usr/ccs/bin/mcs
180 180 CAT= /usr/bin/cat
181 181 ELFDUMP= /usr/ccs/bin/elfdump
182 182 M4= /usr/ccs/bin/m4
183 183 STRIP= /usr/ccs/bin/strip
184 184 LEX= /usr/ccs/bin/lex
185 185 FLEX= $(SFW_ROOT)/bin/flex
186 186 YACC= /usr/ccs/bin/yacc
187 187 CPP= /usr/lib/cpp
188 188 JAVAC= $(JAVA_ROOT)/bin/javac
189 189 JAVAH= $(JAVA_ROOT)/bin/javah
190 190 JAVADOC= $(JAVA_ROOT)/bin/javadoc
191 191 RMIC= $(JAVA_ROOT)/bin/rmic
192 192 JAR= $(JAVA_ROOT)/bin/jar
↓ open down ↓ |
192 lines elided |
↑ open up ↑ |
193 193 CTFCONVERT= $(ONBLD_TOOLS)/bin/$(MACH)/ctfconvert
194 194 CTFMERGE= $(ONBLD_TOOLS)/bin/$(MACH)/ctfmerge
195 195 CTFSTABS= $(ONBLD_TOOLS)/bin/$(MACH)/ctfstabs
196 196 NDRGEN= $(ONBLD_TOOLS)/bin/$(MACH)/ndrgen
197 197 GENOFFSETS= $(ONBLD_TOOLS)/bin/genoffsets
198 198 CTFCVTPTBL= $(ONBLD_TOOLS)/bin/ctfcvtptbl
199 199 CTFFINDMOD= $(ONBLD_TOOLS)/bin/ctffindmod
200 200 XREF= $(ONBLD_TOOLS)/bin/xref
201 201 FIND= /usr/bin/find
202 202 PERL= /usr/bin/perl
203 -PYTHON_24= /usr/bin/python2.4
204 203 PYTHON_26= /usr/bin/python2.6
205 -PYTHON= $(PYTHON_24)
204 +PYTHON= $(PYTHON_26)
206 205 SORT= /usr/bin/sort
207 206 TOUCH= /usr/bin/touch
208 207 WC= /usr/bin/wc
209 208 XARGS= /usr/bin/xargs
210 209 ELFEDIT= /usr/bin/elfedit
211 210 ELFSIGN= /usr/bin/elfsign
212 211 DTRACE= /usr/sbin/dtrace -xnolibs
213 212 UNIQ= /usr/bin/uniq
214 213 TAR= /usr/bin/tar
215 214
216 215 FILEMODE= 644
217 216 DIRMODE= 755
218 217
219 218 #
220 219 # The version of the patch makeup table optimized for build-time use. Used
221 220 # during patch builds only.
222 221 $(PATCH_BUILD)PMTMO_FILE=$(SRC)/patch_makeup_table.mo
223 222
224 223 # Declare that nothing should be built in parallel.
225 224 # Individual Makefiles can use the .PARALLEL target to declare otherwise.
226 225 .NO_PARALLEL:
227 226
228 227 # For stylistic checks
229 228 #
230 229 # Note that the X and C checks are not used at this time and may need
231 230 # modification when they are actually used.
232 231 #
233 232 CSTYLE= $(ONBLD_TOOLS)/bin/cstyle
234 233 CSTYLE_TAIL=
235 234 HDRCHK= $(ONBLD_TOOLS)/bin/hdrchk
236 235 HDRCHK_TAIL=
237 236 JSTYLE= $(ONBLD_TOOLS)/bin/jstyle
238 237
239 238 DOT_H_CHECK= \
240 239 @$(ECHO) "checking $<"; $(CSTYLE) $< $(CSTYLE_TAIL); \
241 240 $(HDRCHK) $< $(HDRCHK_TAIL)
242 241
243 242 DOT_X_CHECK= \
244 243 @$(ECHO) "checking $<"; $(RPCGEN) -C -h $< | $(CSTYLE) $(CSTYLE_TAIL); \
245 244 $(RPCGEN) -C -h $< | $(HDRCHK) $< $(HDRCHK_TAIL)
246 245
247 246 DOT_C_CHECK= \
248 247 @$(ECHO) "checking $<"; $(CSTYLE) $< $(CSTYLE_TAIL)
249 248
250 249 MANIFEST_CHECK= \
251 250 @$(ECHO) "checking $<"; \
252 251 SVCCFG_DTD=$(SRC)/cmd/svc/dtd/service_bundle.dtd.1 \
253 252 SVCCFG_REPOSITORY=$(SRC)/cmd/svc/seed/global.db \
254 253 SVCCFG_CONFIGD_PATH=$(SRC)/cmd/svc/configd/svc.configd-native \
255 254 $(SRC)/cmd/svc/svccfg/svccfg-native validate $<
256 255
257 256 #
258 257 # IMPORTANT:: If you change any of INS.file, INS.dir, INS.rename,
259 258 # INS.link or INS.symlink here, then you must also change the
260 259 # corresponding override definitions in $CLOSED/Makefile.tonic.
261 260 # If you do not do this, then the closedbins build for the OpenSolaris
262 261 # community will break. PS, the gatekeepers will be upset too.
263 262 INS.file= $(RM) $@; $(INS) -s -m $(FILEMODE) -f $(@D) $<
264 263 INS.dir= $(INS) -s -d -m $(DIRMODE) $@
265 264 # installs and renames at once
266 265 #
267 266 INS.rename= $(INS.file); $(MV) $(@D)/$(<F) $@
268 267
269 268 # install a link
270 269 INSLINKTARGET= $<
271 270 INS.link= $(RM) $@; $(LN) $(INSLINKTARGET) $@
272 271 INS.symlink= $(RM) $@; $(SYMLINK) $(INSLINKTARGET) $@
273 272
274 273 #
275 274 # Python bakes the mtime of the .py file into the compiled .pyc and
276 275 # rebuilds if the baked-in mtime != the mtime of the source file
277 276 # (rather than only if it's less than), thus when installing python
278 277 # files we must make certain to not adjust the mtime of the source
279 278 # (.py) file.
280 279 #
281 280 INS.pyfile= $(INS.file); $(TOUCH) -r $< $@
282 281
283 282 # MACH must be set in the shell environment per uname -p on the build host
284 283 # More specific architecture variables should be set in lower makefiles.
285 284 #
286 285 # MACH64 is derived from MACH, and BUILD64 is set to `#' for
287 286 # architectures on which we do not build 64-bit versions.
288 287 # (There are no such architectures at the moment.)
289 288 #
290 289 # Set BUILD64=# in the environment to disable 64-bit amd64
291 290 # builds on i386 machines.
292 291
293 292 MACH64_1= $(MACH:sparc=sparcv9)
294 293 MACH64= $(MACH64_1:i386=amd64)
295 294
296 295 MACH32_1= $(MACH:sparc=sparcv7)
297 296 MACH32= $(MACH32_1:i386=i86)
298 297
299 298 sparc_BUILD64=
300 299 i386_BUILD64=
301 300 BUILD64= $($(MACH)_BUILD64)
302 301
303 302 #
304 303 # C compiler mode. Future compilers may change the default on us,
305 304 # so force extended ANSI mode globally. Lower level makefiles can
306 305 # override this by setting CCMODE.
307 306 #
308 307 CCMODE= -Xa
309 308 CCMODE64= -Xa
310 309
311 310 #
312 311 # C compiler verbose mode. This is so we can enable it globally,
313 312 # but turn it off in the lower level makefiles of things we cannot
314 313 # (or aren't going to) fix.
315 314 #
316 315 CCVERBOSE= -v
317 316
318 317 # set this to the secret flag "-Wc,-Qiselect-v9abiwarn=1" to get warnings
319 318 # from the compiler about places the -xarch=v9 may differ from -xarch=v9c.
320 319 V9ABIWARN=
321 320
322 321 # set this to the secret flag "-Wc,-Qiselect-regsym=0" to disable register
323 322 # symbols (used to detect conflicts between objects that use global registers)
324 323 # we disable this now for safety, and because genunix doesn't link with
325 324 # this feature (the v9 default) enabled.
326 325 #
327 326 # REGSYM is separate since the C++ driver syntax is different.
328 327 CCREGSYM= -Wc,-Qiselect-regsym=0
329 328 CCCREGSYM= -Qoption cg -Qiselect-regsym=0
330 329
331 330 # Prevent the removal of static symbols by the SPARC code generator (cg).
332 331 # The x86 code generator (ube) does not remove such symbols and as such
333 332 # using this workaround is not applicable for x86.
334 333 #
335 334 CCSTATICSYM= -Wc,-Qassembler-ounrefsym=0
336 335 #
337 336 # generate 32-bit addresses in the v9 kernel. Saves memory.
338 337 CCABS32= -Wc,-xcode=abs32
339 338 #
340 339 # generate v9 code which tolerates callers using the v7 ABI, for the sake of
341 340 # system calls.
342 341 $(__GNUC4)CC32BITCALLERS= -_gcc=-massume-32bit-callers
343 342
344 343 # GCC, especially, is increasingly beginning to auto-inline functions and
345 344 # sadly does so separately not under the general -fno-inline-functions
346 345 $(__GNUC4)CCNOAUTOINLINE= -_gcc=-fno-inline-small-functions \
347 346 -_gcc=-fno-inline-functions-called-once
348 347
349 348 # One optimization the compiler might perform is to turn this:
350 349 # #pragma weak foo
351 350 # extern int foo;
352 351 # if (&foo)
353 352 # foo = 5;
354 353 # into
355 354 # foo = 5;
356 355 # Since we do some of this (foo might be referenced in common kernel code
357 356 # but provided only for some cpu modules or platforms), we disable this
358 357 # optimization.
359 358 #
360 359 sparc_CCUNBOUND = -Wd,-xsafe=unboundsym
361 360 i386_CCUNBOUND =
362 361 CCUNBOUND = $($(MACH)_CCUNBOUND)
363 362
364 363 #
365 364 # compiler '-xarch' flag. This is here to centralize it and make it
366 365 # overridable for testing.
367 366 sparc_XARCH= -m32
368 367 sparcv9_XARCH= -m64
369 368 i386_XARCH=
370 369 amd64_XARCH= -m64 -Ui386 -U__i386
371 370
372 371 # assembler '-xarch' flag. Different from compiler '-xarch' flag.
373 372 sparc_AS_XARCH= -xarch=v8plus
374 373 sparcv9_AS_XARCH= -xarch=v9
375 374 i386_AS_XARCH=
376 375 amd64_AS_XARCH= -xarch=amd64 -P -Ui386 -U__i386
377 376
378 377 #
379 378 # These flags define what we need to be 'standalone' i.e. -not- part
380 379 # of the rather more cosy userland environment. This basically means
381 380 # the kernel.
382 381 #
383 382 # XX64 future versions of gcc will make -mcmodel=kernel imply -mno-red-zone
384 383 #
385 384 sparc_STAND_FLAGS= -_gcc=-ffreestanding
386 385 sparcv9_STAND_FLAGS= -_gcc=-ffreestanding
387 386 # Disabling MMX also disables 3DNow, disabling SSE also disables all later
388 387 # additions to SSE (SSE2, AVX ,etc.)
389 388 NO_SIMD= -_gcc=-mno-mmx -_gcc=-mno-sse
390 389 i386_STAND_FLAGS= -_gcc=-ffreestanding $(NO_SIMD)
391 390 amd64_STAND_FLAGS= -xmodel=kernel $(NO_SIMD)
392 391
393 392 SAVEARGS= -Wu,-save_args
394 393 amd64_STAND_FLAGS += $(SAVEARGS)
395 394
396 395 STAND_FLAGS_32 = $($(MACH)_STAND_FLAGS)
397 396 STAND_FLAGS_64 = $($(MACH64)_STAND_FLAGS)
398 397
399 398 #
400 399 # disable the incremental linker
401 400 ILDOFF= -xildoff
402 401 #
403 402 XDEPEND= -xdepend
404 403 XFFLAG= -xF=%all
405 404 XESS= -xs
406 405 XSTRCONST= -xstrconst
407 406
408 407 #
409 408 # turn warnings into errors (C)
410 409 CERRWARN = -errtags=yes -errwarn=%all
411 410 CERRWARN += -erroff=E_EMPTY_TRANSLATION_UNIT
412 411 CERRWARN += -erroff=E_STATEMENT_NOT_REACHED
413 412
414 413 # Normally cw(1) would translate -v into a set of options including these
415 414 # but as they're GCC 4.x specific, we can't do that
416 415 $(__GNUC4)CERRWARN += -_gcc=-Wno-address -_gcc=-Wno-array-bounds
417 416
418 417 #
419 418 # turn warnings into errors (C++)
420 419 CCERRWARN= -xwe
421 420
422 421 # C99 mode
423 422 C99_ENABLE= -xc99=%all
424 423 C99_DISABLE= -xc99=%none
425 424 C99MODE= $(C99_DISABLE)
426 425 C99LMODE= $(C99MODE:-xc99%=-Xc99%)
427 426
428 427 # In most places, assignments to these macros should be appended with +=
429 428 # (CPPFLAGS.master allows values to be prepended to CPPFLAGS).
430 429 sparc_CFLAGS= $(sparc_XARCH) $(CCSTATICSYM)
431 430 sparcv9_CFLAGS= $(sparcv9_XARCH) -dalign $(CCVERBOSE) $(V9ABIWARN) $(CCREGSYM) \
432 431 $(CCSTATICSYM)
433 432 i386_CFLAGS= $(i386_XARCH)
434 433 amd64_CFLAGS= $(amd64_XARCH)
435 434
436 435 sparc_ASFLAGS= $(sparc_AS_XARCH)
437 436 sparcv9_ASFLAGS=$(sparcv9_AS_XARCH)
438 437 i386_ASFLAGS= $(i386_AS_XARCH)
439 438 amd64_ASFLAGS= $(amd64_AS_XARCH)
440 439
441 440 #
442 441 sparc_COPTFLAG= -xO3
443 442 sparcv9_COPTFLAG= -xO3
444 443 i386_COPTFLAG= -O
445 444 amd64_COPTFLAG= -xO3
446 445
447 446 COPTFLAG= $($(MACH)_COPTFLAG)
448 447 COPTFLAG64= $($(MACH64)_COPTFLAG)
449 448
450 449 # When -g is used, the compiler globalizes static objects
451 450 # (gives them a unique prefix). Disable that.
452 451 CNOGLOBAL= -W0,-noglobal
453 452
454 453 # Direct the Sun Studio compiler to use a static globalization prefix based on the
455 454 # name of the module rather than something unique. Otherwise, objects
456 455 # will not build deterministically, as subsequent compilations of identical
457 456 # source will yeild objects that always look different.
458 457 #
459 458 # In the same spirit, this will also remove the date from the N_OPT stab.
460 459 CGLOBALSTATIC= -W0,-xglobalstatic
461 460
462 461 # Sometimes we want all symbols and types in debugging information even
463 462 # if they aren't used.
464 463 CALLSYMS= -W0,-xdbggen=no%usedonly
465 464
466 465 #
467 466 # Default debug format for Sun Studio 11 is dwarf, so force it to
468 467 # generate stabs.
469 468 #
470 469 DEBUGFORMAT= -xdebugformat=stabs
471 470
472 471 #
473 472 # Flags used to build in debug mode for ctf generation. Bugs in the Devpro
474 473 # compilers currently prevent us from building with cc-emitted DWARF.
475 474 #
476 475 CTF_FLAGS_sparc = -g -Wc,-Qiselect-T1 $(C99MODE) $(CNOGLOBAL) $(CDWARFSTR)
477 476 CTF_FLAGS_i386 = -g $(C99MODE) $(CNOGLOBAL) $(CDWARFSTR)
478 477 CTF_FLAGS = $(CTF_FLAGS_$(MACH)) $(DEBUGFORMAT)
479 478
480 479 #
481 480 # Flags used with genoffsets
482 481 #
483 482 GOFLAGS = -_noecho \
484 483 $(CALLSYMS) \
485 484 $(CDWARFSTR)
486 485
487 486 OFFSETS_CREATE = $(GENOFFSETS) -s $(CTFSTABS) -r $(CTFCONVERT) \
488 487 $(CC) $(GOFLAGS) $(CFLAGS) $(CPPFLAGS)
489 488
490 489 OFFSETS_CREATE64 = $(GENOFFSETS) -s $(CTFSTABS) -r $(CTFCONVERT) \
491 490 $(CC) $(GOFLAGS) $(CFLAGS64) $(CPPFLAGS)
492 491
493 492 #
494 493 # tradeoff time for space (smaller is better)
495 494 #
496 495 sparc_SPACEFLAG = -xspace -W0,-Lt
497 496 sparcv9_SPACEFLAG = -xspace -W0,-Lt
498 497 i386_SPACEFLAG = -xspace
499 498 amd64_SPACEFLAG =
500 499
501 500 SPACEFLAG = $($(MACH)_SPACEFLAG)
502 501 SPACEFLAG64 = $($(MACH64)_SPACEFLAG)
503 502
504 503 #
505 504 # The Sun Studio 11 compiler has changed the behaviour of integer
506 505 # wrap arounds and so a flag is needed to use the legacy behaviour
507 506 # (without this flag panics/hangs could be exposed within the source).
508 507 #
509 508 sparc_IROPTFLAG = -W2,-xwrap_int
510 509 sparcv9_IROPTFLAG = -W2,-xwrap_int
511 510 i386_IROPTFLAG =
512 511 amd64_IROPTFLAG =
513 512
514 513 IROPTFLAG = $($(MACH)_IROPTFLAG)
515 514 IROPTFLAG64 = $($(MACH64)_IROPTFLAG)
516 515
517 516 sparc_XREGSFLAG = -xregs=no%appl
518 517 sparcv9_XREGSFLAG = -xregs=no%appl
519 518 i386_XREGSFLAG =
520 519 amd64_XREGSFLAG =
521 520
522 521 XREGSFLAG = $($(MACH)_XREGSFLAG)
523 522 XREGSFLAG64 = $($(MACH64)_XREGSFLAG)
524 523
525 524 CFLAGS= $(COPTFLAG) $($(MACH)_CFLAGS) $(SPACEFLAG) $(CCMODE) \
526 525 $(ILDOFF) $(CERRWARN) $(C99MODE) $(CCUNBOUND) $(IROPTFLAG) \
527 526 $(CGLOBALSTATIC) $(CCNOAUTOINLINE)
528 527 CFLAGS64= $(COPTFLAG64) $($(MACH64)_CFLAGS) $(SPACEFLAG64) $(CCMODE64) \
529 528 $(ILDOFF) $(CERRWARN) $(C99MODE) $(CCUNBOUND) $(IROPTFLAG64) \
530 529 $(CGLOBALSTATIC) $(CCNOAUTOINLINE)
531 530 #
532 531 # Flags that are used to build parts of the code that are subsequently
533 532 # run on the build machine (also known as the NATIVE_BUILD).
534 533 #
535 534 NATIVE_CFLAGS= $(COPTFLAG) $($(NATIVE_MACH)_CFLAGS) $(CCMODE) \
536 535 $(ILDOFF) $(CERRWARN) $(C99MODE) $($(NATIVE_MACH)_CCUNBOUND) \
537 536 $(IROPTFLAG) $(CGLOBALSTATIC) $(CCNOAUTOINLINE)
538 537
539 538 DTEXTDOM=-DTEXT_DOMAIN=\"$(TEXT_DOMAIN)\" # For messaging.
540 539 DTS_ERRNO=-D_TS_ERRNO
541 540 CPPFLAGS.master=$(DTEXTDOM) $(DTS_ERRNO) \
542 541 $(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) $(ENVCPPFLAGS4)
543 542 CPPFLAGS.native=$(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) $(ENVCPPFLAGS4)
544 543 CPPFLAGS= $(CPPFLAGS.master)
545 544 AS_CPPFLAGS= $(CPPFLAGS.master)
546 545 JAVAFLAGS= -deprecation
547 546
548 547 #
549 548 # For source message catalogue
550 549 #
551 550 .SUFFIXES: $(SUFFIXES) .i .po
552 551 MSGROOT= $(ROOT)/catalog
553 552 MSGDOMAIN= $(MSGROOT)/$(TEXT_DOMAIN)
554 553 MSGDOMAINPOFILE = $(MSGDOMAIN)/$(POFILE)
555 554 DCMSGDOMAIN= $(MSGROOT)/LC_TIME/$(TEXT_DOMAIN)
556 555 DCMSGDOMAINPOFILE = $(DCMSGDOMAIN)/$(DCFILE:.dc=.po)
557 556
558 557 CLOBBERFILES += $(POFILE) $(POFILES)
559 558 COMPILE.cpp= $(CC) -E -C $(CFLAGS) $(CPPFLAGS)
560 559 XGETTEXT= /usr/bin/xgettext
561 560 XGETFLAGS= -c TRANSLATION_NOTE
562 561 GNUXGETTEXT= /usr/gnu/bin/xgettext
563 562 GNUXGETFLAGS= --add-comments=TRANSLATION_NOTE --keyword=_ \
564 563 --strict --no-location --omit-header
565 564 BUILD.po= $(XGETTEXT) $(XGETFLAGS) -d $(<F) $<.i ;\
566 565 $(RM) $@ ;\
567 566 $(SED) "/^domain/d" < $(<F).po > $@ ;\
568 567 $(RM) $(<F).po $<.i
569 568
570 569 #
571 570 # This is overwritten by local Makefile when PROG is a list.
572 571 #
573 572 POFILE= $(PROG).po
574 573
575 574 sparc_CCFLAGS= -cg92 -compat=4 \
576 575 -Qoption ccfe -messages=no%anachronism \
577 576 $(CCERRWARN)
578 577 sparcv9_CCFLAGS= $(sparcv9_XARCH) -dalign -compat=5 \
579 578 -Qoption ccfe -messages=no%anachronism \
580 579 -Qoption ccfe -features=no%conststrings \
581 580 $(CCCREGSYM) \
582 581 $(CCERRWARN)
583 582 i386_CCFLAGS= -compat=4 \
584 583 -Qoption ccfe -messages=no%anachronism \
585 584 -Qoption ccfe -features=no%conststrings \
586 585 $(CCERRWARN)
587 586 amd64_CCFLAGS= $(amd64_XARCH) -compat=5 \
588 587 -Qoption ccfe -messages=no%anachronism \
589 588 -Qoption ccfe -features=no%conststrings \
590 589 $(CCERRWARN)
591 590
592 591 sparc_CCOPTFLAG= -O
593 592 sparcv9_CCOPTFLAG= -O
594 593 i386_CCOPTFLAG= -O
595 594 amd64_CCOPTFLAG= -O
596 595
597 596 CCOPTFLAG= $($(MACH)_CCOPTFLAG)
598 597 CCOPTFLAG64= $($(MACH64)_CCOPTFLAG)
599 598 CCFLAGS= $(CCOPTFLAG) $($(MACH)_CCFLAGS)
600 599 CCFLAGS64= $(CCOPTFLAG64) $($(MACH64)_CCFLAGS)
601 600
602 601 #
603 602 #
604 603 #
605 604 ELFWRAP_FLAGS =
606 605 ELFWRAP_FLAGS64 = -64
607 606
608 607 #
609 608 # Various mapfiles that are used throughout the build, and delivered to
610 609 # /usr/lib/ld.
611 610 #
612 611 MAPFILE.NED_i386 = $(SRC)/common/mapfiles/common/map.noexdata
613 612 MAPFILE.NED_sparc =
614 613 MAPFILE.NED = $(MAPFILE.NED_$(MACH))
615 614 MAPFILE.PGA = $(SRC)/common/mapfiles/common/map.pagealign
616 615 MAPFILE.NES = $(SRC)/common/mapfiles/common/map.noexstk
617 616 MAPFILE.FLT = $(SRC)/common/mapfiles/common/map.filter
618 617 MAPFILE.LEX = $(SRC)/common/mapfiles/common/map.lex.yy
619 618
620 619 #
621 620 # Generated mapfiles that are compiler specific, and used throughout the
622 621 # build. These mapfiles are not delivered in /usr/lib/ld.
623 622 #
624 623 MAPFILE.NGB_sparc= $(SRC)/common/mapfiles/gen/sparc_cc_map.noexeglobs
625 624 $(__GNUC64)MAPFILE.NGB_sparc= \
626 625 $(SRC)/common/mapfiles/gen/sparc_gcc_map.noexeglobs
627 626 MAPFILE.NGB_sparcv9= $(SRC)/common/mapfiles/gen/sparcv9_cc_map.noexeglobs
628 627 $(__GNUC64)MAPFILE.NGB_sparcv9= \
629 628 $(SRC)/common/mapfiles/gen/sparcv9_gcc_map.noexeglobs
630 629 MAPFILE.NGB_i386= $(SRC)/common/mapfiles/gen/i386_cc_map.noexeglobs
631 630 $(__GNUC64)MAPFILE.NGB_i386= \
632 631 $(SRC)/common/mapfiles/gen/i386_gcc_map.noexeglobs
633 632 MAPFILE.NGB_amd64= $(SRC)/common/mapfiles/gen/amd64_cc_map.noexeglobs
634 633 $(__GNUC64)MAPFILE.NGB_amd64= \
635 634 $(SRC)/common/mapfiles/gen/amd64_gcc_map.noexeglobs
636 635 MAPFILE.NGB = $(MAPFILE.NGB_$(MACH))
637 636
638 637 #
639 638 # A generic interface mapfile name, used by various dynamic objects to define
640 639 # the interfaces and interposers the object must export.
641 640 #
642 641 MAPFILE.INT = mapfile-intf
643 642
644 643 #
645 644 # LDLIBS32 can be set in the environment to override the following assignment.
646 645 # LDLIBS64 can be set to override the assignment made in Makefile.master.64.
647 646 # These environment settings make sure that no libraries are searched outside
648 647 # of the local workspace proto area:
649 648 # LDLIBS32=-YP,$ROOT/lib:$ROOT/usr/lib
650 649 # LDLIBS64=-YP,$ROOT/lib/$MACH64:$ROOT/usr/lib/$MACH64
651 650 #
652 651 LDLIBS32 = $(ENVLDLIBS1) $(ENVLDLIBS2) $(ENVLDLIBS3)
653 652 LDLIBS.cmd = $(LDLIBS32)
654 653 LDLIBS.lib = $(LDLIBS32)
655 654 #
656 655 # Define compilation macros.
657 656 #
658 657 COMPILE.c= $(CC) $(CFLAGS) $(CPPFLAGS) -c
659 658 COMPILE64.c= $(CC) $(CFLAGS64) $(CPPFLAGS) -c
660 659 COMPILE.cc= $(CCC) $(CCFLAGS) $(CPPFLAGS) -c
661 660 COMPILE64.cc= $(CCC) $(CCFLAGS64) $(CPPFLAGS) -c
662 661 COMPILE.s= $(AS) $(ASFLAGS) $(AS_CPPFLAGS)
663 662 COMPILE64.s= $(AS) $(ASFLAGS) $($(MACH64)_AS_XARCH) $(AS_CPPFLAGS)
664 663 COMPILE.d= $(DTRACE) -G -32
665 664 COMPILE64.d= $(DTRACE) -G -64
666 665 COMPILE.b= $(ELFWRAP) $(ELFWRAP_FLAGS$(CLASS))
667 666 COMPILE64.b= $(ELFWRAP) $(ELFWRAP_FLAGS$(CLASS))
668 667
669 668 CLASSPATH= .
670 669 COMPILE.java= $(JAVAC) $(JAVAFLAGS) -classpath $(CLASSPATH)
671 670
672 671 #
673 672 # Link time macros
674 673 #
675 674 CCNEEDED = -lC
676 675 CCEXTNEEDED = -lCrun -lCstd
677 676 $(__GNUC)CCNEEDED = -L$(GCCLIBDIR) -R$(GCCLIBDIR) -lstdc++ -lgcc_s
678 677 $(__GNUC)CCEXTNEEDED = $(CCNEEDED)
679 678
680 679 LINK.c= $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
681 680 LINK64.c= $(CC) $(CFLAGS64) $(CPPFLAGS) $(LDFLAGS)
682 681 NORUNPATH= -norunpath -nolib
683 682 LINK.cc= $(CCC) $(CCFLAGS) $(CPPFLAGS) $(NORUNPATH) \
684 683 $(LDFLAGS) $(CCNEEDED)
685 684 LINK64.cc= $(CCC) $(CCFLAGS64) $(CPPFLAGS) $(NORUNPATH) \
686 685 $(LDFLAGS) $(CCNEEDED)
687 686
688 687 #
689 688 # lint macros
690 689 #
691 690 # Note that the undefine of __PRAGMA_REDEFINE_EXTNAME can be removed once
692 691 # ON is built with a version of lint that has the fix for 4484186.
693 692 #
694 693 ALWAYS_LINT_DEFS = -errtags=yes -s
695 694 ALWAYS_LINT_DEFS += -erroff=E_PTRDIFF_OVERFLOW
696 695 ALWAYS_LINT_DEFS += -erroff=E_ASSIGN_NARROW_CONV
697 696 ALWAYS_LINT_DEFS += -U__PRAGMA_REDEFINE_EXTNAME
698 697 ALWAYS_LINT_DEFS += $(C99LMODE)
699 698 ALWAYS_LINT_DEFS += -errsecurity=$(SECLEVEL)
700 699 ALWAYS_LINT_DEFS += -erroff=E_SEC_CREAT_WITHOUT_EXCL
701 700 ALWAYS_LINT_DEFS += -erroff=E_SEC_FORBIDDEN_WARN_CREAT
702 701 # XX64 -- really only needed for amd64 lint
703 702 ALWAYS_LINT_DEFS += -erroff=E_ASSIGN_INT_TO_SMALL_INT
704 703 ALWAYS_LINT_DEFS += -erroff=E_CAST_INT_CONST_TO_SMALL_INT
705 704 ALWAYS_LINT_DEFS += -erroff=E_CAST_INT_TO_SMALL_INT
706 705 ALWAYS_LINT_DEFS += -erroff=E_CAST_TO_PTR_FROM_INT
707 706 ALWAYS_LINT_DEFS += -erroff=E_COMP_INT_WITH_LARGE_INT
708 707 ALWAYS_LINT_DEFS += -erroff=E_INTEGRAL_CONST_EXP_EXPECTED
709 708 ALWAYS_LINT_DEFS += -erroff=E_PASS_INT_TO_SMALL_INT
710 709 ALWAYS_LINT_DEFS += -erroff=E_PTR_CONV_LOSES_BITS
711 710
712 711 # This forces lint to pick up note.h and sys/note.h from Devpro rather than
713 712 # from the proto area. The note.h that ON delivers would disable NOTE().
714 713 ONLY_LINT_DEFS = -I$(SPRO_VROOT)/prod/include/lint
715 714
716 715 SECLEVEL= core
717 716 LINT.c= $(LINT) $(ONLY_LINT_DEFS) $(LINTFLAGS) $(CPPFLAGS) \
718 717 $(ALWAYS_LINT_DEFS)
719 718 LINT64.c= $(LINT) $(ONLY_LINT_DEFS) $(LINTFLAGS64) $(CPPFLAGS) \
720 719 $(ALWAYS_LINT_DEFS)
721 720 LINT.s= $(LINT.c)
722 721
723 722 # For some future builds, NATIVE_MACH and MACH might be different.
724 723 # Therefore, NATIVE_MACH needs to be redefined in the
725 724 # environment as `uname -p` to override this macro.
726 725 #
727 726 # For now at least, we cross-compile amd64 on i386 machines.
728 727 NATIVE_MACH= $(MACH:amd64=i386)
729 728
730 729 # Define native compilation macros
731 730 #
732 731
733 732 # Base directory where compilers are loaded.
734 733 # Defined here so it can be overridden by developer.
735 734 #
736 735 SPRO_ROOT= $(BUILD_TOOLS)/SUNWspro
737 736 SPRO_VROOT= $(SPRO_ROOT)/SS12
738 737 GNU_ROOT= $(SFW_ROOT)
739 738
740 739 # Till SS12u1 formally becomes the NV CBE, LINT is hard
741 740 # coded to be picked up from the $SPRO_ROOT/sunstudio12.1/
742 741 # location. Impacted variables are sparc_LINT, sparcv9_LINT,
743 742 # i386_LINT, amd64_LINT.
744 743 # Reset them when SS12u1 is rolled out.
745 744 #
746 745
747 746 # Specify platform compiler versions for languages
748 747 # that we use (currently only c and c++).
749 748 #
750 749 sparc_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc
751 750 $(__GNUC)sparc_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc
752 751 sparc_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC
753 752 $(__GNUC)sparc_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++
754 753 sparc_CPP= /usr/ccs/lib/cpp
755 754 sparc_AS= /usr/ccs/bin/as -xregsym=no
756 755 sparc_LD= /usr/ccs/bin/ld
757 756 sparc_LINT= $(SPRO_ROOT)/sunstudio12.1/bin/lint
758 757
759 758 sparcv9_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc
760 759 $(__GNUC64)sparcv9_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc
761 760 sparcv9_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC
762 761 $(__GNUC64)sparcv9_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++
763 762 sparcv9_CPP= /usr/ccs/lib/cpp
764 763 sparcv9_AS= /usr/ccs/bin/as -xregsym=no
765 764 sparcv9_LD= /usr/ccs/bin/ld
766 765 sparcv9_LINT= $(SPRO_ROOT)/sunstudio12.1/bin/lint
767 766
768 767 i386_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc
769 768 $(__GNUC)i386_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc
770 769 i386_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC
771 770 $(__GNUC)i386_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++
772 771 i386_CPP= /usr/ccs/lib/cpp
773 772 i386_AS= /usr/ccs/bin/as
774 773 $(__GNUC)i386_AS= $(ONBLD_TOOLS)/bin/$(MACH)/aw
775 774 i386_LD= /usr/ccs/bin/ld
776 775 i386_LINT= $(SPRO_ROOT)/sunstudio12.1/bin/lint
777 776
778 777 amd64_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc
779 778 $(__GNUC64)amd64_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc
780 779 amd64_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC
781 780 $(__GNUC64)amd64_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++
782 781 amd64_CPP= /usr/ccs/lib/cpp
783 782 amd64_AS= $(ONBLD_TOOLS)/bin/$(MACH)/aw
784 783 amd64_LD= /usr/ccs/bin/ld
785 784 amd64_LINT= $(SPRO_ROOT)/sunstudio12.1/bin/lint
786 785
787 786 NATIVECC= $($(NATIVE_MACH)_CC)
788 787 NATIVECCC= $($(NATIVE_MACH)_CCC)
789 788 NATIVECPP= $($(NATIVE_MACH)_CPP)
790 789 NATIVEAS= $($(NATIVE_MACH)_AS)
791 790 NATIVELD= $($(NATIVE_MACH)_LD)
792 791 NATIVELINT= $($(NATIVE_MACH)_LINT)
793 792
794 793 #
795 794 # Makefile.master.64 overrides these settings
796 795 #
797 796 CC= $(NATIVECC)
798 797 CCC= $(NATIVECCC)
799 798 CPP= $(NATIVECPP)
800 799 AS= $(NATIVEAS)
801 800 LD= $(NATIVELD)
802 801 LINT= $(NATIVELINT)
803 802
804 803 # The real compilers used for this build
805 804 CW_CC_CMD= $(CC) -_compiler
806 805 CW_CCC_CMD= $(CCC) -_compiler
807 806 REAL_CC= $(CW_CC_CMD:sh)
808 807 REAL_CCC= $(CW_CCC_CMD:sh)
809 808
810 809 # Pass -Y flag to cpp (method of which is release-dependent)
811 810 CCYFLAG= -Y I,
812 811
813 812 BDIRECT= -Bdirect
814 813 BDYNAMIC= -Bdynamic
815 814 BLOCAL= -Blocal
816 815 BNODIRECT= -Bnodirect
817 816 BREDUCE= -Breduce
818 817 BSTATIC= -Bstatic
819 818
820 819 ZDEFS= -zdefs
821 820 ZDIRECT= -zdirect
822 821 ZIGNORE= -zignore
823 822 ZINITFIRST= -zinitfirst
824 823 ZINTERPOSE= -zinterpose
825 824 ZLAZYLOAD= -zlazyload
826 825 ZLOADFLTR= -zloadfltr
827 826 ZMULDEFS= -zmuldefs
828 827 ZNODEFAULTLIB= -znodefaultlib
829 828 ZNODEFS= -znodefs
830 829 ZNODELETE= -znodelete
831 830 ZNODLOPEN= -znodlopen
832 831 ZNODUMP= -znodump
833 832 ZNOLAZYLOAD= -znolazyload
834 833 ZNOLDYNSYM= -znoldynsym
835 834 ZNORELOC= -znoreloc
836 835 ZNOVERSION= -znoversion
837 836 ZRECORD= -zrecord
838 837 ZREDLOCSYM= -zredlocsym
839 838 ZTEXT= -ztext
840 839 ZVERBOSE= -zverbose
841 840
842 841 GSHARED= -G
843 842 CCMT= -mt
844 843
845 844 # Handle different PIC models on different ISAs
846 845 # (May be overridden by lower-level Makefiles)
847 846
848 847 sparc_C_PICFLAGS = -K pic
849 848 sparcv9_C_PICFLAGS = -K pic
850 849 i386_C_PICFLAGS = -K pic
851 850 amd64_C_PICFLAGS = -K pic
852 851 C_PICFLAGS = $($(MACH)_C_PICFLAGS)
853 852 C_PICFLAGS64 = $($(MACH64)_C_PICFLAGS)
854 853
855 854 sparc_C_BIGPICFLAGS = -K PIC
856 855 sparcv9_C_BIGPICFLAGS = -K PIC
857 856 i386_C_BIGPICFLAGS = -K PIC
858 857 amd64_C_BIGPICFLAGS = -K PIC
859 858 C_BIGPICFLAGS = $($(MACH)_C_BIGPICFLAGS)
860 859 C_BIGPICFLAGS64 = $($(MACH64)_C_BIGPICFLAGS)
861 860
862 861 # CC requires there to be no space between '-K' and 'pic' or 'PIC'.
863 862 sparc_CC_PICFLAGS = -Kpic
864 863 sparcv9_CC_PICFLAGS = -KPIC
865 864 i386_CC_PICFLAGS = -Kpic
866 865 amd64_CC_PICFLAGS = -Kpic
867 866 CC_PICFLAGS = $($(MACH)_CC_PICFLAGS)
868 867 CC_PICFLAGS64 = $($(MACH64)_CC_PICFLAGS)
869 868
870 869 AS_PICFLAGS= $(C_PICFLAGS)
871 870 AS_BIGPICFLAGS= $(C_BIGPICFLAGS)
872 871
873 872 #
874 873 # Default label for CTF sections
875 874 #
876 875 CTFCVTFLAGS= -i -L VERSION
877 876
878 877 #
879 878 # Override to pass module-specific flags to ctfmerge. Currently used
880 879 # only by krtld to turn on fuzzy matching.
881 880 #
882 881 CTFMRGFLAGS=
883 882
884 883 CTFCONVERT_O = $(CTFCONVERT) $(CTFCVTFLAGS) $@
885 884
886 885 ELFSIGN_O= $(TRUE)
887 886 ELFSIGN_CRYPTO= $(ELFSIGN_O)
888 887 ELFSIGN_OBJECT= $(ELFSIGN_O)
889 888 $(EXPORT_RELEASE_BUILD)ELFSIGN_O = $(ELFSIGN)
890 889 $(EXPORT_RELEASE_BUILD)ELFSIGN_CFNAME = SUNWosnetCF
891 890 $(EXPORT_RELEASE_BUILD)ELFSIGN_KEY = \
892 891 $(CLOSED)/cmd/cmd-crypto/etc/keys/$(ELFSIGN_CFNAME)
893 892 $(EXPORT_RELEASE_BUILD)ELFSIGN_CERT= \
894 893 $(CLOSED)/cmd/cmd-crypto/etc/certs/$(ELFSIGN_CFNAME)
895 894 $(EXPORT_RELEASE_BUILD)ELFSIGN_SENAME = SUNWosnetSE
896 895 $(EXPORT_RELEASE_BUILD)ELFSIGN_SEKEY = \
897 896 $(CLOSED)/cmd/cmd-crypto/etc/keys/$(ELFSIGN_SENAME)
898 897 $(EXPORT_RELEASE_BUILD)ELFSIGN_SECERT= \
899 898 $(CLOSED)/cmd/cmd-crypto/etc/certs/$(ELFSIGN_SENAME)
900 899 $(EXPORT_RELEASE_BUILD)ELFSIGN_CRYPTO= $(ELFSIGN_O) sign \
901 900 $(ELFSIGN_FORMAT_OPTION) \
902 901 -k $(ELFSIGN_KEY) -c $(ELFSIGN_CERT) -e $@
903 902 $(EXPORT_RELEASE_BUILD)ELFSIGN_OBJECT= $(ELFSIGN_O) sign \
904 903 $(ELFSIGN_FORMAT_OPTION) \
905 904 -k $(ELFSIGN_SEKEY) -c $(ELFSIGN_SECERT) -e $@
906 905
907 906 # Rules (normally from make.rules) and macros which are used for post
908 907 # processing files. Normally, these do stripping of the comment section
909 908 # automatically.
910 909 # RELEASE_CM: Should be editted to reflect the release.
911 910 # POST_PROCESS_O: Post-processing for `.o' files.
912 911 # POST_PROCESS_A: Post-processing for `.a' files (currently null).
913 912 # POST_PROCESS_SO: Post-processing for `.so' files.
914 913 # POST_PROCESS: Post-processing for executable files (no suffix).
915 914 # Note that these macros are not completely generalized as they are to be
916 915 # used with the file name to be processed following.
917 916 #
918 917 # It is left as an exercise to Release Engineering to embellish the generation
919 918 # of the release comment string.
920 919 #
921 920 # If this is a standard development build:
922 921 # compress the comment section (mcs -c)
923 922 # add the standard comment (mcs -a $(RELEASE_CM))
924 923 # add the development specific comment (mcs -a $(DEV_CM))
925 924 #
926 925 # If this is an installation build:
927 926 # delete the comment section (mcs -d)
928 927 # add the standard comment (mcs -a $(RELEASE_CM))
929 928 # add the development specific comment (mcs -a $(DEV_CM))
930 929 #
931 930 # If this is an release build:
932 931 # delete the comment section (mcs -d)
933 932 # add the standard comment (mcs -a $(RELEASE_CM))
934 933 #
935 934 # The following list of macros are used in the definition of RELEASE_CM
936 935 # which is used to label all binaries in the build:
937 936 #
938 937 # RELEASE Specific release of the build, eg: 5.2
939 938 # RELEASE_MAJOR Major version number part of $(RELEASE)
940 939 # RELEASE_MINOR Minor version number part of $(RELEASE)
941 940 # VERSION Version of the build (alpha, beta, Generic)
942 941 # PATCHID If this is a patch this value should contain
943 942 # the patchid value (eg: "Generic 100832-01"), otherwise
944 943 # it will be set to $(VERSION)
945 944 # RELEASE_DATE Date of the Release Build
946 945 # PATCH_DATE Date the patch was created, if this is blank it
947 946 # will default to the RELEASE_DATE
948 947 #
949 948 RELEASE_MAJOR= 5
950 949 RELEASE_MINOR= 11
951 950 RELEASE= $(RELEASE_MAJOR).$(RELEASE_MINOR)
952 951 VERSION= SunOS Development
953 952 PATCHID= $(VERSION)
954 953 RELEASE_DATE= release date not set
955 954 PATCH_DATE= $(RELEASE_DATE)
956 955 RELEASE_CM= "@($(POUND_SIGN))SunOS $(RELEASE) $(PATCHID) $(PATCH_DATE)"
957 956 DEV_CM= "@($(POUND_SIGN))SunOS Internal Development: non-nightly build"
958 957
959 958 PROCESS_COMMENT= @?${MCS} -c -a $(RELEASE_CM) -a $(DEV_CM)
960 959 $(STRIP_COMMENTS)PROCESS_COMMENT= @?${MCS} -d -a $(RELEASE_CM) -a $(DEV_CM)
961 960 $(RELEASE_BUILD)PROCESS_COMMENT= @?${MCS} -d -a $(RELEASE_CM)
962 961
963 962 STRIP_STABS= :
964 963 $(RELEASE_BUILD)STRIP_STABS= $(STRIP) -x $@
965 964
966 965 POST_PROCESS_O= $(PROCESS_COMMENT) $@
967 966 POST_PROCESS_A=
968 967 POST_PROCESS_SO= $(PROCESS_COMMENT) $@ ; $(STRIP_STABS) ; \
969 968 $(ELFSIGN_OBJECT)
970 969 POST_PROCESS= $(PROCESS_COMMENT) $@ ; $(STRIP_STABS) ; \
971 970 $(ELFSIGN_OBJECT)
972 971
973 972 #
974 973 # chk4ubin is a tool that inspects a module for a symbol table
975 974 # ELF section size which can trigger an OBP bug on older platforms.
976 975 # This problem affects only specific sun4u bootable modules.
977 976 #
978 977 CHK4UBIN= $(ONBLD_TOOLS)/bin/$(MACH)/chk4ubin
979 978 CHK4UBINFLAGS=
980 979 CHK4UBINARY= $(CHK4UBIN) $(CHK4UBINFLAGS) $@
981 980
982 981 #
983 982 # PKGARCHIVE specifies the default location where packages should be
984 983 # placed if built.
985 984 #
986 985 $(RELEASE_BUILD)PKGARCHIVESUFFIX= -nd
987 986 PKGARCHIVE=$(SRC)/../../packages/$(MACH)/nightly$(PKGARCHIVESUFFIX)
988 987
989 988 #
990 989 # The repositories will be created with these publisher settings. To
991 990 # update an image to the resulting repositories, this must match the
992 991 # publisher name provided to "pkg set-publisher."
993 992 #
994 993 PKGPUBLISHER_REDIST= on-nightly
995 994 PKGPUBLISHER_NONREDIST= on-extra
996 995
997 996 # Default build rules which perform comment section post-processing.
998 997 #
999 998 .c:
1000 999 $(LINK.c) -o $@ $< $(LDLIBS)
1001 1000 $(POST_PROCESS)
1002 1001 .c.o:
1003 1002 $(COMPILE.c) $(OUTPUT_OPTION) $< $(CTFCONVERT_HOOK)
1004 1003 $(POST_PROCESS_O)
1005 1004 .c.a:
1006 1005 $(COMPILE.c) -o $% $<
1007 1006 $(PROCESS_COMMENT) $%
1008 1007 $(AR) $(ARFLAGS) $@ $%
1009 1008 $(RM) $%
1010 1009 .s.o:
1011 1010 $(COMPILE.s) -o $@ $<
1012 1011 $(POST_PROCESS_O)
1013 1012 .s.a:
1014 1013 $(COMPILE.s) -o $% $<
1015 1014 $(PROCESS_COMMENT) $%
1016 1015 $(AR) $(ARFLAGS) $@ $%
1017 1016 $(RM) $%
1018 1017 .cc:
1019 1018 $(LINK.cc) -o $@ $< $(LDLIBS)
1020 1019 $(POST_PROCESS)
1021 1020 .cc.o:
1022 1021 $(COMPILE.cc) $(OUTPUT_OPTION) $<
1023 1022 $(POST_PROCESS_O)
1024 1023 .cc.a:
1025 1024 $(COMPILE.cc) -o $% $<
1026 1025 $(AR) $(ARFLAGS) $@ $%
1027 1026 $(PROCESS_COMMENT) $%
1028 1027 $(RM) $%
1029 1028 .y:
1030 1029 $(YACC.y) $<
1031 1030 $(LINK.c) -o $@ y.tab.c $(LDLIBS)
1032 1031 $(POST_PROCESS)
1033 1032 $(RM) y.tab.c
1034 1033 .y.o:
1035 1034 $(YACC.y) $<
1036 1035 $(COMPILE.c) -o $@ y.tab.c $(CTFCONVERT_HOOK)
1037 1036 $(POST_PROCESS_O)
1038 1037 $(RM) y.tab.c
1039 1038 .l:
1040 1039 $(RM) $*.c
1041 1040 $(LEX.l) $< > $*.c
1042 1041 $(LINK.c) -o $@ $*.c -ll $(LDLIBS)
1043 1042 $(POST_PROCESS)
1044 1043 $(RM) $*.c
1045 1044 .l.o:
1046 1045 $(RM) $*.c
1047 1046 $(LEX.l) $< > $*.c
1048 1047 $(COMPILE.c) -o $@ $*.c $(CTFCONVERT_HOOK)
1049 1048 $(POST_PROCESS_O)
1050 1049 $(RM) $*.c
1051 1050
1052 1051 .bin.o:
1053 1052 $(COMPILE.b) -o $@ $<
1054 1053 $(POST_PROCESS_O)
1055 1054
1056 1055 .java.class:
1057 1056 $(COMPILE.java) $<
1058 1057
1059 1058 # Bourne and Korn shell script message catalog build rules.
1060 1059 # We extract all gettext strings with sed(1) (being careful to permit
1061 1060 # multiple gettext strings on the same line), weed out the dups, and
1062 1061 # build the catalogue with awk(1).
1063 1062
1064 1063 .sh.po .ksh.po:
1065 1064 $(SED) -n -e ":a" \
1066 1065 -e "h" \
1067 1066 -e "s/.*gettext *\(\"[^\"]*\"\).*/\1/p" \
1068 1067 -e "x" \
1069 1068 -e "s/\(.*\)gettext *\"[^\"]*\"\(.*\)/\1\2/" \
1070 1069 -e "t a" \
1071 1070 $< | sort -u | awk '{ print "msgid\t" $$0 "\nmsgstr" }' > $@
1072 1071
1073 1072 #
1074 1073 # Python and Perl executable and message catalog build rules.
1075 1074 #
1076 1075 .SUFFIXES: .pl .pm .py .pyc
1077 1076
1078 1077 .pl:
1079 1078 $(RM) $@;
1080 1079 $(SED) -e "s@TEXT_DOMAIN@\"$(TEXT_DOMAIN)\"@" $< > $@;
1081 1080 $(CHMOD) +x $@
1082 1081
1083 1082 .py:
1084 1083 $(RM) $@; $(CAT) $< > $@; $(CHMOD) +x $@
1085 1084
1086 1085 .py.pyc:
1087 1086 $(RM) $@
1088 1087 $(PYTHON) -mpy_compile $<
1089 1088 @[ $(<)c = $@ ] || $(MV) $(<)c $@
1090 1089
1091 1090 .py.po:
1092 1091 $(GNUXGETTEXT) $(GNUXGETFLAGS) -d $(<F:%.py=%) $< ;
1093 1092
1094 1093 .pl.po .pm.po:
1095 1094 $(XGETTEXT) $(XGETFLAGS) -d $(<F) $< ;
1096 1095 $(RM) $@ ;
1097 1096 $(SED) "/^domain/d" < $(<F).po > $@ ;
1098 1097 $(RM) $(<F).po
1099 1098
1100 1099 #
1101 1100 # When using xgettext, we want messages to go to the default domain,
1102 1101 # rather than the specified one. This special version of the
1103 1102 # COMPILE.cpp macro effectively prevents expansion of TEXT_DOMAIN,
1104 1103 # causing xgettext to put all messages into the default domain.
1105 1104 #
1106 1105 CPPFORPO=$(COMPILE.cpp:\"$(TEXT_DOMAIN)\"=TEXT_DOMAIN)
1107 1106
1108 1107 .c.i:
1109 1108 $(CPPFORPO) $< > $@
1110 1109
1111 1110 .h.i:
1112 1111 $(CPPFORPO) $< > $@
1113 1112
1114 1113 .y.i:
1115 1114 $(YACC) -d $<
1116 1115 $(CPPFORPO) y.tab.c > $@
1117 1116 $(RM) y.tab.c
1118 1117
1119 1118 .l.i:
1120 1119 $(LEX) $<
1121 1120 $(CPPFORPO) lex.yy.c > $@
1122 1121 $(RM) lex.yy.c
1123 1122
1124 1123 .c.po:
1125 1124 $(CPPFORPO) $< > $<.i
1126 1125 $(BUILD.po)
1127 1126
1128 1127 .y.po:
1129 1128 $(YACC) -d $<
1130 1129 $(CPPFORPO) y.tab.c > $<.i
1131 1130 $(BUILD.po)
1132 1131 $(RM) y.tab.c
1133 1132
1134 1133 .l.po:
1135 1134 $(LEX) $<
1136 1135 $(CPPFORPO) lex.yy.c > $<.i
1137 1136 $(BUILD.po)
1138 1137 $(RM) lex.yy.c
1139 1138
1140 1139 #
1141 1140 # Rules to perform stylistic checks
1142 1141 #
1143 1142 .SUFFIXES: .x .xml .check .xmlchk
1144 1143
1145 1144 .h.check:
1146 1145 $(DOT_H_CHECK)
1147 1146
1148 1147 .x.check:
1149 1148 $(DOT_X_CHECK)
1150 1149
1151 1150 .xml.xmlchk:
1152 1151 $(MANIFEST_CHECK)
1153 1152
1154 1153 #
1155 1154 # Rules to process ONC+ Source partial files
1156 1155 #
1157 1156 %_onc_plus: %
1158 1157 @$(ECHO) "extracting code from $< ... "
1159 1158 sed -n -e '/ONC_PLUS EXTRACT START/,/ONC_PLUS EXTRACT END/p' $< > $@
1160 1159
1161 1160 #
1162 1161 # Include rules to render automated sccs get rules "safe".
1163 1162 #
1164 1163 include $(SRC)/Makefile.noget
↓ open down ↓ |
949 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX