cc/gcc: Add support for golang

Signed-off-by: Richard Weinberger <richard@nod.at>
Message-Id: <ca374aef944e28a6ec3c.1383921708@azrael>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
This commit is contained in:
Yann E. MORIN" 2013-11-08 15:18:09 +01:00 committed by Richard Weinberger
parent bb151f2762
commit cf36828878
4 changed files with 17 additions and 0 deletions

View File

@ -31,6 +31,9 @@ config CC_SUPPORT_OBJC
config CC_SUPPORT_OBJCXX
bool
config CC_SUPPORT_GOLANG
bool
comment "Additional supported languages:"
config CC_LANG_CXX
@ -98,6 +101,17 @@ config CC_LANG_OBJCXX
Only select this if you know that your specific version of the
compiler supports this language.
config CC_LANG_GOLANG
bool
prompt "Go (EXPERIMENTAL)"
depends on EXPERIMENTAL
depends on CC_SUPPORT_GOLANG
help
Enable building a Go compiler.
Only select this if you know that your specific version of the
compiler supports this language.
config CC_LANG_OTHERS
string
prompt "Other languages (EXPERIMENTAL)"

View File

@ -343,6 +343,7 @@ config CC_GCC_4_8
select CC_GCC_HAS_BUILD_ID
select CC_GCC_HAS_LNK_HASH_STYLE
select CC_GCC_HAS_LIBQUADMATH
select CC_SUPPORT_GOLANG
config CC_GCC_4_8_or_later
bool

View File

@ -73,6 +73,7 @@ cc_gcc_lang_list() {
[ "${CT_CC_LANG_JAVA}" = "y" ] && lang_list+=",java"
[ "${CT_CC_LANG_OBJC}" = "y" ] && lang_list+=",objc"
[ "${CT_CC_LANG_OBJCXX}" = "y" ] && lang_list+=",obj-c++"
[ "${CT_CC_LANG_GOLANG}" = "y" ] && lang_list+=",go"
lang_list+="${CT_CC_LANG_OTHERS:+,${CT_CC_LANG_OTHERS}}"
printf "%s" "${lang_list}"

View File

@ -83,6 +83,7 @@ dump_single_sample() {
[ "${CT_CC_LANG_ADA}" = "y" ] && printf ",ADA"
[ "${CT_CC_LANG_OBJC}" = "y" ] && printf ",Objective-C"
[ "${CT_CC_LANG_OBJCXX}" = "y" ] && printf ",Objective-C++"
[ "${CT_CC_LANG_GOLANG}" = "y" ] && printf ",Go"
[ -n "${CT_CC_LANG_OTHERS}" ] && printf ",${CT_CC_LANG_OTHERS}"
printf ")\n"
printf " %-*s : %s (threads: %s)\n" ${width} "C library" "${CT_LIBC}${CT_LIBC_VERSION:+-}${CT_LIBC_VERSION}" "${CT_THREADS}"