From 16bd789a735015470b431a1f3c9b5cce0ac23e87 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Fri, 7 Dec 2012 23:57:01 +0100 Subject: buildgcc: Clean up PATH handling This puts our installed binaries first in the search path, which is what we really want. ... and remove some dead code Signed-off-by: Stefan Reinauer Change-Id: I91725af6b0fc486bd943d8e25cdce8d3e2503b3c Reviewed-on: http://review.coreboot.org/1998 Reviewed-by: Ronald G. Minnich Tested-by: build bot (Jenkins) --- util/crossgcc/buildgcc | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'util') diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index 9e8dc45577..f7f21f0612 100755 --- a/util/crossgcc/buildgcc +++ b/util/crossgcc/buildgcc @@ -309,6 +309,10 @@ fi mkdir -p build-gmp build-mpfr build-mpc build-libelf build-binutils \ build-gcc build-python build-expat + +mkdir -p $DESTDIR$TARGETDIR/bin +export PATH=$DESTDIR$TARGETDIR/bin:$PATH + if [ $SKIPGDB -eq 0 ]; then mkdir -p build-gdb fi @@ -330,11 +334,6 @@ test -r build-gmp/.failed && printf "${RED}failed${NC}\n" || \ test -r build-gmp/.failed && exit 1 fi -#if [ "$DESTDIR" != "" -a ! -x $TARGETDIR ]; then -# # create compat link -# ln -s $DESTDIR$TARGETDIR $TARGETDIR -#fi - # Now set CFLAGS to match GMP CFLAGS but strip out -pedantic # as GCC 4.6.x fails if it's there. HOSTCFLAGS=`grep __GMP_CFLAGS $DESTDIR$TARGETDIR/include/gmp.h |cut -d\" -f2 |\ @@ -372,7 +371,6 @@ if [ -f build-mpc/.success ]; then else printf "Building MPC ${MPC_VERSION} ... " ( - #test `uname` = "Darwin" && CFLAGS="$CFLAGS -force_cpusubtype_ALL" cd build-mpc rm -f .failed CC="$CC" ../${MPC_DIR}/configure --disable-shared --prefix=$TARGETDIR \ @@ -454,7 +452,6 @@ printf "Building GCC ${GCC_VERSION} ... " cd .. # Now, finally, we can build gcc: cd build-gcc - export PATH=$PATH:$DESTDIR$TARGETDIR/bin rm -f .failed # GCC does not honour HOSTCFLAGS at all. CFLAGS are used for # both target and host object files. This is pretty misdesigned. @@ -495,7 +492,6 @@ else printf "Building Expat ${EXPAT_VERSION} ... " ( cd build-expat - export PATH=$PATH:$DESTDIR$TARGETDIR/bin rm -f .failed CC="$CC" CFLAGS="$HOSTCFLAGS" ../${EXPAT_DIR}/configure --disable-shared \ --prefix=$TARGETDIR --target=${TARGETARCH} || touch .failed @@ -517,7 +513,6 @@ else printf "Building Python ${PYTHON_VERSION} ... " ( cd build-python - export PATH=$PATH:$DESTDIR$TARGETDIR/bin rm -f .failed CC="$CC" CFLAGS="$HOSTCFLAGS" ../${PYTHON_DIR}/configure --prefix=$TARGETDIR \ --target=${TARGETARCH} || touch .failed @@ -539,7 +534,6 @@ else printf "Building GDB ${GDB_VERSION} ... " ( cd build-gdb - export PATH=$PATH:$DESTDIR$TARGETDIR/bin export PYTHONHOME=$DESTDIR$TARGETDIR rm -f .failed LDFLAGS="-Wl,-rpath,\$\$ORIGIN/../lib/ -L$DESTDIR$TARGETDIR/lib \ @@ -562,7 +556,6 @@ else printf "Building IASL ${IASL_VERSION} ... " ( cd $IASL_DIR/generate/unix - export PATH=$PATH:$DESTDIR$TARGETDIR/bin rm -f .failed CFLAGS="$HOSTCFLAGS" $MAKE CC="$CC" iasl || touch .failed -- cgit v1.2.3