util/crossgcc/buildgcc: Use pre-set CROSSGCC_VERSION if possible
commit02750d0400c3c75be6e6f68d0d35f1edfdbafd46
authorFelix Singer <felixsinger@posteo.net>
Sun, 17 Oct 2021 13:43:21 +0000 (17 15:43 +0200)
committerFelix Held <felix-coreboot@felixheld.de>
Thu, 21 Oct 2021 14:15:29 +0000 (21 14:15 +0000)
treeaa64ea8ddbd9915cd07b899f9f0a50f91fc65d43
parentb22a435d228f3e2288736a84147a5713bf2424e5
util/crossgcc/buildgcc: Use pre-set CROSSGCC_VERSION if possible

For reproducibility, a version string is appended to the version of the
tools used in the cross-toolchain. Currently, git is used to determine
that version string at runtime of this script. There are cases, where
it's not possible to determine that version string, e.g. when a release
tarball is used, and if so, the version string is just `v_`.

Thus, allow pre-setting the variable `CROSSGCC_VERSION`.

Change-Id: I888ccd877c93436b5e033528c43bd8667b8d2f10
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58396
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
util/crossgcc/buildgcc