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