util/crossgcc: fix using -D

Otherwise errors similar to "touch: cannot touch
'${TARGETDIR}/.GMP.6.1.0.success': No such file
or directory" might occur.

Change-Id: I4f24c93a25b7d567d3ce14a0415d20fd0778c9c8
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/17603
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
Patrick Georgi 2016-11-25 15:27:41 +01:00 committed by Martin Roth
parent 696abfcfd3
commit 1b593e5ad7
1 changed files with 3 additions and 3 deletions

View File

@ -388,20 +388,20 @@ build_for_host()
{
package="$1"
version="$(eval echo \$$package"_VERSION")"
generic_build "$package" host "build-$package" "${TARGETDIR}/.${package}.${version}.success" "$version"
generic_build "$package" host "build-$package" "${DESTDIR}${TARGETDIR}/.${package}.${version}.success" "$version"
}
build_for_target()
{
package="$1"
version="$(eval echo \$$package"_VERSION")"
generic_build "$package" target "build-${TARGETARCH}-$package" "${TARGETDIR}/.${TARGETARCH}-${package}.${version}.success" "$version"
generic_build "$package" target "build-${TARGETARCH}-$package" "${DESTDIR}${TARGETDIR}/.${TARGETARCH}-${package}.${version}.success" "$version"
}
build()
{
if package_uses_targetarch $1; then
if [ $BOOTSTRAP -eq 1 -a ! -f "${TARGETDIR}/.GCC.success" ]; then
if [ $BOOTSTRAP -eq 1 -a ! -f "${DESTDIR}${TARGETDIR}/.GCC.success" ]; then
build_for_host GCC
fi
build_for_target $1