From c89799c9962871f9400dcde3c36624a85849a357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 28 Jun 2019 00:11:01 +0300 Subject: [PATCH] Restore the original path before building widl When building on windows, the toolchain bin directory contains prefixless wrappers named "gcc.exe" and "clang.exe", even though the toolchain isn't functional yet at this stage. Restore the original path before building widl. A more complete solution might be to build widl first, before adding the newly built toolchain to the path. --- build-mingw-w64.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build-mingw-w64.sh b/build-mingw-w64.sh index c59cf31..11b9ddc 100755 --- a/build-mingw-w64.sh +++ b/build-mingw-w64.sh @@ -30,6 +30,7 @@ fi mkdir -p "$PREFIX" PREFIX="$(cd "$PREFIX" && pwd)" +ORIGPATH="$PATH" if [ -z "$HOST" ]; then # The newly built toolchain isn't crosscompiled; add it to the path. export PATH=$PREFIX/bin:$PATH @@ -128,6 +129,10 @@ if [ -n "$SKIP_INCLUDE_TRIPLET_PREFIX" ]; then ARCHS=x86_64 fi +# If building on windows, we've installed prefixless wrappers - these break +# building widl, as the toolchain isn't functional yet. Restore the original +# path. +export PATH=$ORIGPATH cd mingw-w64-tools/widl for arch in $ARCHS; do mkdir -p build-$CROSS_NAME$arch