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