Martin Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48901 )
Change subject: util/crossgcc: Add date to the toolchain revision ......................................................................
util/crossgcc: Add date to the toolchain revision
With the current version method, it's not possible to determine if a different version is older or newer than the current version without digging into the repository and finding the dates for the version numbers.
This change adds the commit date to the start of the toolchain version which will let us tell at a glance how old or new the toolchain is.
It's not perfect because multiple toolchain commits can go in on the same day, but adding the time made the string even longer, and really doesn't help that much.
Signed-off-by: Martin Roth martin@coreboot.org Change-Id: I9c6d27667b922dc15e7a6e132e1beff69eed839c --- M util/crossgcc/Makefile.inc M util/crossgcc/buildgcc 2 files changed, 7 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/01/48901/1
diff --git a/util/crossgcc/Makefile.inc b/util/crossgcc/Makefile.inc index 74de5bd..f032964 100644 --- a/util/crossgcc/Makefile.inc +++ b/util/crossgcc/Makefile.inc @@ -54,7 +54,7 @@ test-toolchain: ifeq ($(COMPILER_OUT_OF_DATE),1) echo "The coreboot toolchain is not the current version." - $(error ) + $(error Halting) else echo "The coreboot toolchain is the current version." endif # ifeq ($(COMPILER_OUT_OF_DATE),1) diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index 5af3d5a..25b0d27 100755 --- a/util/crossgcc/buildgcc +++ b/util/crossgcc/buildgcc @@ -16,8 +16,7 @@
cd "$(dirname "$0")" || exit 1
-CROSSGCC_DATE="$(git log -n 1 --pretty=%ad --date=short .)" -CROSSGCC_VERSION="$(git log -n 1 --pretty=%h .)" +CROSSGCC_VERSION="$(git log -n 1 --pretty=%ad --date=short .)_$(git log -n 1 --pretty=%h .)" CROSSGCC_COMMIT=$( git describe )
# default settings @@ -591,7 +590,7 @@ }
printversion() { - printf "${blue}Welcome to the ${red}coreboot${blue} cross toolchain builder v$CROSSGCC_VERSION ($CROSSGCC_DATE)${NC}\n\n" + printf "${blue}Welcome to the ${red}coreboot${blue} cross toolchain builder v$CROSSGCC_VERSION ${NC}\n\n" }
myversion() @@ -728,7 +727,7 @@ ${GCC_OPTIONS} --enable-languages="${LANGUAGES}" \ --with-gmp="$DESTDIR$TARGETDIR" --with-mpfr="$DESTDIR$TARGETDIR" \ --with-mpc="$DESTDIR$TARGETDIR" \ - --with-pkgversion="coreboot bootstrap v$CROSSGCC_VERSION $CROSSGCC_DATE" \ + --with-pkgversion="coreboot bootstrap v$CROSSGCC_VERSION" \ && \ # shellcheck disable=SC2086 $MAKE $JOBS BOOT_CFLAGS="$HOSTCFLAGS" BUILD_CONFIG="" bootstrap && \ @@ -774,7 +773,7 @@ --with-gmp="$DESTDIR$TARGETDIR" --with-mpfr="$DESTDIR$TARGETDIR" \ --with-mpc="$DESTDIR$TARGETDIR" \ --with-gnu-as --with-gnu-ld \ - --with-pkgversion="coreboot toolchain v$CROSSGCC_VERSION $CROSSGCC_DATE" \ + --with-pkgversion="coreboot toolchain v$CROSSGCC_VERSION" \ && \ mkdir -p gcc/$TARGETARCH && \ ln -s "$DESTDIR$TARGETDIR/$TARGETARCH/bin" "gcc/$TARGETARCH/$GCC_VERSION" && \ @@ -842,7 +841,7 @@ test "$UNAME" = "FreeBSD" && HOST="_FreeBSD" test "$UNAME" = "Cygwin" && HOST="_CYGWIN" HOST="$HOST" CFLAGS="$CFLAGS" \ - OPT_CFLAGS="-O -D_FORTIFY_SOURCE=2 -D COREBOOT_TOOLCHAIN_VERSION='"coreboot toolchain v$CROSSGCC_VERSION $CROSSGCC_DATE"' " \ + OPT_CFLAGS="-O -D_FORTIFY_SOURCE=2 -D COREBOOT_TOOLCHAIN_VERSION='"coreboot toolchain v$CROSSGCC_VERSION"' " \ $MAKE $JOBS CC="$(hostcc host)" iasl acpibin acpidump acpiexec acpihelp acpisrc acpixtract rm -f "$DESTDIR$TARGETDIR/bin/{iasl,acpibin,acpidump,acpiexec,acpihelp,acpisrc,acpixtract}" || touch "$RDIR/.failed" cp bin/{iasl,acpibin,acpidump,acpiexec,acpihelp,acpisrc,acpixtract} "$DESTDIR$TARGETDIR/bin" || touch "$RDIR/.failed" @@ -857,7 +856,7 @@ cd - || exit 1
$CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$DESTDIR$TARGETDIR" \ - -DCLANG_VENDOR="coreboot toolchain v$CROSSGCC_VERSION $CROSSGCC_DATE - " \ + -DCLANG_VENDOR="coreboot toolchain v$CROSSGCC_VERSION - " \ -DCMAKE_BUILD_TYPE=Release ../$LLVM_DIR || touch .failed # shellcheck disable=SC2086 $MAKE $JOBS || touch .failed