diff options
author | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2012-03-04 20:08:49 +0100 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2012-03-04 20:08:49 +0100 |
commit | 746867063c0cef8514c9797e3ab72405c7b014ab (patch) | |
tree | 6ba6c7f7d0606498e7449706c25e4ed4b15e07d2 | |
parent | b132a16fcb413267684b2ba4f93b7e770002c42f (diff) | |
download | embtoolkit-746867063c0cef8514c9797e3ab72405c7b014ab.tar.gz embtoolkit-746867063c0cef8514c9797e3ab72405c7b014ab.tar.bz2 embtoolkit-746867063c0cef8514c9797e3ab72405c7b014ab.tar.xz |
Toolchain: gcc: give ability to use its git repository, instead of a tarball
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
-rw-r--r-- | kconfig/gcc-options.kconfig | 76 | ||||
-rw-r--r-- | kconfig/gcc.kconfig | 91 | ||||
-rw-r--r-- | mk/gcc.mk | 13 |
3 files changed, 129 insertions, 51 deletions
diff --git a/kconfig/gcc-options.kconfig b/kconfig/gcc-options.kconfig new file mode 100644 index 0000000..4d130c0 --- /dev/null +++ b/kconfig/gcc-options.kconfig @@ -0,0 +1,76 @@ +################################################################################ +# Embtoolkit +# Copyright(C) 2012 Abdoulaye Walsimou GAYE <awg@embtoolkit.org>. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +################################################################################ +# +# \file gcc-options.kconfig +# \brief gcc-options.kconfig of Embtoolkit +# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org> +# \date February 2012 +################################################################################ + +config EMBTK_GCC_MORE_LANGUAGES + bool "Support additional languages" + help + Additional languages that you wish your toolchain generates + binaries. + +config EMBTK_GCC_LANGUAGE_CPP + bool "Support C++" + depends on EMBTK_GCC_MORE_LANGUAGES + select KEMBTK_UCLIBC_UCLIBC_HAS_FLOATS if EMBTK_CLIB_UCLIBC + select KEMBTK_UCLIBC_UCLIBC_SUSV3_LEGACY if EMBTK_CLIB_UCLIBC + select KEMBTK_UCLIBC_UCLIBC_CTOR_DTOR if EMBTK_CLIB_UCLIBC + select KEMBTK_UCLIBC_UCLIBC_DYNAMIC_ATEXIT if EMBTK_CLIB_UCLIBC + select KEMBTK_EGLIBC_OPTION_EGLIBC_LIBM if EMBTK_CLIB_EGLIBC + select KEMBTK_EGLIBC_OPTION_POSIX_C_LANG_WIDE_CHAR if EMBTK_CLIB_EGLIBC + select KEMBTK_EGLIBC_OPTION_POSIX_WIDE_CHAR_DEVICE_IO if EMBTK_CLIB_EGLIBC + 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 + depends on !EMBTK_CLIB_UCLIBC + 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 + depends on !EMBTK_CLIB_UCLIBC + 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 + diff --git a/kconfig/gcc.kconfig b/kconfig/gcc.kconfig index cc648c3..1c62cba 100644 --- a/kconfig/gcc.kconfig +++ b/kconfig/gcc.kconfig @@ -39,6 +39,12 @@ choice bool "gcc-4.5.x" config EMBTK_GCC_VERSION_4_4_X bool "gcc-4.4.x" + config EMBTK_GCC_VERSION_GIT + bool "Use GCC git repository" + help + Answer Y here if you want to build your toolchain based + on GCC sources from its GIT repository. + See http://gcc.gnu.org/git/?p=gcc.git endchoice # GCC-4.6.x @@ -112,10 +118,34 @@ choice select EMBTK_GCC_NEED_PATCH endchoice +# +# GIT repository options +# +config EMBTK_GCC_GIT_BRANCH + string "Branch to use" + default "master" + depends on EMBTK_GCC_VERSION_GIT + help + The branch of the git repository to use, the default is master. + +config EMBTK_GCC_GIT_REVISION + string "Checkout a specific revision instead of the latest" + depends on EMBTK_GCC_VERSION_GIT + help + Chechout a specific revision instead of the latest. + +config EMBTK_GCC_REFSPEC + string + default "toolchain" + +# +# Use a specific GCC mirror +# config EMBTK_GCC_HAVE_MIRROR bool "Use a gcc mirror" + depends on !EMBTK_GCC_VERSION_GIT help - specify an alternate location where to download gcc sources + specify an alternate location where to download gcc sources. config EMBTK_GCC_HAVE_MIRROR_SITE depends on EMBTK_GCC_HAVE_MIRROR string "Mirror site" @@ -123,56 +153,9 @@ config EMBTK_GCC_HAVE_MIRROR_SITE help specify an alternate location where to download gcc sources. -config EMBTK_GCC_MORE_LANGUAGES - bool "Support additional languages" - help - Additional languages that you wish your toolchain generates binaries. - -config EMBTK_GCC_LANGUAGE_CPP - bool "Support C++" - depends on EMBTK_GCC_MORE_LANGUAGES - select KEMBTK_UCLIBC_UCLIBC_HAS_FLOATS if EMBTK_CLIB_UCLIBC - select KEMBTK_UCLIBC_UCLIBC_SUSV3_LEGACY if EMBTK_CLIB_UCLIBC - select KEMBTK_UCLIBC_UCLIBC_CTOR_DTOR if EMBTK_CLIB_UCLIBC - select KEMBTK_UCLIBC_UCLIBC_DYNAMIC_ATEXIT if EMBTK_CLIB_UCLIBC - select KEMBTK_EGLIBC_OPTION_EGLIBC_LIBM if EMBTK_CLIB_EGLIBC - select KEMBTK_EGLIBC_OPTION_POSIX_C_LANG_WIDE_CHAR if EMBTK_CLIB_EGLIBC - select KEMBTK_EGLIBC_OPTION_POSIX_WIDE_CHAR_DEVICE_IO if EMBTK_CLIB_EGLIBC - 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 - depends on !EMBTK_CLIB_UCLIBC - 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 - depends on !EMBTK_CLIB_UCLIBC - 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 - +# +# Versions strings for tarball packages. +# config EMBTK_GCC_VERSION_STRING string default "4.6.3" if EMBTK_GCC_VERSION_4_6_3 @@ -187,6 +170,7 @@ config EMBTK_GCC_VERSION_STRING default "4.4.3" if EMBTK_GCC_VERSION_4_4_3 default "4.4.2" if EMBTK_GCC_VERSION_4_4_2 default "4.4.1" if EMBTK_GCC_VERSION_4_4_1 + default "git" if EMBTK_GCC_VERSION_GIT config EMBTK_GCC_NEED_PATCH bool @@ -214,3 +198,8 @@ config EMBTK_GCC3_NEED_PATCH bool config EMBTK_GCC3_NEED_AUTORECONF bool + +# +# GCC various options (languages to support, etc.) +# +source kconfig/gcc-options.kconfig @@ -28,6 +28,7 @@ GCC_VERSION := $(call embtk_get_pkgversion,gcc) GCC_SITE := $(strip $(if $(CONFIG_EMBTK_GCC_HAVE_MIRROR), \ $(subst ",,$(strip $(CONFIG_EMBTK_GCC_HAVE_MIRROR_SITE))), \ http://ftp.gnu.org/gnu/gcc/gcc-$(GCC_VERSION))) +GCC_GIT_SITE := git://gcc.gnu.org/git/gcc.git GCC_PACKAGE := gcc-$(GCC_VERSION).tar.bz2 GCC_SRC_DIR := $(TOOLS_BUILD)/gcc-$(GCC_VERSION) @@ -68,6 +69,7 @@ gcc%_clean: GCC1_NAME := $(GCC_NAME) GCC1_VERSION := $(GCC_VERSION) GCC1_SITE := $(GCC_SITE) +GCC1_GIT_SITE := $(GCC_GIT_SITE) GCC1_PACKAGE := $(GCC_PACKAGE) GCC1_SRC_DIR := $(GCC_SRC_DIR) GCC1_BUILD_DIR := $(TOOLS_BUILD)/gcc1-build @@ -85,12 +87,16 @@ GCC1_CONFIGURE_OPTS := --with-sysroot=$(SYSROOT) \ --disable-libssp --disable-libgomp --disable-libmudflap --disable-nls \ --enable-languages=c --enable-target-optspace --disable-libquadmath +CONFIG_EMBTK_GCC1_VERSION_GIT := $(CONFIG_EMBTK_GCC_VERSION_GIT) +CONFIG_EMBTK_GCC1_REFSPEC := $(CONFIG_EMBTK_GCC_REFSPEC) + # # GCC second stage # GCC2_NAME := $(GCC_NAME) GCC2_VERSION := $(GCC_VERSION) GCC2_SITE := $(GCC_SITE) +GCC2_GIT_SITE := $(GCC_GIT_SITE) GCC2_PACKAGE := $(GCC_PACKAGE) GCC2_SRC_DIR := $(GCC_SRC_DIR) GCC2_BUILD_DIR := $(TOOLS_BUILD)/gcc2-build @@ -107,12 +113,16 @@ GCC2_CONFIGURE_OPTS := --with-sysroot=$(SYSROOT) \ --disable-libssp --disable-libgomp --disable-libmudflap --disable-nls \ --enable-languages=c --enable-target-optspace --disable-libquadmath +CONFIG_EMBTK_GCC2_VERSION_GIT := $(CONFIG_EMBTK_GCC_VERSION_GIT) +CONFIG_EMBTK_GCC2_REFSPEC := $(CONFIG_EMBTK_GCC_REFSPEC) + # # GCC last stage # GCC3_NAME := $(GCC_NAME) GCC3_VERSION := $(GCC_VERSION) GCC3_SITE := $(GCC_SITE) +GCC3_GIT_SITE := $(GCC_GIT_SITE) GCC3_PACKAGE := $(GCC_PACKAGE) GCC3_SRC_DIR := $(GCC_SRC_DIR) GCC3_BUILD_DIR := $(TOOLS_BUILD)/gcc3-build @@ -131,6 +141,9 @@ GCC3_CONFIGURE_OPTS := --with-sysroot=$(SYSROOT) \ --enable-threads --enable-shared --enable-target-optspace \ --disable-libquadmath $(GCC3_CONFIGURE_EXTRA_OPTIONS) +CONFIG_EMBTK_GCC3_VERSION_GIT := $(CONFIG_EMBTK_GCC_VERSION_GIT) +CONFIG_EMBTK_GCC3_REFSPEC := $(CONFIG_EMBTK_GCC_REFSPEC) + define embtk_postinstall_gcc3 $(Q)test -e $(GCC3_BUILD_DIR)/.gcc3_post_install || \ $(MAKE) $(GCC3_BUILD_DIR)/.gcc3_post_install |