Print this page
11224 nightly and bldenv should be usable directly
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/tools/env/illumos.sh
+++ new/usr/src/tools/env/illumos.sh
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
↓ open down ↓ |
16 lines elided |
↑ open up ↑ |
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
22 22 # Copyright 2015 Nexenta Systems, Inc. All rights reserved.
23 23 # Copyright 2012 Joshua M. Clulow <josh@sysmgr.org>
24 24 # Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
25 25 # Copyright 2016 RackTop Systems.
26 26 # Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
27 -# Copyright 2019, Joyent, Inc.
27 +# Copyright 2020 Joyent, Inc.
28 28 #
29 -# - This file is sourced by "bldenv.sh" and "nightly.sh" and should not
29 +# - This file is sourced by "bldenv" and "nightly" and should not
30 30 # be executed directly.
31 31 # - This script is only interpreted by ksh93 and explicitly allows the
32 32 # use of ksh93 language extensions.
33 33
34 34
35 35 # -----------------------------------------------------------------------------
36 36 # Parameters you are likely to want to change
37 37 # -----------------------------------------------------------------------------
38 38
39 39 # DEBUG build only (-D, -F)
40 40 # do not bringover from the parent (-n)
41 41 # runs 'make check' (-C)
42 42 # checks for new interfaces in libraries (-A)
43 43 # sends mail on completion (-m and the MAILTO variable)
44 44 # creates packages for PIT/RE (-p)
45 45 # checks for changes in ELF runpaths (-r)
46 46 # build and use this workspace's tools in $SRC/tools (-t)
47 47 export NIGHTLY_OPTIONS='-FnCDAmprt'
48 48
49 49 # Some scripts optionally send mail messages to MAILTO.
50 50 #export MAILTO=
51 51
52 52 # CODEMGR_WS - where is your workspace at
53 53 export CODEMGR_WS="`git rev-parse --show-toplevel`"
54 54
55 55 # Compilers may be specified using the following variables:
56 56 # PRIMARY_CC - primary C compiler
57 57 # PRIMARY_CCC - primary C++ compiler
58 58 #
59 59 # SHADOW_CCS - list of shadow C compilers
60 60 # SHADOW_CCCS - list of shadow C++ compilers
61 61 #
62 62 # Each entry has the form <name>,<path to binary>,<style> where name is a
63 63 # free-form name (possibly used in the makefiles to guard options), path is
64 64 # the path to the executable. style is the 'style' of command line taken by
65 65 # the compiler, currently either gnu (or gcc) or sun (or cc), which is also
66 66 # used by Makefiles to guard options.
67 67 #
68 68 # __SUNC and __GNUC must still be set to reflect the style of the primary
69 69 # compiler (and to influence the default primary, otherwise)
70 70 #
71 71 # for example:
72 72 # export PRIMARY_CC=gcc4,/opt/gcc/4.4.4/bin/gcc,gnu
73 73 # export PRIMARY_CCC=gcc4,/opt/gcc/4.4.4/bin/g++,gnu
74 74 # export SHADOW_CCS=studio12,/opt/SUNWspro/bin/cc,sun
75 75 # export SHADOW_CCCS=studio12,/opt/SUNWspro/bin/CC,sun
76 76 #
77 77 # There can be several space-separated entries in SHADOW_* to run multiple
78 78 # shadow compilers.
79 79 #
80 80 # To disable shadow compilation, unset SHADOW_* or set them to the empty string.
81 81 #
82 82 export GNUC_ROOT=/usr/gcc/7
83 83 export PRIMARY_CC=gcc7,$GNUC_ROOT/bin/gcc,gnu
84 84 export PRIMARY_CCC=gcc7,$GNUC_ROOT/bin/g++,gnu
85 85 export SHADOW_CCS=gcc4,/opt/gcc/4.4.4/bin/gcc,gnu
86 86 export SHADOW_CCCS=gcc4,/opt/gcc/4.4.4/bin/g++,gnu
87 87
88 88 # comment to disable smatch
89 89 export ENABLE_SMATCH=1
90 90
91 91 # Comment this out to disable support for SMB printing, i.e. if you
92 92 # don't want to bother providing the CUPS headers this needs.
93 93 export ENABLE_SMB_PRINTING=
94 94
95 95 # If your distro uses certain versions of Perl, make sure either Makefile.master
96 96 # contains your new defaults OR your .env file sets them.
97 97 # These are how you would override for building on OmniOS r151028, for example.
98 98 #export PERL_VERSION=5.28
99 99 #export PERL_VARIANT=-thread-multi
100 100 #export PERL_PKGVERS=
101 101
102 102 # To disable building of the 32-bit or 64-bit perl modules (or both),
103 103 # uncomment these lines:
104 104 #export BUILDPERL32='#'
105 105 #export BUILDPERL64='#'
106 106
107 107 # If your distro uses certain versions of Python, make sure either
108 108 # Makefile.master contains your new defaults OR your .env file sets them.
109 109 #export PYTHON_VERSION=2.7
110 110 #export PYTHON_PKGVERS=-27
111 111 #export PYTHON_SUFFIX=
112 112 #export PYTHON3_VERSION=3.5
113 113 #export PYTHON3_PKGVERS=-35
114 114 #export PYTHON3_SUFFIX=m
115 115
116 116 # To disable building with either Python2 or Python 3 (or both), uncomment
117 117 # these lines:
118 118 #export BUILDPY2='#'
119 119 #export BUILDPY3='#'
120 120
121 121 # Set console color scheme either by build type:
122 122 #
123 123 #export RELEASE_CONSOLE_COLOR="-DDEFAULT_ANSI_FOREGROUND=ANSI_COLOR_BLACK \
124 124 # -DDEFAULT_ANSI_BACKGROUND=ANSI_COLOR_WHITE"
125 125 #
126 126 #export DEBUG_CONSOLE_COLOR="-DDEFAULT_ANSI_FOREGROUND=ANSI_COLOR_RED \
127 127 # -DDEFAULT_ANSI_BACKGROUND=ANSI_COLOR_WHITE"
128 128 #
129 129 # or just one for any build type:
130 130 #
131 131 #export DEFAULT_CONSOLE_COLOR="-DDEFAULT_ANSI_FOREGROUND=ANSI_COLOR_BLACK \
132 132 # -DDEFAULT_ANSI_BACKGROUND=ANSI_COLOR_WHITE"
133 133
134 134 # Set if your distribution has different package versioning
135 135 #export PKGVERS_BRANCH=2018.0.0.17900
136 136
137 137 # Skip Java 8 builds on distributions that don't support it
138 138 #export BLD_JAVA_8=
139 139
140 140 # POST_NIGHTLY can be any command to be run at the end of nightly. See
141 141 # nightly(1) for interactions between environment variables and this command.
142 142 #POST_NIGHTLY=
143 143
144 144 # Populates /etc/versions/build on each nightly run
145 145 export BUILDVERSION_EXEC="git describe --all --long --dirty"
146 146
147 147 # -----------------------------------------------------------------------------
148 148 # You are less likely to need to modify parameters below.
149 149 # -----------------------------------------------------------------------------
150 150
151 151 # Maximum number of dmake jobs. The recommended number is 2 + NCPUS,
152 152 # where NCPUS is the number of logical CPUs on your build system.
153 153 function maxjobs
154 154 {
155 155 nameref maxjobs=$1
156 156 integer ncpu
157 157 integer -r min_mem_per_job=512 # minimum amount of memory for a job
158 158
159 159 ncpu=$(builtin getconf ; getconf 'NPROCESSORS_ONLN')
160 160 (( maxjobs=ncpu + 2 ))
161 161
162 162 # Throttle number of parallel jobs launched by dmake to a value which
163 163 # gurantees that all jobs have enough memory. This was added to avoid
164 164 # excessive paging/swapping in cases of virtual machine installations
165 165 # which have lots of CPUs but not enough memory assigned to handle
166 166 # that many parallel jobs
167 167 if [[ $(/usr/sbin/prtconf 2>'/dev/null') == ~(E)Memory\ size:\ ([[:digit:]]+)\ Megabytes ]] ; then
168 168 integer max_jobs_per_memory # parallel jobs which fit into physical memory
169 169 integer physical_memory # physical memory installed
170 170
171 171 # The array ".sh.match" contains the contents of capturing
172 172 # brackets in the last regex, .sh.match[1] will contain
173 173 # the value matched by ([[:digit:]]+), i.e. the amount of
174 174 # memory installed
175 175 physical_memory="10#${.sh.match[1]}"
176 176
177 177 ((
178 178 max_jobs_per_memory=round(physical_memory/min_mem_per_job) ,
179 179 maxjobs=fmax(2, fmin(maxjobs, max_jobs_per_memory))
180 180 ))
181 181 fi
182 182
183 183 return 0
184 184 }
185 185
186 186 maxjobs DMAKE_MAX_JOBS # "DMAKE_MAX_JOBS" passed as ksh(1) name reference
187 187 export DMAKE_MAX_JOBS
188 188
189 189 # path to onbld tool binaries
190 190 ONBLD_BIN='/opt/onbld/bin'
191 191
192 192 # PARENT_WS is used to determine the parent of this workspace. This is
193 193 # for the options that deal with the parent workspace (such as where the
194 194 # proto area will go).
195 195 export PARENT_WS=''
196 196
197 197 # CLONE_WS is the workspace nightly should do a bringover from.
198 198 # The bringover, if any, is done as STAFFER.
199 199 export CLONE_WS='ssh://anonhg@hg.illumos.org/illumos-gate'
200 200
201 201 # Set STAFFER to your own login as gatekeeper or developer
202 202 # The point is to use group "staff" and avoid referencing the parent
203 203 # workspace as root.
204 204 export STAFFER="$LOGNAME"
205 205 export MAILTO="${MAILTO:-$STAFFER}"
206 206
207 207 # If you wish the mail messages to be From: an arbitrary address, export
208 208 # MAILFROM.
209 209 #export MAILFROM="user@example.com"
210 210
211 211 # The project (see project(4)) under which to run this build. If not
212 212 # specified, the build is simply run in a new task in the current project.
213 213 export BUILD_PROJECT=''
214 214
215 215 # You should not need to change the next three lines
216 216 export ATLOG="$CODEMGR_WS/log"
217 217 export LOGFILE="$ATLOG/nightly.log"
218 218 export MACH="$(uname -p)"
219 219
220 220 #
221 221 # The following macro points to the closed binaries. Once illumos has
222 222 # totally freed itself, we can remove this reference.
223 223 #
224 224 # Location of encumbered binaries.
225 225 export ON_CLOSED_BINS="$CODEMGR_WS/closed"
226 226
227 227 # REF_PROTO_LIST - for comparing the list of stuff in your proto area
228 228 # with. Generally this should be left alone, since you want to see differences
229 229 # from your parent (the gate).
230 230 #
231 231 export REF_PROTO_LIST="$PARENT_WS/usr/src/proto_list_${MACH}"
232 232
233 233
234 234 export ROOT="$CODEMGR_WS/proto/root_${MACH}"
235 235 export SRC="$CODEMGR_WS/usr/src"
236 236 export MULTI_PROTO="no"
237 237
238 238 #
239 239 # build environment variables, including version info for mcs, motd,
240 240 # motd, uname and boot messages. Mostly you shouldn't change this except
241 241 # when the release slips (nah) or you move an environment file to a new
242 242 # release
243 243 #
244 244 export VERSION="`git describe --long --all HEAD | cut -d/ -f2-`"
245 245
246 246 #
247 247 # the RELEASE and RELEASE_DATE variables are set in Makefile.master;
248 248 # there might be special reasons to override them here, but that
249 249 # should not be the case in general
250 250 #
251 251 # export RELEASE='5.11'
252 252 # export RELEASE_DATE='October 2007'
253 253
254 254 # proto area in parent for optionally depositing a copy of headers and
255 255 # libraries corresponding to the protolibs target
256 256 # not applicable given the NIGHTLY_OPTIONS
257 257 #
258 258 export PARENT_ROOT="$PARENT_WS/proto/root_$MACH"
259 259 export PARENT_TOOLS_ROOT="$PARENT_WS/usr/src/tools/proto/root_$MACH-nd"
260 260
261 261 # Package creation variables. You probably shouldn't change these,
262 262 # either.
263 263 #
264 264 # PKGARCHIVE determines where the repository will be created.
265 265 #
266 266 # PKGPUBLISHER_REDIST controls the publisher setting for the repository.
267 267 #
268 268 export PKGARCHIVE="${CODEMGR_WS}/packages/${MACH}/nightly"
269 269 # export PKGPUBLISHER_REDIST='on-redist'
270 270
271 271 # Package manifest format version.
272 272 export PKGFMT_OUTPUT='v1'
273 273
274 274 # we want make to do as much as it can, just in case there's more than
275 275 # one problem.
276 276 export MAKEFLAGS='k'
277 277
278 278 # Magic variables to prevent the devpro compilers/teamware from checking
279 279 # for updates or sending mail back to devpro on every use.
280 280 export SUNW_NO_UPDATE_NOTIFY='1'
281 281 export UT_NO_USAGE_TRACKING='1'
282 282
283 283 # Build tools - don't change these unless you know what you're doing. These
284 284 # variables allows you to get the compilers and onbld files locally.
285 285 # Set BUILD_TOOLS to pull everything from one location.
286 286 # Alternately, you can set ONBLD_TOOLS to where you keep the contents of
287 287 # SUNWonbld and SPRO_ROOT to where you keep the compilers. SPRO_VROOT
288 288 # exists to make it easier to test new versions of the compiler.
289 289 export BUILD_TOOLS='/opt'
290 290 #export ONBLD_TOOLS='/opt/onbld'
291 291 export SPRO_ROOT='/opt/SUNWspro'
292 292 export SPRO_VROOT="$SPRO_ROOT"
293 293
294 294 # Set this flag to 'n' to disable the use of 'checkpaths'. The default,
295 295 # if the 'N' option is not specified, is to run this test.
296 296 #CHECK_PATHS='y'
297 297
298 298 if [[ "$ENABLE_SMATCH" = "1" ]]; then
299 299 SMATCHBIN=$CODEMGR_WS/usr/src/tools/proto/root_$MACH-nd/opt/onbld/bin/$MACH/smatch
300 300 export SHADOW_CCS="$SHADOW_CCS smatch,$SMATCHBIN,smatch"
301 301 fi
↓ open down ↓ |
262 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX