<p>Patrick Georgi has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21683">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">util/crossgcc: Add bootstrap-only mode<br><br>buildgcc -B (--bootstrap-only) builds only a bootstrap compiler. That<br>useful if you want to package the cross compilers: first build the<br>bootstrap compiler, then all required cross compilers in a separate<br>directory (using the bootstrap compiler through an adjusted PATH).<br><br>Change-Id: I089b51d1b898d4cf530845ba51283997fd229451<br>Signed-off-by: Patrick Georgi <pgeorgi@google.com><br>---<br>M util/crossgcc/buildgcc<br>1 file changed, 27 insertions(+), 18 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/83/21683/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc<br>index 0834929..a70ab37 100755<br>--- a/util/crossgcc/buildgcc<br>+++ b/util/crossgcc/buildgcc<br>@@ -830,12 +830,12 @@<br> getoptbrand="$(getopt -V | sed -e '1!d' -e 's,^\(......\).*,\1,')"<br> if [ "${getoptbrand}" = "getopt" ]; then<br> # Detected GNU getopt that supports long options.<br>- args=$(getopt -l version,help,clean,directory:,bootstrap,platform:,languages:,package:,jobs:,destdir:,savetemps,scripting,ccache,supported:,urls,nocolor -o Vhcd:bp:l:P:j:D:tSys:un -- "$@")<br>+ args=$(getopt -l version,help,clean,directory:,bootstrap,bootstrap-only,platform:,languages:,package:,jobs:,destdir:,savetemps,scripting,ccache,supported:,urls,nocolor -o Vhcd:bBp:l:P:j:D:tSys:un -- "$@")<br> getopt_ret=$?<br> eval set -- "$args"<br> else<br> # Detected non-GNU getopt<br>- args=$(getopt Vhcd:bp:l:P:j:D:tSys:un $*)<br>+ args=$(getopt Vhcd:bBp:l:P:j:D:tSys:un $*)<br> getopt_ret=$?<br> set -- $args<br> fi<br>@@ -847,22 +847,23 @@<br> <br> while true ; do<br> case "$1" in<br>- -V|--version) shift; myversion; exit 0;;<br>- -h|--help) shift; myhelp; exit 0;;<br>- -c|--clean) shift; clean=1;;<br>- -t|--savetemps) shift; SAVETEMPS=1;;<br>- -d|--directory) shift; TARGETDIR="$1"; shift;;<br>- -b|--bootstrap) shift; BOOTSTRAP=1;;<br>- -p|--platform) shift; TARGETARCH="$1"; shift;;<br>- -l|--languages) shift; LANGUAGES="$1"; shift;;<br>- -D|--destdir) shift; DESTDIR="$1"; shift;;<br>- -j|--jobs) shift; THREADS="$1"; JOBS="-j $1"; shift;;<br>- -P|--package) shift; PACKAGE="$1"; shift;;<br>- -S|--scripting) shift; SKIPPYTHON=0;;<br>- -y|--ccache) shift; USECCACHE=1;;<br>- -s|--supported) shift; PRINTSUPPORTED="$1"; shift;;<br>- -u|--urls) shift; printf "%s\n" "$ALL_ARCHIVES"; exit 0;;<br>- -n|--nocolor) shift; \<br>+ -V|--version) shift; myversion; exit 0;;<br>+ -h|--help) shift; myhelp; exit 0;;<br>+ -c|--clean) shift; clean=1;;<br>+ -t|--savetemps) shift; SAVETEMPS=1;;<br>+ -d|--directory) shift; TARGETDIR="$1"; shift;;<br>+ -b|--bootstrap) shift; BOOTSTRAP=1;;<br>+ -B|--bootstrap-only) shift; BOOTSTRAPONLY=1; BOOTSTRAP=1;;<br>+ -p|--platform) shift; TARGETARCH="$1"; shift;;<br>+ -l|--languages) shift; LANGUAGES="$1"; shift;;<br>+ -D|--destdir) shift; DESTDIR="$1"; shift;;<br>+ -j|--jobs) shift; THREADS="$1"; JOBS="-j $1"; shift;;<br>+ -P|--package) shift; PACKAGE="$1"; shift;;<br>+ -S|--scripting) shift; SKIPPYTHON=0;;<br>+ -y|--ccache) shift; USECCACHE=1;;<br>+ -s|--supported) shift; PRINTSUPPORTED="$1"; shift;;<br>+ -u|--urls) shift; printf "%s\n" "$ALL_ARCHIVES"; exit 0;;<br>+ -n|--nocolor) shift; \<br> unset red RED green GREEN blue BLUE cyan CYAN NC;;<br> --) shift; break;;<br> *) break;;<br>@@ -1142,6 +1143,14 @@<br> done<br> printf "Unpacked and patched ... ${green}ok${NC}\n"<br> <br>+if [ -n "$BOOTSTRAPONLY" ]; then<br>+ printf "Building bootstrap compiler only ... \n"<br>+ for pkg in GMP MPFR MPC LIBELF GCC; do<br>+ build_for_host $pkg<br>+ done<br>+ exit 0<br>+fi<br>+<br> printf "Building packages ... \n"<br> for package in $PACKAGES; do<br> build $package<br></pre><p>To view, visit <a href="https://review.coreboot.org/21683">change 21683</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/21683"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I089b51d1b898d4cf530845ba51283997fd229451 </div>
<div style="display:none"> Gerrit-Change-Number: 21683 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Patrick Georgi <pgeorgi@google.com> </div>