From 198d23c119bdf375ffa7ef57b6172755d6490213 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Sat, 8 Dec 2012 08:02:44 +0100 Subject: 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 Reviewed-on: http://review.coreboot.org/2013 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- util/crossgcc/buildgcc | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'util') 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" || \ -- cgit v1.2.3