Commit 6b578c8d authored by Thomas Petazzoni's avatar Thomas Petazzoni Committed by Peter Korsgaard
Browse files

toolchain: rework C++ options



Instead of having BR2_GCC_CROSS_CXX and BR2_INSTALL_LIBSTDCPP, with
BR2_GCC_CROSS_CXX not being visible (and therefore being useless),
let's just keep BR2_INSTALL_LIBSTDCPP to enable C++ in the toolchain
and install C++ libraries on the target.

We also take that opportunity to make BR2_INSTALL_LIBSTDCPP an hidden
option, which is selected by an option in Buildroot toolchain support
or an option in External toolchain support, just as we did for other
toolchain features.

Some work definitely remains to be done :

 - The name BR2_INSTALL_LIBSTDCPP is ugly, but we keep it for the
   moment in order to avoid changing all packages.

 - We should clarify the other language-related options (Fortran,
   Java, Objective-C, etc.).

Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: default avatar"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
parent 01b434b2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -307,7 +307,7 @@ ifneq ($(BR2_INET_IPV6),y)
DISABLE_IPV6= --disable-ipv6
endif

ifneq ($(BR2_GCC_CROSS_CXX),y)
ifneq ($(BR2_INSTALL_LIBSTDCPP),y)
TARGET_CONFIGURE_OPTS+=CXX=false
endif

+2 −2
Original line number Diff line number Diff line
config BR2_PACKAGE_LZMA
	bool "lzma"
	depends on BR2_GCC_CROSS_CXX
	depends on BR2_INSTALL_LIBSTDCPP
	depends on BR2_DEPRECATED
	help
	  Lempel Ziv compression method (LZMA) is a compression
@@ -9,4 +9,4 @@ config BR2_PACKAGE_LZMA
	  http://tukaani.org/lzma/

comment "lzma requires a toolchain with C++ support"
        depends on !BR2_GCC_CROSS_CXX && BR2_DEPRECATED
        depends on !BR2_INSTALL_LIBSTDCPP && BR2_DEPRECATED
+2 −2
Original line number Diff line number Diff line
@@ -25,11 +25,11 @@ config BR2_PACKAGE_RPM_BZIP2_PAYLOADS
config BR2_PACKAGE_RPM_XZ_PAYLOADS
	bool "support for xz payloads"
	depends on BR2_PACKAGE_RPM
	depends on BR2_GCC_CROSS_CXX
	depends on BR2_INSTALL_LIBSTDCPP
	help
	  Support for xz payloads in RPM.

comment "xz payload support requires a toolchain with c++ support"
	depends on !BR2_GCC_CROSS_CXX
	depends on !BR2_INSTALL_LIBSTDCPP

+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ GCC_STAGING_PREREQ+=$(STAGING_DIR)/usr/lib/libc.a
GCC_TARGET_LANGUAGES:=c

GCC_CROSS_LANGUAGES:=c
ifeq ($(BR2_GCC_CROSS_CXX),y)
ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
GCC_CROSS_LANGUAGES:=$(GCC_CROSS_LANGUAGES),c++
endif
ifeq ($(BR2_GCC_CROSS_FORTRAN),y)
+1 −1
Original line number Diff line number Diff line
@@ -220,7 +220,7 @@ check_arm_abi = \
check_cplusplus = \
	$(TARGET_CXX) -v > /dev/null 2>&1 ; \
	if test $$? -ne 0 ; then \
		echo "BR2_INSTALL_LIBSTDCPP is selected but C++ support not available in external toolchain" ; \
		echo "C++ support is selected but is not available in external toolchain" ; \
		exit 1 ; \
	fi

Loading