[Buildroot] libstdc++ with external toolchain

Marco Braga marco.braga at gmail.com
Fri Oct 16 15:51:40 UTC 2009


Hello,

I am successfully using buildroot-2009.08 with external toolchain from
CodeSourcery, but I have a problem with the "Build/install c++
compiler and libstdc++?" option that sets BR2_INSTALL_LIBSTDCPP.
Basically the libstdc++ is not installed because buildroot expects
this to be in "lib" directory of the toolchain instead of "usr/lib"
(as is in CodeSourcery's toolchain for ARM).

I'd like to understand if this is the expected behavior or it is a bug.

Looking deeper into the issue, I've traced it to
"toolchain/external-toolchain/ext-tool.mk". If BR2_INSTALL_LIBSTDCPP
is set, then libstdc++.so is added to EXTERNAL_LIBS variable:

ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
EXTERNAL_LIBS+=libstdc++.so
endif

But then EXTERNAL_LIBS are searched only in "lib" dir and not in "usr/lib":

$(Q)for libs in $(EXTERNAL_LIBS); do \
  $(call copy_toolchain_lib_root,$(SYSROOT_DIR),$$libs,/lib,$(BR2_TOOLCHAIN_EXTERNAL_STRIP));
\
done

The result is tha copy_toolchain_lib_root only looks into "/lib" and
since the library is not found it is not copied.

Regards,
Marco


More information about the buildroot mailing list