summaryrefslogtreecommitdiff
path: root/util/crossgcc/buildgcc
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2012-12-08 08:02:44 +0100
committerRonald G. Minnich <rminnich@gmail.com>2012-12-08 08:26:06 +0100
commit198d23c119bdf375ffa7ef57b6172755d6490213 (patch)
treeea3b01a292e9f49c18f5baa79eeeebe6f4e6df7d /util/crossgcc/buildgcc
parent5d01b765e35d8468f396e55c63754491b3af1587 (diff)
crossgcc: Normalize library directories
Various of the build scripts used upstream can't cope with multilib library paths (eg. lib64), so move things to a place where they can find them, if such paths are used. Change-Id: I0dd9bba9a9eadd92d8704157e868fb37c715ee91 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/2013 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'util/crossgcc/buildgcc')
-rwxr-xr-xutil/crossgcc/buildgcc26
1 files changed, 26 insertions, 0 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index f7f21f0612..c69e7cd219 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -78,6 +78,17 @@ cyan='\033[0;36m'
CYAN='\033[1;36m'
NC='\033[0m' # No Color
+normalize_dirs()
+{
+ mkdir -p $DESTDIR$TARGETDIR/lib
+ test -d $DESTDIR$TARGETDIR/lib32 && mv $DESTDIR$TARGETDIR/lib32/* $DESTDIR$TARGETDIR/lib
+ test -d $DESTDIR$TARGETDIR/lib64 && mv $DESTDIR$TARGETDIR/lib64/* $DESTDIR$TARGETDIR/lib
+ rmdir -p $DESTDIR$TARGETDIR/lib32 $DESTDIR$TARGETDIR/lib64
+
+ perl -pi -e "s,/lib32,/lib," $DESTDIR$TARGETDIR/lib/*.la
+ perl -pi -e "s,/lib64,/lib," $DESTDIR$TARGETDIR/lib/*.la
+}
+
searchgnu()
{
# $1 short name
@@ -327,6 +338,9 @@ printf "Building GMP ${GMP_VERSION} ... "
|| touch .failed
$MAKE $JOBS || touch .failed
$MAKE install DESTDIR=$DESTDIR || touch .failed
+
+ normalize_dirs
+
if [ ! -f .failed ]; then touch .success; fi
) > build-gmp/crossgcc-build.log 2>&1
test -r build-gmp/.failed && printf "${RED}failed${NC}\n" || \
@@ -354,6 +368,8 @@ printf "Building MPFR ${MPFR_VERSION} ... "
$MAKE $JOBS || touch .failed
$MAKE install DESTDIR=$DESTDIR || touch .failed
+ normalize_dirs
+
# work around build problem of libgmp.la
if [ "$DESTDIR" != "" ]; then
perl -pi -e "s,$DESTDIR,," $DESTDIR$TARGETDIR/libgmp.la
@@ -380,6 +396,8 @@ printf "Building MPC ${MPC_VERSION} ... "
$MAKE $JOBS || touch .failed
$MAKE install DESTDIR=$DESTDIR || touch .failed
+ normalize_dirs
+
if [ ! -f .failed ]; then touch .success; fi
) > build-mpc/crossgcc-build.log 2>&1
test -r build-mpc/.failed && printf "${RED}failed${NC}\n" || \
@@ -401,6 +419,8 @@ printf "Building libelf ${LIBELF_VERSION} ... "
$MAKE $JOBS || touch .failed
$MAKE install DESTDIR=$DESTDIR || touch .failed
+ normalize_dirs
+
if [ ! -f .failed ]; then touch .success; fi
) > build-libelf/crossgcc-build.log 2>&1
test -r build-libelf/.failed && printf "${RED}failed${NC}\n" || \
@@ -497,6 +517,9 @@ printf "Building Expat ${EXPAT_VERSION} ... "
--prefix=$TARGETDIR --target=${TARGETARCH} || touch .failed
$MAKE || touch .failed
$MAKE install DESTDIR=$DESTDIR || touch .failed
+
+ normalize_dirs
+
if [ ! -f .failed ]; then touch .success; fi
) > build-expat/crossgcc-build.log 2>&1
test -r build-expat/.failed && printf "${RED}failed${NC}\n" || \
@@ -518,6 +541,9 @@ printf "Building Python ${PYTHON_VERSION} ... "
--target=${TARGETARCH} || touch .failed
$MAKE $JOBS || touch .failed
$MAKE install DESTDIR=$DESTDIR || touch .failed
+
+ normalize_dirs
+
if [ ! -f .failed ]; then touch .success; fi
) > build-python/crossgcc-build.log 2>&1
test -r build-python/.failed && printf "${RED}failed${NC}\n" || \