From 88352d736590590aafc2c0eba770b467fb1a49aa Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Wed, 6 Apr 2016 15:57:03 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/14347 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- util/crossgcc/buildgcc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'util') diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index 0222b4cc0a..ea7c2e9853 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 -- cgit v1.2.3