Merge pull request #1218 from marineam/config-wrapper

scripts: do not include board binaries in $PATH
This commit is contained in:
Michael Marineau 2015-04-24 18:04:29 -07:00
commit 47cd160e0e

View File

@ -40,11 +40,9 @@ if [[ -z ${CHOST} ]] || [[ -z ${SYSROOT} ]] ; then
exit 1
fi
PATH="${SYSROOT}/usr/bin:${PATH}"
# Some wrappers will dynamically figure out where they're being run from,
# and then output a full path -I/-L path based on that. So we trim any
# expanded sysroot paths that might be in the output already to avoid
# having it be -L${SYSROOT}${SYSROOT}/usr/lib.
set -o pipefail
exec ${cfg} "$@" | sed -r "s:(-[IL])(${SYSROOT})?:\1${SYSROOT}:g"
exec ${SYSROOT}/usr/bin/${cfg} "$@" | sed -r "s:(-[IL])(${SYSROOT})?:\1${SYSROOT}:g"