summaryrefslogtreecommitdiffstats
path: root/toolchain/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain/gcc')
-rw-r--r--toolchain/gcc/Config.in12
-rw-r--r--toolchain/gcc/gcc-uclibc-4.x.mk29
2 files changed, 37 insertions, 4 deletions
diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in
index 51934d9d9..727b78997 100644
--- a/toolchain/gcc/Config.in
+++ b/toolchain/gcc/Config.in
@@ -156,6 +156,18 @@ config BR2_EXTRA_GCC_CONFIG_OPTIONS
help
Any additional gcc configure options you may want to include....
+config BR2_GCC_CROSS_CXX
+ bool "C++ cross-compiler support"
+ default n
+ help
+ Build a C++ cross-compiler
+
+config BR2_GCC_CROSS_FORTRAN
+ bool "Fortran cross-compiler support"
+ default n
+ help
+ Build a Fortran cross-compiler
+
config BR2_INSTALL_LIBSTDCPP
bool "Build/install c++ compiler and libstdc++?"
default n
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index fb8cb6908..c509c1f5f 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -75,9 +75,30 @@ GCC_STAGING_PREREQ= $(STAGING_DIR)/usr/lib/libc.a
GCC_TARGET_LANGUAGES:=c
-GCC_COMMON_PREREQ= $(wildcard $(BASE_DIR)/include/config/br2/install/libstdcpp* $(BASE_DIR)/include/config/br2/install/libgcj* $(BASE_DIR)/include/config/br2/install/objc* $(BASE_DIR)/include/config/br2/install/fortran* $(BASE_DIR)/include/config/br2/prefer/ima* $(BASE_DIR)/include/config/br2/toolchain/sysroot* $(BASE_DIR)/include/config/br2/use/sjlj/exceptions* $(BASE_DIR)/include/config/br2/gcc/shared/libgcc*)
-GCC_TARGET_PREREQ += $(GCC_COMMON_PREREQ) $(wildcard $(BASE_DIR)/include/config/br2/extra/target/gcc/config/options*)
-GCC_STAGING_PREREQ+= $(GCC_COMMON_PREREQ) $(wildcard $(BASE_DIR)/include/config/br2/extra/gcc/config/options*)
+GCC_CROSS_LANGUAGES:=c
+ifeq ($(BR2_GCC_CROSS_CXX),y)
+GCC_CROSS_LANGUAGES:=$(GCC_CROSS_LANGUAGES),c++
+endif
+ifeq ($(BR2_GCC_CROSS_FORTRAN),y)
+GCC_CROSS_LANGUAGES:=$(GCC_CROSS_LANGUAGES),fortran
+endif
+ifeq ($(BR2_GCC_CROSS_OBJC),y)
+GCC_CROSS_LANGUAGES:=$(GCC_CROSS_LANGUAGES),objc
+endif
+
+GCC_COMMON_PREREQ= $(wildcard $(BR2_DEPENDS_DIR)/br2/install/libstdcpp*)\
+$(wildcard $(BR2_DEPENDS_DIR)/br2/install/libgcj*)\
+$(wildcard $(BR2_DEPENDS_DIR)/br2/install/objc*)\
+$(wildcard $(BR2_DEPENDS_DIR)/br2/install/fortran*)\
+$(wildcard $(BR2_DEPENDS_DIR)/br2/prefer/ima*)\
+$(wildcard $(BR2_DEPENDS_DIR)/br2/toolchain/sysroot*)\
+$(wildcard $(BR2_DEPENDS_DIR)/br2/use/sjlj/exceptions*)\
+$(wildcard $(BR2_DEPENDS_DIR)/br2/gcc/shared/libgcc*)
+GCC_TARGET_PREREQ += $(GCC_COMMON_PREREQ) \
+$(wildcard $(BR2_DEPENDS_DIR)/br2/extra/target/gcc/config/options*)
+GCC_STAGING_PREREQ+= $(GCC_COMMON_PREREQ) \
+$(wildcard $(BR2_DEPENDS_DIR)/br2/extra/gcc/config/options*)\
+$(wildcard $(BR2_DEPENDS_DIR)/br2/gcc/cross/*)
ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
GCC_TARGET_LANGUAGES:=$(GCC_TARGET_LANGUAGES),c++
@@ -232,7 +253,7 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched $(GCC_STAGING_PREREQ)
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \
- --enable-languages=$(GCC_TARGET_LANGUAGES) \
+ --enable-languages=$(GCC_CROSS_LANGUAGES) \
$(BR2_CONFIGURE_STAGING_SYSROOT) \
$(BR2_CONFIGURE_BUILD_TOOLS) \
--disable-__cxa_atexit \