external toolchain: check BR2_INSTALL_LIBSTDCPP
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 14 May 2010 11:24:43 +0000 (13:24 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 20 May 2010 20:34:28 +0000 (22:34 +0200)
Verify that the value of BR2_INSTALL_LIBSTDCPP set by the user in the
Buildroot configuration really matches the external toolchain
capabilities by checking that a C++ cross-compiler is available.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
toolchain/external-toolchain/ext-tool.mk

index 2c2562cde325e35fb5e263c86fa586627d936c3c..bb4809ccdd2d866ed0590361fad41b7a88958a26 100644 (file)
@@ -231,6 +231,15 @@ check_arm_abi = \
                exit 1 ; \
        fi ; \
 
+#
+# Check that the external toolchain supports C++
+#
+check_cplusplus = \
+       if ! test -x $(TARGET_CXX) ; then \
+               echo "BR2_INSTALL_LIBSTDCPP is selected but C++ support not available in external toolchain" ; \
+               exit 1 ; \
+       fi ; \
+
 #
 # Check that the cross-compiler given in the configuration exists
 #
@@ -288,6 +297,9 @@ endif
 ifeq ($(BR2_arm),y)
        $(Q)$(call check_arm_abi)
 endif
+ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
+       $(Q)$(call check_cplusplus)
+endif
 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y)
        $(Q)$(call check_uclibc,$(SYSROOT_DIR))
 else