summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Roth <gaumless@gmail.com>2023-08-20 20:21:17 -0600
committerFelix Singer <service+coreboot-gerrit@felixsinger.de>2023-08-21 18:30:53 +0000
commite59868c6b6b69262adad27686f8fbf410edba6d0 (patch)
tree8c0283f9f2c5e017d6f71814752bfa78294431da
parent6f063d97a662464b5900697bdff313e3cba06421 (diff)
util/crossgcc: Add --fetch option to download tarballs
The -f|--fetch option is being added to download and verify the tarballs without doing a build. This will be used specifically to archive the toolchain tarballs for the release. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Ia68dbdcbf2d0fa4bb433511dc5e2f980f6762204 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77333 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
-rwxr-xr-xutil/crossgcc/buildgcc9
1 files changed, 8 insertions, 1 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index 575073c603..1abb4a901a 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -30,6 +30,7 @@ DESTDIR=
SAVETEMPS=0
BOOTSTRAP=0
THREADS=1
+FETCH_ONLY=0
USE_COREBOOT_MIRROR=0
COREBOOT_MIRROR_URL="https://www.coreboot.org/releases/crossgcc-sources"
@@ -581,6 +582,7 @@ myhelp()
printf " (defaults to $TARGETDIR)\n\n"
printf " [-D|--destdir <dest dir>] destination directory to install cross compiler to\n"
printf " (for RPM builds, default unset)\n"
+ printf " [-f|--fetch] Download tarballs, but don't build anything\n"
printf " [-P|--package <package>] Build a specific package: GCC, CLANG, IASL\n"
printf " (defaults to $PACKAGE)\n"
printf "GCC specific options:\n"
@@ -928,7 +930,7 @@ getopt - > /dev/null 2>/dev/null || gcc -o getopt getopt.c
getoptbrand="$(getopt -V 2>/dev/null | sed -e '1!d' -e 's,^\(......\).*,\1,')"
if [ "${getoptbrand}" = "getopt" ]; then
# Detected GNU getopt that supports long options.
- args=$(getopt -l print-version,version,help,clean,directory:,bootstrap,bootstrap-only,platform:,languages:,package:,jobs:,destdir:,savetemps,scripting,ccache,supported:,urls,nocolor,mirror -o WVhcd:bBp:l:P:j:D:tSys:unm -- "$@")
+ args=$(getopt -l print-version,version,help,clean,directory:,bootstrap,bootstrap-only,platform:,languages:,package:,jobs:,destdir:,savetemps,scripting,ccache,supported:,urls,nocolor,mirror,fetch -o WVhcd:bBp:l:P:j:D:tSys:unmf -- "$@")
getopt_ret=$?
eval set -- "$args"
else
@@ -958,6 +960,7 @@ while true ; do
-l|--languages) shift; LANGUAGES="$1"; shift;;
-m|--mirror) shift; USE_COREBOOT_MIRROR=1;;
-D|--destdir) shift; DESTDIR="$1"; shift;;
+ -f|--fetch) shift; FETCH_ONLY=1;;
-j|--jobs) shift; THREADS="$1"; JOBS="-j $1"; shift;;
-P|--package) shift; PACKAGE="$1"; shift;;
-y|--ccache) shift; USECCACHE=1;;
@@ -1224,6 +1227,10 @@ for P in $PACKAGES; do
done
printf "Downloaded tarballs ... ${green}ok${NC}\n"
+if [ ${FETCH_ONLY} -eq 1 ]; then
+ exit 0
+fi
+
printf "Unpacking and patching ...\n"
for P in $PACKAGES; do
unpack_and_patch $P || exit 1