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
Attention is currently required from: Martin Roth. Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48901 )
Change subject: util/crossgcc: Add date to the toolchain revision ......................................................................
Patch Set 1:
(2 comments)
File util/crossgcc/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/48901/comment/6d520a43_eeed4611 PS1, Line 57: Halting deliberate?
File util/crossgcc/buildgcc:
https://review.coreboot.org/c/coreboot/+/48901/comment/b6f40368_c55a38af PS1, Line 19: ad Authored date will be very different from when the latest commit ends up in master. Should this be %cd to serve that new purpose?
Attention is currently required from: Martin Roth. Hello build bot (Jenkins), Patrick Georgi,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/48901
to look at the new patch set (#2).
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/buildgcc 1 file changed, 6 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/01/48901/2
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48901 )
Change subject: util/crossgcc: Add date to the toolchain revision ......................................................................
Patch Set 2:
(2 comments)
File util/crossgcc/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/48901/comment/2d225f6c_7d9ff1e6 PS1, Line 57: Halting
deliberate?
It was an intentional change, but it doesn't really fit in this commit, so I removed it.
File util/crossgcc/buildgcc:
https://review.coreboot.org/c/coreboot/+/48901/comment/95b60bf8_0aa5980e PS1, Line 19: ad
Authored date will be very different from when the latest commit ends up in master. […]
Done
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48901 )
Change subject: util/crossgcc: Add date to the toolchain revision ......................................................................
Patch Set 2: Code-Review+2
Patrick Georgi has submitted this change. ( 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/48901 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Patrick Georgi pgeorgi@google.com --- M util/crossgcc/buildgcc 1 file changed, 6 insertions(+), 7 deletions(-)
Approvals: build bot (Jenkins): Verified Patrick Georgi: Looks good to me, approved
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index 92b4712..c947dd4 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=%cd --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 && \ rm -f "gcc/$TARGETARCH/$GCC_VERSION" && \ @@ -843,7 +842,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" @@ -858,7 +857,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