From 790aab6c778c35e0fff662ee03be04cc79c81685 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Wed, 26 Apr 2017 17:35:35 +0200 Subject: [PATCH] crossgcc: fix DESTDIR builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We need to rewrite libtool's files (foo.la) a couple of times so it knows where to look (while still whining that $DESTDIR$TARGET != $TARGET. well, duh.) Change-Id: I54cafd47c76d855222ba905b5eb4533a23bdfd34 Signed-off-by: Patrick Georgi Reviewed-on: https://review.coreboot.org/19463 Tested-by: build bot (Jenkins) Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Reinauer --- util/crossgcc/buildgcc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index 3ebde85892..9239b5dae6 100755 --- a/util/crossgcc/buildgcc +++ b/util/crossgcc/buildgcc @@ -534,7 +534,7 @@ build_MPFR() { # work around build problem of libgmp.la if [ "$DESTDIR" != "" ]; then - perl -pi -e "s,$DESTDIR,," $DESTDIR$TARGETDIR/libgmp.la + perl -pi -e "s,$DESTDIR,," $DESTDIR$TARGETDIR/lib/libgmp.la fi } @@ -543,9 +543,20 @@ build_MPC() { --infodir=$TARGETDIR/info --with-mpfr=$DESTDIR$TARGETDIR \ --with-gmp=$DESTDIR$TARGETDIR CFLAGS="$HOSTCFLAGS" || \ touch .failed + + # work around build problem of libmpfr.la + if [ "$DESTDIR" != "" ]; then + perl -pi -e "s,$TARGETDIR/lib/libgmp.la,$DESTDIR\$&," $DESTDIR$TARGETDIR/lib/libmpfr.la + fi + $MAKE $JOBS || touch .failed $MAKE install DESTDIR=$DESTDIR || touch .failed + # work around build problem of libmpfr.la + if [ "$DESTDIR" != "" ]; then + perl -pi -e "s,$DESTDIR,," $DESTDIR$TARGETDIR/lib/libmpfr.la + fi + normalize_dirs }