diff options
author | Abdoulaye Walsimou Gaye <walsimou@walsimou.com> | 2009-07-12 18:43:58 +0200 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <walsimou@walsimou.com> | 2009-07-12 18:43:58 +0200 |
commit | 0c5493a99558c4b5b4b7a0da20daaf47977cbdf2 (patch) | |
tree | 43af2d316ce83a629f2c38ea29fcf59e644a9a85 | |
parent | 7b7c3d5f7c6779a80d0720ec771d530757d238cb (diff) | |
download | embtoolkit-0c5493a99558c4b5b4b7a0da20daaf47977cbdf2.tar.gz embtoolkit-0c5493a99558c4b5b4b7a0da20daaf47977cbdf2.tar.bz2 embtoolkit-0c5493a99558c4b5b4b7a0da20daaf47977cbdf2.tar.xz |
Toolchain: Add support for c++, objective-c, objective-c++, fortran
Signed-off-by: Abdoulaye Walsimou Gaye <walsimou@walsimou.com>
-rw-r--r-- | kconfig/gcc.kconfig | 48 | ||||
-rw-r--r-- | mk/arm-arch.mk | 5 | ||||
-rw-r--r-- | mk/gcc.mk | 40 |
3 files changed, 81 insertions, 12 deletions
diff --git a/kconfig/gcc.kconfig b/kconfig/gcc.kconfig index 8b5a32e..16de7fe 100644 --- a/kconfig/gcc.kconfig +++ b/kconfig/gcc.kconfig @@ -1,4 +1,4 @@ -######################################################################################### +################################################################################ # GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> # Copyright(C) 2009 GAYE Abdoulaye Walsimou. All rights reserved. # @@ -14,13 +14,13 @@ # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. -######################################################################################### +################################################################################ # # \file gcc.kconfig # \brief gcc.kconfig of Embtoolkit # \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> # \date May 2009 -######################################################################################### +################################################################################ choice prompt "Version of gcc you wish" default EMBTK_GCC_VERSION_4_3_3 @@ -39,10 +39,46 @@ choice bool "gcc-4.1.2" endchoice -config EMBTK_GCC_CFLAGS -string "Additional CFLAGS" +config EMBTK_GCC_MORE_LANGUAGES + bool "Support additional languages" help - additional CFLAGS to use at build time + Additional languages that you wish your toolchain generates binaries. + +config EMBTK_GCC_LANGUAGE_CPP + bool "Support C++" + depends on EMBTK_GCC_MORE_LANGUAGES + help + Your toolchain will be able to build C++ source code + +#config EMBTK_GCC_LANGUAGE_JAVA +# bool "Support Java" +# depends on EMBTK_GCC_MORE_LANGUAGES +# help +# Your toolchain will be able to build Java source code + +config EMBTK_GCC_LANGUAGE_OBJECTIVEC + bool "Support Objective-C" + depends on EMBTK_GCC_MORE_LANGUAGES + help + Your toolchain will be able to build Objective-C source code + +config EMBTK_GCC_LANGUAGE_OBJECTIVECPP + bool "Support Objective-C++" + depends on EMBTK_GCC_MORE_LANGUAGES + help + Your toolchain will be able to build Objective-C source code + +config EMBTK_GCC_LANGUAGE_FORTRAN + bool "Support Fortran" + depends on EMBTK_GCC_MORE_LANGUAGES + help + Your toolchain will be able to build fortran source code + +#config EMBTK_GCC_LANGUAGE_ADA +# bool "Support Ada" +# depends on EMBTK_GCC_MORE_LANGUAGES +# help +# Your toolchain will be able to build Ada source code config EMBTK_GCC_VERSION_STRING string diff --git a/mk/arm-arch.mk b/mk/arm-arch.mk index b57dacb..2a3701c 100644 --- a/mk/arm-arch.mk +++ b/mk/arm-arch.mk @@ -37,6 +37,11 @@ endif #GCC configure options GCC_WITH_CPU := --with-cpu=$(subst ",,$(strip $(CONFIG_EMBTK_ARM_MCU_STRING))) +#GCC extra configure options for arm +ifeq ($(CONFIG_EMBTK_GCC_LANGUAGE_JAVA),y) +GCC3_CONFIGURE_EXTRA_OPTIONS += --enable-sjlj-exceptions +endif + #Hard or soft floating point for GCC ifeq ($(CONFIG_EMBTK_SOFTFLOAT),y) GCC_WITH_FLOAT := --with-float=soft @@ -29,6 +29,34 @@ GCC1_BUILD_DIR := $(TOOLS_BUILD)/gcc1 GCC2_BUILD_DIR := $(TOOLS_BUILD)/gcc2 GCC3_BUILD_DIR := $(TOOLS_BUILD)/gcc3 +GCC_LANGUAGES =c + +ifeq ($(CONFIG_EMBTK_GCC_LANGUAGE_CPP),y) +GCC_LANGUAGES +=,c++ +endif + +ifeq ($(CONFIG_EMBTK_GCC_LANGUAGE_JAVA),y) +GCC_LANGUAGES +=,java +GCC3_CONFIGURE_EXTRA_OPTIONS += --enable-java-home +endif + +ifeq ($(CONFIG_EMBTK_GCC_LANGUAGE_OBJECTIVEC),y) +GCC_LANGUAGES +=,objc +endif + +ifeq ($(CONFIG_EMBTK_GCC_LANGUAGE_OBJECTIVECPP),y) +GCC_LANGUAGES +=,obj-c++ +endif + +ifeq ($(CONFIG_EMBTK_GCC_LANGUAGE_FORTRAN),y) +GCC_LANGUAGES +=,fortran +endif + +ifeq ($(CONFIG_EMBTK_GCC_LANGUAGE_ADA),y) +GCC_LANGUAGES +=,ada +endif +GCC_LANGUAGES :=$(patsubst "",,$(GCC_LANGUAGES)) + gcc1_install: $(GCC1_BUILD_DIR)/.built gcc2_install: $(GCC2_BUILD_DIR)/.built @@ -97,11 +125,9 @@ $(GCC3_BUILD_DIR)/.installed: $(GCC3_BUILD_DIR)/.configured PATH=$(PATH):$(TOOLS)/bin/ $(MAKE) -C $(GCC3_BUILD_DIR) && \ PATH=$(PATH):$(TOOLS)/bin/ $(MAKE) -C $(GCC3_BUILD_DIR) install ifeq ($(CONFIG_EMBTK_TARGET_ARCH_64BITS),y) - cp -d $(TOOLS)/$(STRICT_GNU_TARGET)/lib64/libgcc_s.so* $(SYSROOT)/lib64 - cp -d $(TOOLS)/$(STRICT_GNU_TARGET)/lib64/libstdc++.so* $(SYSROOT)/lib64 + cp -d $(TOOLS)/$(STRICT_GNU_TARGET)/lib64/*.so* $(SYSROOT)/lib64 else - cp -d $(TOOLS)/$(STRICT_GNU_TARGET)/lib/libgcc_s.so* $(SYSROOT)/lib - cp -d $(TOOLS)/$(STRICT_GNU_TARGET)/lib/libstdc++.so* $(SYSROOT)/lib + cp -d $(TOOLS)/$(STRICT_GNU_TARGET)/lib/*.so* $(SYSROOT)/lib @touch $@ endif @@ -115,7 +141,9 @@ $(GCC3_BUILD_DIR)/.configured: $(GCC_WITH_FLOAT) $(GCC_MULTILIB) $(GCC_WITH_ABI) \ --host=$(HOST_ARCH) --build=$(HOST_BUILD) --enable-__cxa_atexit \ --disable-libssp --disable-libgomp --disable-libmudflap --disable-nls \ - --enable-threads --enable-shared --enable-languages=c,c++ \ - --with-gmp=$(GMP_HOST_DIR) --with-mpfr=$(MPFR_HOST_DIR) + --enable-threads --enable-shared \ + --with-gmp=$(GMP_HOST_DIR) --with-mpfr=$(MPFR_HOST_DIR) \ + --enable-languages=`echo $(GCC_LANGUAGES) | sed 's/ //g'` \ + $(GCC3_CONFIGURE_EXTRA_OPTIONS) @touch $@ |