From 38d89a50b19c8beaa33f9fc3e7390ce53d8023ea Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Thu, 1 Jan 2015 09:39:07 -0800 Subject: [PATCH] scripts: do not include board binaries in $PATH The wrapper for `foo-config` style scripts updated `$PATH` so it could call the real script by name instead of full path. However this means that calls to shell utilities like `sed` may use the board's version instead of the build host's. This hasn't been a problem in the past because the board and host happened to be compatible but this may not always be true. In other news, come on people, switch to pkg-config already. --- .../third_party/coreos-overlay/coreos/scripts/config_wrapper | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/scripts/config_wrapper b/sdk_container/src/third_party/coreos-overlay/coreos/scripts/config_wrapper index 921bbd03ff..1444f8a91e 100755 --- a/sdk_container/src/third_party/coreos-overlay/coreos/scripts/config_wrapper +++ b/sdk_container/src/third_party/coreos-overlay/coreos/scripts/config_wrapper @@ -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"