summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2017-04-26 17:35:35 +0200
committerPatrick Georgi <pgeorgi@google.com>2017-04-27 18:11:25 +0200
commit790aab6c778c35e0fff662ee03be04cc79c81685 (patch)
treedc2f620e3f7ca2a35bc560d736c686c0170af005 /util
parentbb368db2a40418bce712803839395263c653477b (diff)
downloadcoreboot-790aab6c778c35e0fff662ee03be04cc79c81685.tar.gz
coreboot-790aab6c778c35e0fff662ee03be04cc79c81685.tar.bz2
coreboot-790aab6c778c35e0fff662ee03be04cc79c81685.zip
crossgcc: fix DESTDIR builds
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 <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/19463 Tested-by: build bot (Jenkins) Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util')
-rwxr-xr-xutil/crossgcc/buildgcc13
1 files changed, 12 insertions, 1 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index 3ebde85892c3..9239b5dae64a 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
}