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 <reinauer@google.com> Change-Id: I91725af6b0fc486bd943d8e25cdce8d3e2503b3c Reviewed-on: http://review.coreboot.org/1998 Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Tested-by: build bot (Jenkins)
This commit is contained in:
@@ -309,6 +309,10 @@ fi
|
|||||||
|
|
||||||
mkdir -p build-gmp build-mpfr build-mpc build-libelf build-binutils \
|
mkdir -p build-gmp build-mpfr build-mpc build-libelf build-binutils \
|
||||||
build-gcc build-python build-expat
|
build-gcc build-python build-expat
|
||||||
|
|
||||||
|
mkdir -p $DESTDIR$TARGETDIR/bin
|
||||||
|
export PATH=$DESTDIR$TARGETDIR/bin:$PATH
|
||||||
|
|
||||||
if [ $SKIPGDB -eq 0 ]; then
|
if [ $SKIPGDB -eq 0 ]; then
|
||||||
mkdir -p build-gdb
|
mkdir -p build-gdb
|
||||||
fi
|
fi
|
||||||
@@ -330,11 +334,6 @@ test -r build-gmp/.failed && printf "${RED}failed${NC}\n" || \
|
|||||||
test -r build-gmp/.failed && exit 1
|
test -r build-gmp/.failed && exit 1
|
||||||
fi
|
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
|
# Now set CFLAGS to match GMP CFLAGS but strip out -pedantic
|
||||||
# as GCC 4.6.x fails if it's there.
|
# as GCC 4.6.x fails if it's there.
|
||||||
HOSTCFLAGS=`grep __GMP_CFLAGS $DESTDIR$TARGETDIR/include/gmp.h |cut -d\" -f2 |\
|
HOSTCFLAGS=`grep __GMP_CFLAGS $DESTDIR$TARGETDIR/include/gmp.h |cut -d\" -f2 |\
|
||||||
@@ -372,7 +371,6 @@ if [ -f build-mpc/.success ]; then
|
|||||||
else
|
else
|
||||||
printf "Building MPC ${MPC_VERSION} ... "
|
printf "Building MPC ${MPC_VERSION} ... "
|
||||||
(
|
(
|
||||||
#test `uname` = "Darwin" && CFLAGS="$CFLAGS -force_cpusubtype_ALL"
|
|
||||||
cd build-mpc
|
cd build-mpc
|
||||||
rm -f .failed
|
rm -f .failed
|
||||||
CC="$CC" ../${MPC_DIR}/configure --disable-shared --prefix=$TARGETDIR \
|
CC="$CC" ../${MPC_DIR}/configure --disable-shared --prefix=$TARGETDIR \
|
||||||
@@ -454,7 +452,6 @@ printf "Building GCC ${GCC_VERSION} ... "
|
|||||||
cd ..
|
cd ..
|
||||||
# Now, finally, we can build gcc:
|
# Now, finally, we can build gcc:
|
||||||
cd build-gcc
|
cd build-gcc
|
||||||
export PATH=$PATH:$DESTDIR$TARGETDIR/bin
|
|
||||||
rm -f .failed
|
rm -f .failed
|
||||||
# GCC does not honour HOSTCFLAGS at all. CFLAGS are used for
|
# GCC does not honour HOSTCFLAGS at all. CFLAGS are used for
|
||||||
# both target and host object files. This is pretty misdesigned.
|
# both target and host object files. This is pretty misdesigned.
|
||||||
@@ -495,7 +492,6 @@ else
|
|||||||
printf "Building Expat ${EXPAT_VERSION} ... "
|
printf "Building Expat ${EXPAT_VERSION} ... "
|
||||||
(
|
(
|
||||||
cd build-expat
|
cd build-expat
|
||||||
export PATH=$PATH:$DESTDIR$TARGETDIR/bin
|
|
||||||
rm -f .failed
|
rm -f .failed
|
||||||
CC="$CC" CFLAGS="$HOSTCFLAGS" ../${EXPAT_DIR}/configure --disable-shared \
|
CC="$CC" CFLAGS="$HOSTCFLAGS" ../${EXPAT_DIR}/configure --disable-shared \
|
||||||
--prefix=$TARGETDIR --target=${TARGETARCH} || touch .failed
|
--prefix=$TARGETDIR --target=${TARGETARCH} || touch .failed
|
||||||
@@ -517,7 +513,6 @@ else
|
|||||||
printf "Building Python ${PYTHON_VERSION} ... "
|
printf "Building Python ${PYTHON_VERSION} ... "
|
||||||
(
|
(
|
||||||
cd build-python
|
cd build-python
|
||||||
export PATH=$PATH:$DESTDIR$TARGETDIR/bin
|
|
||||||
rm -f .failed
|
rm -f .failed
|
||||||
CC="$CC" CFLAGS="$HOSTCFLAGS" ../${PYTHON_DIR}/configure --prefix=$TARGETDIR \
|
CC="$CC" CFLAGS="$HOSTCFLAGS" ../${PYTHON_DIR}/configure --prefix=$TARGETDIR \
|
||||||
--target=${TARGETARCH} || touch .failed
|
--target=${TARGETARCH} || touch .failed
|
||||||
@@ -539,7 +534,6 @@ else
|
|||||||
printf "Building GDB ${GDB_VERSION} ... "
|
printf "Building GDB ${GDB_VERSION} ... "
|
||||||
(
|
(
|
||||||
cd build-gdb
|
cd build-gdb
|
||||||
export PATH=$PATH:$DESTDIR$TARGETDIR/bin
|
|
||||||
export PYTHONHOME=$DESTDIR$TARGETDIR
|
export PYTHONHOME=$DESTDIR$TARGETDIR
|
||||||
rm -f .failed
|
rm -f .failed
|
||||||
LDFLAGS="-Wl,-rpath,\$\$ORIGIN/../lib/ -L$DESTDIR$TARGETDIR/lib \
|
LDFLAGS="-Wl,-rpath,\$\$ORIGIN/../lib/ -L$DESTDIR$TARGETDIR/lib \
|
||||||
@@ -562,7 +556,6 @@ else
|
|||||||
printf "Building IASL ${IASL_VERSION} ... "
|
printf "Building IASL ${IASL_VERSION} ... "
|
||||||
(
|
(
|
||||||
cd $IASL_DIR/generate/unix
|
cd $IASL_DIR/generate/unix
|
||||||
export PATH=$PATH:$DESTDIR$TARGETDIR/bin
|
|
||||||
rm -f .failed
|
rm -f .failed
|
||||||
CFLAGS="$HOSTCFLAGS"
|
CFLAGS="$HOSTCFLAGS"
|
||||||
$MAKE CC="$CC" iasl || touch .failed
|
$MAKE CC="$CC" iasl || touch .failed
|
||||||
|
Reference in New Issue
Block a user