summaryrefslogtreecommitdiff
path: root/util/crossgcc
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2016-11-14 11:56:11 -0700
committerMartin Roth <martinroth@google.com>2016-11-17 17:57:47 +0100
commitc295d5e24964e877c427d82bd02803fddf90e9fe (patch)
tree05a9ae20b11069521dab2296393aa98f05549434 /util/crossgcc
parentb9e8ad8f681042bae5f3da420719f64b2fd75141 (diff)
crossgcc/buildgcc: Add package version to saved .success file
Previously, the .success file for each target didn't save the version, of the package that was built. This created problems when someone wanted to update to a new version and could not rebuild. Change-Id: I9975b198ac4a7de8ff9323502e1cbd0379a1dbb8 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17417 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'util/crossgcc')
-rwxr-xr-xutil/crossgcc/buildgcc11
1 files changed, 7 insertions, 4 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index 4883754078..949e17c396 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -359,11 +359,10 @@ generic_build()
host_target=$2
builddir=$3
success=$4
+ version=$5
fn_exists build_$package || return
- version="$(eval echo \$$package"_VERSION")"
-
mkdir -p "$builddir"
if [ -f "$success" ]; then
@@ -387,12 +386,16 @@ generic_build()
build_for_host()
{
- generic_build $1 host build-$1 "${TARGETDIR}/.$1.success"
+ package="$1"
+ version="$(eval echo \$$package"_VERSION")"
+ generic_build "$package" host "build-$package" "${TARGETDIR}/.${package}.${version}.success" "$version"
}
build_for_target()
{
- generic_build $1 target build-${TARGETARCH}-$1 "${TARGETDIR}/.${TARGETARCH}-$1.success"
+ package="$1"
+ version="$(eval echo \$$package"_VERSION")"
+ generic_build "$package" target "build-${TARGETARCH}-$package" "${TARGETDIR}/.${TARGETARCH}-${package}.${version}.success" "$version"
}
build()