1#! /usr/bin/env sh 2# 3# Copyright (c) 2014, 2015 Antti Kantee <pooka@iki.fi> 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions 7# are met: 8# 1. Redistributions of source code must retain the above copyright 9# notice, this list of conditions and the following disclaimer. 10# 2. Redistributions in binary form must reproduce the above copyright 11# notice, this list of conditions and the following disclaimer in the 12# documentation and/or other materials provided with the distribution. 13# 14# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 15# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24# SUCH DAMAGE. 25# 26 27set -eu 28 29die () 30{ 31 32 echo '>> ERROR:' 33 echo '>>' $* 34 exit 1 35} 36 37helpme () 38{ 39 40 printf "Usage: $0 [-d destdir] [-j num] [-k] [-o objdir] [-q]\n" 41 printf "\t[-s srcdir] hw|xen|sel4 [build] [install] [-- buildrump.sh opts]\n" 42 printf "\n" 43 printf "\t-d: destination base directory, used by \"install\".\n" 44 printf "\t-j: run <num> make jobs simultaneously.\n" 45 printf "\t-q: quiet(er) build. option may be specified twice.\n\n" 46 printf "\tThe default actions are \"build\" and \"install\"\n\n" 47 48 printf "Expert-only options:\n" 49 printf "\t-o: use non-default object directory\n" 50 printf "\t-k: build kernel only, without libc or tools\n" 51 printf "\t-s: specify alternative src-netbsd location\n\n" 52 printf "\tbuildrump.sh opts are passed to buildrump.sh\n" 53 printf "\n" 54 printf "The toolchain is picked up from the environment. See the\n" 55 printf "Rumprun wiki for more information.\n" 56 exit 1 57} 58 59BUILDRUMP=$(pwd)/buildrump.sh 60 61# overriden by script if true 62HAVECXX=false 63 64: ${GIT:=git} 65 66# figure out where gmake lies 67if [ -z "${MAKE:-}" ]; then 68 MAKE=make 69 ! type gmake >/dev/null 2>&1 || MAKE=gmake 70fi 71type ${MAKE} >/dev/null 2>&1 || die '"make" required but not found' 72 73 74# 75# SUBROUTINES 76# 77 78abspath () 79{ 80 81 eval mypath=\${$1} 82 case ${mypath} in 83 /*) 84 ;; 85 *) 86 mypath="$(pwd)/${mypath}" 87 esac 88 89 eval ${1}="\${mypath}" 90} 91 92parseargs () 93{ 94 95 RRDEST= 96 KERNONLY=false 97 RROBJ= 98 RUMPSRC=src-netbsd 99 STDJ=-j4 100 EXTSRC= 101 MAKE_SILENT= 102 103 DObuild=false 104 DOinstall=false 105 DOtools=false 106 DOtoolsconfig=false 107 DOrumplibs=false 108 DOplatformobj=false 109 DOextralibs=false 110 DOplatformlibs=false 111 DOplatforminstall=false 112 DOplatformheaders=false 113 DOplatformtoplevel=false 114 DOuserspace=false 115 DOapptools=false 116 DOpci=false 117 118 orignargs=$# 119 while getopts '?d:hj:ko:qs:' opt; do 120 case "$opt" in 121 'j') 122 [ -z "$(echo ${OPTARG} | tr -d '[0-9]')" ] \ 123 || die argument to -j must be a number 124 STDJ=-j${OPTARG} 125 ;; 126 'd') 127 RRDEST="${OPTARG}" 128 ;; 129 'k') 130 KERNONLY=true 131 ;; 132 'o') 133 RROBJ="${OPTARG}" 134 ;; 135 's') 136 RUMPSRC=${OPTARG} 137 EXTSRC=-extsrc 138 ;; 139 'q') 140 BUILD_QUIET=${BUILD_QUIET:=-}q 141 MAKE_SILENT=-s 142 ;; 143 'h'|'?') 144 helpme 145 exit 1 146 esac 147 done 148 shift $((${OPTIND} - 1)) 149 150 # are we on a git branch which is not master? 151 if type ${GIT} >/dev/null; then 152 GITBRANCH=$(${GIT} rev-parse --abbrev-ref HEAD 2>/dev/null) 153 if [ ${GITBRANCH} = "master" -o ${GITBRANCH} = "HEAD" ]; then 154 GITBRANCH= 155 else 156 GITBRANCH=-${GITBRANCH} 157 fi 158 else 159 GITBRANCH= 160 fi 161 162 [ -n "${RRDEST}" ] || RRDEST=./rumprun${GITBRANCH}${EXTSRC} 163 164 : ${BUILD_QUIET:=} 165 166 [ $# -gt 0 ] || helpme 167 168 PLATFORM=$1 169 export PLATFORMDIR=platform/${PLATFORM} 170 [ -d ${PLATFORMDIR} ] || die Platform \"$PLATFORM\" not supported! 171 abspath PLATFORMDIR 172 shift 173 174 dodefault=true 175 while [ $# -gt 0 ]; do 176 if [ $1 = '--' ]; then 177 shift 178 break 179 else 180 case $1 in 181 build|tools|toolsconfig|rumplibs|platformobj|platformlibs|extralibs|platformtoplevel|platforminstall|platformheaders|pci|userspace|apptools|install) 182 eval DO${1}=true 183 ;; 184 *) 185 die invalid argument $1 186 ;; 187 esac 188 dodefault=false 189 shift 190 fi 191 done 192 if ${dodefault}; then 193 DObuild=true 194 DOinstall=true 195 fi 196 197 case ${RUMPSRC} in 198 /*) 199 ;; 200 *) 201 RUMPSRC=$(pwd)/${RUMPSRC} 202 ;; 203 esac 204 205 export RUMPSRC 206 export BUILD_QUIET 207 208 ARGSSHIFT=$((${orignargs} - $#)) 209} 210 211checksubmodules () 212{ 213 214 # We assume that if the git submodule command fails, it's because 215 # we're using external $RUMPSRC. 216 if git submodule status ${RUMPSRC} 2>/dev/null | grep -q '^-' \ 217 || git submodule status ${BUILDRUMP} 2>/dev/null | grep -q '^-'; 218 then 219 echo '>>' 220 echo '>> submodules missing. run "git submodule update --init"' 221 echo '>>' 222 exit 1 223 fi 224} 225 226# check that the necessary things are available on the build system 227probeprereqs () 228{ 229 230 if [ "${PLATFORM}" = "xen" ]; then ( 231 . "${RROBJ}/config.sh" 232 # probe location of Xen headers 233 found=false 234 for loc in ${XEN_HEADERS:-} /usr/pkg/include/xen /usr/include/xen; do 235 if printf '#include <stdint.h>\n#include <xen.h>\n'\ 236 | ${CC} -I${loc} -x c - -c -o /dev/null \ 237 >/dev/null 2>&1 ; then 238 found=true 239 break 240 fi 241 done 242 243 if ${found}; then 244 echo "XEN_HEADERS=${loc}" >> ${RROBJ}/config.mk 245 echo "XEN_HEADERS=\"${loc}\"" >> ${RROBJ}/config.sh 246 else 247 echo '>> You need to provide Xen headers.' 248 echo '>> The exactly source depends on your system' 249 echo '>> (e.g. libxen-dev package on some systems)' 250 die Xen headers not found 251 fi ) 252 fi 253} 254 255checkprevbuilds () 256{ 257 258 [ "${PLATFORM}" = "xen" ] || return 0 259 260 if [ -f .prevbuild ]; then 261 . ./.prevbuild 262 : ${PB_KERNONLY:=false} # "bootstrap", remove in a few months 263 if [ "${PB_MACHINE}" != "${MACHINE}" \ 264 -o "${PB_KERNONLY}" != "${KERNONLY}" \ 265 ]; then 266 echo '>> ERROR:' 267 echo '>> Building for multiple machine combos' 268 echo '>> from the same rumprun source tree is currently' 269 echo '>> not supported. See rumprun issue #35.' 270 printf '>> %20s: %s nolibc=%s\n' 'Previously built' \ 271 ${PB_MACHINE} ${PB_KERNONLY} 272 printf '>> %20s: %s nolibc=%s\n' 'Now building' \ 273 ${MACHINE} ${KERNONLY} 274 exit 1 275 fi 276 else 277 echo PB_MACHINE=${MACHINE} > ./.prevbuild 278 echo PB_KERNONLY=${KERNONLY} >> ./.prevbuild 279 fi 280} 281 282setvars () 283{ 284 285 # probe us some vars (_tmp-dance catches possible error for -e) 286 _tmp="$(${BUILDRUMP}/buildrump.sh "$@" probe)" 287 eval "${_tmp}" 288 MACHINE="${BUILDRUMP_MACHINE}" 289 MACHINE_GNU_ARCH="${BUILDRUMP_MACHINE_GNU_ARCH}" 290 291 if [ -z "${RROBJ}" ]; then 292 RROBJ="./obj-${MACHINE}-${PLATFORM}${GITBRANCH}${EXTSRC}" 293 ${KERNONLY} && RROBJ="${RROBJ}-kernonly" 294 fi 295 STAGING="${RROBJ}/dest.stage" 296 BROBJ="${RROBJ}/buildrump.sh" 297 RUMPTOOLS="${RROBJ}/rumptools" 298 299 abspath RRDEST 300 abspath RROBJ 301 abspath RUMPSRC 302} 303 304checktools () 305{ 306 307 # Check that a clang build is not attempted. 308 [ -z "${BUILDRUMP_HAVE_LLVM}" ] \ 309 || die rumprun does not yet support clang ${CC:+(\$CC: $CC)} 310 311 delay=5 312 313 # check that gcc is modern enough 314 vers=$(${CC:-cc} -E -dM - < /dev/null | LANG=C awk ' 315 /__GNUC__/ {version += 100*$3} 316 /__GNUC_MINOR__/ {version += $3} 317 END { print version; if (version) exit 0; exit 1; }') \ 318 || unable to probe cc version 319 if [ ${vers} -lt 406 ]; then 320 die gcc is too old, need 4.6 or later. ${CC:+(\$CC: $CC)} 321 elif [ ${vers} -lt 408 ]; then 322 echo '>>' 323 echo ">> WARNING: gcc is old. ${CC:+(\$CC: $CC)}" 324 echo '>> Version 4.8 or later is recommended.' 325 echo ">> (continuing in ${delay} seconds)" 326 echo '>>' 327 sleep ${delay} 328 fi 329 330 # check that ld is modern enough 331 vers=$(${CC:-cc} -Wl,--version 2>&1 | LANG=C awk ' 332 /GNU ld/{version += 100*$NF} 333 END { print version; if (version) exit 0; exit 1; }') \ 334 || die unable to probe ld version 335 if [ ${vers} -lt 222 ]; then 336 die ld is too old, need 2.22 or later. probed version: ${vers} 337 elif [ ${vers} -lt 225 ]; then 338 echo '>>' 339 echo ">> WARNING: ld is old. probed version: ${vers}" 340 echo '>> Version 2.25 or later is recommended.' 341 echo ">> (continuing in ${delay} seconds)" 342 echo '>>' 343 sleep ${delay} 344 fi 345} 346 347buildtools () 348{ 349 350 checktools 351 352 extracflags= 353 [ "${MACHINE_GNU_ARCH}" = "x86_64" ] \ 354 && extracflags='-F CFLAGS=-mno-red-zone' 355 356 357 # Disable new errors on GCC 7 which break netbsd-src compilation 358 # 359 [ `gcc -dumpversion | cut -f1 -d.` -ge 7 ] \ 360 && extracflags="$extracflags -F CPPFLAGS=-Wimplicit-fallthrough=0" 361 362 363 # build tools 364 ${BUILDRUMP}/buildrump.sh ${BUILD_QUIET} ${STDJ} -k \ 365 -s ${RUMPSRC} -T ${RUMPTOOLS} -o ${BROBJ} -d ${STAGING} \ 366 -V MKPIC=no -V RUMP_CURLWP=__thread \ 367 -V RUMP_KERNEL_IS_LIBC=1 -V BUILDRUMP_SYSROOT=yes \ 368 ${extracflags} "$@" tools 369 370 ${DObuild} && echo '>>' 371 ${DObuild} && echo '>> Now that we have the appropriate tools, performing' 372 ${DObuild} && echo '>> further setup for rumprun build' 373 ${DObuild} && echo '>>' 374 375 return 0 376} 377 378buildconfigfiles() 379{ 380 381 makeconfig ${RROBJ}/config.mk '' 382 makeconfig ${RROBJ}/config.sh \" 383 # XXX: gcc is hardcoded 384 cat > ${RROBJ}/config << EOF 385export RUMPRUN_MKCONF="${RROBJ}/config.mk" 386export RUMPRUN_SHCONF="${RROBJ}/config.sh" 387export RUMPRUN_BAKE="${RRDEST}/bin/rumprun-bake" 388export RUMPRUN_CC="${RRDEST}/bin/${TOOLTUPLE}-gcc" 389export RUMPRUN_CXX="${RRDEST}/bin/${TOOLTUPLE}-g++" 390export RUMPRUN="${RRDEST}/bin/rumprun" 391export RUMPSTOP="${RRDEST}/bin/rumpstop" 392EOF 393 cat > "${RROBJ}/config-PATH.sh" << EOF 394export PATH="${RRDEST}/bin:\${PATH}" 395EOF 396 397 probeprereqs 398 399 cat >> ${RUMPTOOLS}/mk.conf << EOF 400.if defined(LIB) && \${LIB} == "pthread" 401.PATH: $(pwd)/lib/librumprun_base/pthread 402PTHREAD_MAKELWP=pthread_makelwp_rumprun.c 403CPPFLAGS.pthread_makelwp_rumprun.c= -I$(pwd)/include 404.endif # LIB == pthread 405EOF 406 [ -z "${PLATFORM_MKCONF}" ] \ 407 || echo "${PLATFORM_MKCONF}" >> ${RUMPTOOLS}/mk.conf 408 409 echo "RUMPRUN_TUPLE=${TOOLTUPLE}" >> ${RUMPTOOLS}/mk.conf 410 411 ${DObuild} && echo '>>' 412 ${DObuild} && echo '>> Built config files needed to build rumpkernel' 413 ${DObuild} && echo '>>' 414 return 0 415} 416 417buildrumpkernel() 418{ 419 # build rump kernel 420 ${BUILDRUMP}/buildrump.sh ${BUILD_QUIET} ${STDJ} -k \ 421 -s ${RUMPSRC} -T ${RUMPTOOLS} -o ${BROBJ} -d ${STAGING} \ 422 "$@" build kernelheaders install 423 424 ${DObuild} && echo '>>' 425 ${DObuild} && echo '>> Rump kernel components built. Proceeding to build' 426 ${DObuild} && echo '>> rumprun bits' 427 ${DObuild} && echo '>>' 428 return 0 429} 430 431 432buildapptools () 433{ 434 435 ${MAKE} $MAKE_SILENT -C app-tools BUILDRR=true 436 ${MAKE} $MAKE_SILENT -C app-tools BUILDRR=true install 437} 438 439builduserspace () 440{ 441 442 usermtree ${STAGING} 443 444 LIBS="$(stdlibs ${RUMPSRC})" 445 ! ${HAVECXX} || LIBS="${LIBS} $(stdlibsxx ${RUMPSRC})" 446 447 userincludes ${RUMPSRC} ${LIBS} $(pwd)/lib/librumprun_tester 448 for lib in ${LIBS}; do 449 makeuserlib ${lib} 450 done 451} 452 453buildpci () 454{ 455 456 if eval ${PLATFORM_PCI_P}; then 457 ( 458 cd ${PLATFORMDIR}/pci 459 ${RUMPMAKE} $MAKE_SILENT ${STDJ} obj 460 ${RUMPMAKE} $MAKE_SILENT ${STDJ} dependall 461 ${RUMPMAKE} $MAKE_SILENT ${STDJ} install 462 ) 463 fi 464} 465 466wraponetool () 467{ 468 469 configfile=$1 470 tool=$2 471 quote=$3 472 473 tpath=$(${RUMPMAKE} -f bsd.own.mk -V "\${${tool}}") 474 if ! [ -n "${tpath}" -a -x ${tpath} ]; then 475 die Could not locate buildrump.sh tool \"${tool}\". 476 fi 477 echo "${tool}=${quote}${tpath}${quote}" >> ${configfile} 478} 479 480makeconfig () 481{ 482 483 quote="${2}" 484 485 echo "BUILDRUMP=${quote}${BUILDRUMP}${quote}" > ${1} 486 echo "RUMPSRC=${quote}${RUMPSRC}${quote}" >> ${1} 487 echo "RUMPMAKE=${quote}${RUMPMAKE}${quote}" >> ${1} 488 echo "BUILDRUMP_TOOLFLAGS=${quote}$(pwd)/${RUMPTOOLS}/toolchain-conf.mk${quote}" >> ${1} 489 echo "MACHINE=${quote}${MACHINE}${quote}" >> ${1} 490 echo "MACHINE_GNU_ARCH=${quote}${MACHINE_GNU_ARCH}${quote}" >> ${1} 491 echo "TOOLTUPLE=${quote}${TOOLTUPLE}${quote}" >> ${1} 492 echo "KERNONLY=${quote}${KERNONLY}${quote}" >> ${1} 493 echo "PLATFORM=${quote}${PLATFORM}${quote}" >> ${1} 494 495 echo "RRDEST=${quote}${RRDEST}${quote}" >> ${1} 496 echo "RROBJ=${quote}${RROBJ}${quote}" >> ${1} 497 498 # wrap mandatory toolchain bits 499 for t in AR AS CC CPP LD NM OBJCOPY OBJDUMP RANLIB READELF \ 500 SIZE STRINGS STRIP; do 501 wraponetool ${1} ${t} "${quote}" 502 done 503 504 # c++ is optional, wrap it iff available 505 if ${HAVECXX}; then 506 echo "CONFIG_CXX=yes" >> ${1} 507 wraponetool ${1} CXX "${quote}" 508 else 509 echo "CONFIG_CXX=no" >> ${1} 510 fi 511 512 # Check for if compiler supports -no-pie and save to EXTRACCFLAGS 513 gccnopie= 514 if [ -z "`echo 'int p=1;' | ${CC} -no-pie -S -o /dev/null -x c - 2>&1`" ]; then 515 gccnopie=-no-pie 516 fi 517 echo "EXTRACCFLAGS=${quote}${gccnopie}${quote}" >> ${1} 518 519} 520 521dobuild () 522{ 523 524 checksubmodules 525 526 . ${BUILDRUMP}/subr.sh 527 528 PLATFORM_MKCONF= 529 . ${PLATFORMDIR}/platform.conf 530 531 checkprevbuilds 532 533 (${DObuild} || ${DOtools}) && buildtools "$@" 534 535 RUMPMAKE=$(pwd)/${RUMPTOOLS}/rumpmake 536 537 TOOLTUPLE=$(${RUMPMAKE} -f bsd.own.mk \ 538 -V '${MACHINE_GNU_PLATFORM:S/--netbsd/-rumprun-netbsd/}') 539 540 [ $(${RUMPMAKE} -f bsd.own.mk -V '${_BUILDRUMP_CXX}') != 'yes' ] \ 541 || HAVECXX=true 542 543 (${DObuild} || ${DOtoolsconfig}) && buildconfigfiles 544 545 export RUMPRUN_MKCONF="${RROBJ}/config.mk" 546 547 548 (${DObuild} || ${DOrumplibs}) && buildrumpkernel "$@" 549 550 551 mkdir -p ${STAGING}/rumprun-${MACHINE_GNU_ARCH}/lib/rumprun-${PLATFORM}\ 552 || die cannot create libdir 553 554 (${DObuild} || ${DOapptools}) && (${KERNONLY} || buildapptools) 555 (${DObuild} || ${DOplatformheaders}) && ${MAKE} $MAKE_SILENT -C ${PLATFORMDIR} links 556 (${DObuild} || ${DOuserspace}) && (${KERNONLY} || builduserspace) 557 558 (${DObuild} || ${DOpci}) && buildpci 559 560 # do final build of the platform bits 561 # If building in one go, just invoke make then make install 562 ${DObuild} && ( ( cd ${PLATFORMDIR} \ 563 && ${MAKE} $MAKE_SILENT BUILDRR=true \ 564 && ${MAKE} $MAKE_SILENT BUILDRR=true install || exit 1) 565 [ $? -eq 0 ] || die platform make failed!) 566 # If building separately, invoke make with different targets. 567 ${DOplatformobj} && ( cd ${PLATFORMDIR} && ${MAKE} $MAKE_SILENT BUILDRR=true platform_obj) 568 ${DOplatformlibs} && ( cd ${PLATFORMDIR} && ${MAKE} $MAKE_SILENT BUILDRR=true platform_libs) 569 ${DOplatformtoplevel} && ( cd ${PLATFORMDIR} && ${MAKE} $MAKE_SILENT BUILDRR=true platform_toplevel && ${MAKE} $MAKE_SILENT BUILDRR=true platform_toplevel_install) 570 ${DOextralibs} && ( cd ${PLATFORMDIR} && ${MAKE} $MAKE_SILENT BUILDRR=true extra_libs) 571 ${DOplatforminstall} && ( cd ${PLATFORMDIR} && ${MAKE} $MAKE_SILENT BUILDRR=true platform_bottomlevel_install) 572 573 return 0 574} 575 576doinstall () 577{ 578 579 # sanity check 580 [ -d "${RROBJ}" ] \ 581 || die 'No objdir. No build or build with different params?' 582 583 . "${RROBJ}/config.sh" 584 585 # default used to be a symlink, so this is for "compat". 586 # remove in a few months. 587 rm -f ${RRDEST} > /dev/null 2>&1 || true 588 589 mkdir -p ${RRDEST}/rumprun-${MACHINE_GNU_ARCH}/include \ 590 || die cannot create ${RRDEST}/include/rumprun 591 592 # copy everything except include 593 ( 594 # first, move things to where we want them to be 595 cd ${STAGING} 596 rm -rf lib/pkgconfig 597 find lib -maxdepth 1 -name librump\*.a \ 598 -exec mv -f '{}' rumprun-${MACHINE_GNU_ARCH}/lib/rumprun-${PLATFORM}/ \; 599 find lib -maxdepth 1 -name \*.a \ 600 -exec mv -f '{}' rumprun-${MACHINE_GNU_ARCH}/lib/ \; 601 602 # make sure special cases are visible everywhere 603 for x in c pthread ; do 604 rm -f rumprun-${MACHINE_GNU_ARCH}/lib/rumprun-${PLATFORM}/lib${x}.a 605 ln -s ../lib${x}.a \ 606 rumprun-${MACHINE_GNU_ARCH}/lib/rumprun-${PLATFORM}/lib${x}.a 607 done 608 find . -maxdepth 1 \! -path . \! -path ./include\* \ 609 | xargs tar -cf - 610 ) | (cd ${RRDEST} ; tar -xf -) 611 612 # copy include to destdir/include/rumprun 613 ( cd ${STAGING}/include ; tar -cf - . ) \ 614 | ( cd ${RRDEST}/rumprun-${MACHINE_GNU_ARCH}/include ; tar -xf - ) 615} 616 617# 618# BEGIN SCRIPT 619# 620 621parseargs "$@" 622shift ${ARGSSHIFT} 623 624setvars "$@" 625dobuild "$@" 626 627${DOinstall} && doinstall 628 629# echo some useful information for the user 630${DObuild} && echo 631${DObuild} && echo '>>' 632${DObuild} && echo ">> Finished $0 for ${PLATFORM}" 633${DObuild} && echo '>>' 634${DObuild} && echo ">> For Rumprun developers (if you're not sure, you don't need it):" 635${DObuild} && echo ". \"${RROBJ}/config\"" 636${DObuild} && echo '>>' 637if ${DObuild}; then 638 printf ">> toolchain tuple: ${TOOLTUPLE}\n" 639 printf ">> cc wrapper: %s-%s\n" \ 640 ${TOOLTUPLE} "$(${RUMPMAKE} -f bsd.own.mk -V '${ACTIVE_CC}')" 641fi 642if ${DOinstall}; then 643 ${DObuild} && printf ">> installed to \"%s\"\n" ${RRDEST} 644 ${DObuild} && echo '>>' 645 ${DObuild} && echo '>> Set tooldir to front of $PATH (bourne-style shells)' 646 ${DObuild} && echo ". \"${RROBJ}/config-PATH.sh\"" 647fi 648${DObuild} && echo '>>' 649${DObuild} && echo ">> $0 ran successfully" 650exit 0 651