- add possibility to select which cross-compilers to build
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Tue, 31 Jul 2007 15:07:06 +0000 (15:07 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Tue, 31 Jul 2007 15:07:06 +0000 (15:07 -0000)
- add prerequisites from the config

toolchain/gcc/Config.in
toolchain/gcc/gcc-uclibc-4.x.mk

index 51934d9d96ae97875507b89f08e0c4ee0adcaef9..727b78997a20b3dfc0046d604eb5de0b13f3e50c 100644 (file)
@@ -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
index fb8cb6908c188eddb0ec153798cc75bd204f7546..c509c1f5fc18ede642e8b7d68799f3129e84fe70 100644 (file)
@@ -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 \