@@ -555,6 +555,9 @@ define TOOLCHAIN_EXTERNAL_INSTALL_CORE
exit 1 ; \
fi ; \
ARCH_SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
+ if test ! -d "$${SYSROOT_DIR}" ; then \
+ SYSROOT_DIR=$$(echo -n "$${ARCH_SYSROOT_DIR}" | sed -r 's:(/libc/)([^&]*):\1:') ; \
+ fi ; \
ARCH_LIB_DIR="$(call toolchain_find_libdir,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
SUPPORT_LIB_DIR="" ; \
if test `find $${ARCH_SYSROOT_DIR} -name 'libstdc++.a' | wc -l` -eq 0 ; then \
With the Sourcery Codebench standard edition, the sysroot returned point to a non existant directory if no CFLAGS is specified. When copying external toolchain sysroot to staging, we need to create the symbolic link that matches the name of the subdirectory for the architecture variant in the original sysroot (ie: sgxx-glibc) To do that, SYSROOT_DIR must be different than ARCH_SYSROOT_DIR. So, set SYSROOT_DIR deduced from ARCH_SYSROOT_DIR by removing arch specific part at the end of the path. Signed-off-by: Romain Naour <romain.naour@openwide.fr> --- toolchain/toolchain-external/toolchain-external.mk | 3 +++ 1 file changed, 3 insertions(+)