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