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