[coreboot] New patch to review for coreboot: aa503b8 crossgcc: Normalize library directories
Patrick Georgi (patrick@georgi-clan.de)
gerrit at coreboot.org
Sat Dec 8 08:05:42 CET 2012
Patrick Georgi (patrick at georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2013
-gerrit
commit aa503b8a9656d3864a4734092a041a2bb77147fa
Author: Patrick Georgi <patrick at georgi-clan.de>
Date: Sat Dec 8 08:02:44 2012 +0100
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 at georgi-clan.de>
---
util/crossgcc/buildgcc | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index f7f21f0..c69e7cd 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" || \
More information about the coreboot
mailing list