1.1 --- a/scripts/build/cc/gcc.sh Mon Aug 15 21:42:28 2011 +0200
1.2 +++ b/scripts/build/cc/gcc.sh Mon Aug 15 22:52:51 2011 +0200
1.3 @@ -89,6 +89,7 @@
1.4 core_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" )
1.5 core_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
1.6 core_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
1.7 + core_opts+=( "lang_list=c" )
1.8 ;;
1.9 esac
1.10
1.11 @@ -113,6 +114,7 @@
1.12 core_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
1.13 core_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" )
1.14 core_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
1.15 + core_opts+=( "lang_list=c" )
1.16
1.17 # Do nothing for canadian-crosses, we already have a target compiler.
1.18 # Different conditions are at stake here:
1.19 @@ -162,6 +164,7 @@
1.20 # host : the machine the core will run on : tuple : (none)
1.21 # prefix : dir prefix to install into : dir : (none)
1.22 # complibs : dir where complibs are isntalled : dir : (none)
1.23 +# lang_list : the list of languages to build : string : (empty)
1.24 # build_libgcc : build libgcc or not : bool : no
1.25 # build_libstdcxx : build libstdc++ or not : bool : no
1.26 # build_staticlinked : build statically linked or not : bool : no
1.27 @@ -177,7 +180,7 @@
1.28 local host
1.29 local prefix
1.30 local complibs
1.31 - local lang_opt
1.32 + local lang_list
1.33 local cflags
1.34 local tmp
1.35 local -a host_libstdcxx_flags
1.36 @@ -192,7 +195,6 @@
1.37
1.38 CT_DoLog EXTRA "Configuring core C compiler"
1.39
1.40 - lang_opt=c
1.41 case "${mode}" in
1.42 static)
1.43 extra_config+=("--with-newlib")
1.44 @@ -209,7 +211,6 @@
1.45 extra_config+=("--with-newlib")
1.46 extra_config+=("--enable-threads=no")
1.47 extra_config+=("--disable-shared")
1.48 - [ "${CT_CC_LANG_CXX}" = "y" ] && lang_opt="${lang_opt},c++"
1.49 copy_headers=n
1.50 ;;
1.51 *)
1.52 @@ -374,7 +375,7 @@
1.53 --disable-libmudflap \
1.54 ${CC_CORE_SYSROOT_ARG} \
1.55 "${extra_config[@]}" \
1.56 - --enable-languages="${lang_opt}" \
1.57 + --enable-languages="${lang_list}" \
1.58 "${CT_CC_CORE_EXTRA_CONFIG_ARRAY[@]}"
1.59
1.60 if [ "${build_libgcc}" = "yes" ]; then
1.61 @@ -496,6 +497,7 @@
1.62 final_opts+=( "mode=baremetal" )
1.63 final_opts+=( "build_libgcc=yes" )
1.64 final_opts+=( "build_libstdcxx=yes" )
1.65 + final_opts+=( "lang_list=$( cc_gcc_lang_list )" )
1.66 if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then
1.67 final_opts+=( "build_staticlinked=yes" )
1.68 fi