summaryrefslogtreecommitdiffstats
path: root/util/crossgcc
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2016-04-06 15:57:03 -0700
committerMartin Roth <martinroth@google.com>2016-04-15 22:38:20 +0200
commit88352d736590590aafc2c0eba770b467fb1a49aa (patch)
tree7fe6d98eb58df1a959f010ddfe924a3fdd183d40 /util/crossgcc
parent831d65d0ba68be630e3c323e24e2be071456a9e8 (diff)
downloadcoreboot-88352d736590590aafc2c0eba770b467fb1a49aa.tar.gz
coreboot-88352d736590590aafc2c0eba770b467fb1a49aa.tar.bz2
coreboot-88352d736590590aafc2c0eba770b467fb1a49aa.zip
crossgcc: Add version number to script name
Store both the version number and git hash in the file name when copying the buildgcc script to the destination directory. Also, fix the quoting in the lines touched anyways, and move the script to $TARGETDIR/share/ Change-Id: Ib37dc2be57ee7f0ae18a0b954f537f8b4c2db9d0 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/14347 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'util/crossgcc')
-rwxr-xr-xutil/crossgcc/buildgcc6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index 0222b4cc0aa4..ea7c2e98538a 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -20,6 +20,7 @@ cd $(dirname $0)
CROSSGCC_DATE="April 3rd, 2016"
CROSSGCC_VERSION="1.38"
+CROSSGCC_COMMIT=$( git describe )
# default settings
PACKAGE=GCC
@@ -780,6 +781,7 @@ fi
# Prepare target directory for building GCC
# (dependencies must be in the PATH)
mkdir -p $DESTDIR$TARGETDIR/bin
+mkdir -p $DESTDIR$TARGETDIR/share
export PATH=$DESTDIR$TARGETDIR/bin:$PATH
# Download, unpack, patch and build all packages
@@ -806,8 +808,8 @@ printf "Packages built ... ${green}ok${NC}\n"
# Adding git information of current tree to target directory
# for reproducibility
PROGNAME=$(basename "$0")
-rm -f "$DESTDIR$TARGETDIR/$PROGNAME".commit.*
-cp "$PROGNAME" $DESTDIR$TARGETDIR/"$PROGNAME.commit.$(git describe)"
+rm -f "$DESTDIR$TARGETDIR/share/$PROGNAME-*"
+cp "$PROGNAME" "$DESTDIR$TARGETDIR/share/$PROGNAME-$CROSSGCC_VERSION-$CROSGCC_COMMIT"
if [ $SAVETEMPS -eq 0 ]; then
cleanup