diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk index 50446ce914..257fab23f1 100644 --- a/toolchain/helpers.mk +++ b/toolchain/helpers.mk @@ -357,6 +357,14 @@ check_unusable_toolchain = \ echo "them unsuitable as external toolchains for build systems" ; \ echo "such as Buildroot." ; \ exit 1 ; \ + fi; \ + with_sysroot=`$${__CROSS_CC} -v 2>&1 |sed -r -e '/.* --with-sysroot=([^[:space:]]+)[[:space:]].*/!d; s//\1/'`; \ + if test "$${with_sysroot}" = "/" ; then \ + echo "Distribution toolchains are unsuitable for use by Buildroot," ; \ + echo "as they were configured in a way that makes them non-relocatable,"; \ + echo "and contain a lot of pre-built libraries that would conflict with"; \ + echo "the ones Buildroot wants to build."; \ + exit 1; \ fi #