Merge "Additional sysroot checks."
diff --git a/do-build b/do-build
index d5df0fc..041198a 100755
--- a/do-build
+++ b/do-build
@@ -298,9 +298,19 @@
die "Configuration not supported. Use --force to try anyway."
fi
- if [ "$BUILD" != "$HOST" ] && [ -z "$SYSROOT" ] && [ -z "$force" ]
+ if [ -z "$SYSROOT" ] && [ -z "$force" ]
then
- die "Sysroot expected when host differs from build system. Use --force to try anyway."
+ if [ "$BUILD" != "$HOST" ]
+ then
+ die "Sysroot expected when host differs from build system. Use --force to try anyway."
+ fi
+
+ split_arch_os "$TARGET"
+ local target_os="$RESULT_OS"
+ if [ "$BUILD" != "$TARGET" ] && [ "$target_os" != "none" ]
+ then
+ die "Sysroot expected when target OS differs build OS. Use --force to try anyway."
+ fi
fi
mkdir -p "$OUT_DIR" || die "Unable to create directory $OUT_DIR"