# HG changeset patch # User "Yann E. MORIN" # Date 1230140072 0 # Node ID 80c00c7d87348b7037359c7f4b2e9a1148832dd7 # Parent 2051ee3d1b75893a55b1f96ba13e11d9ef202613 Enable C++ for baremetal. /trunk/scripts/build/cc/gcc.sh | 7 5 2 0 +++++-- /trunk/config/cc.in | 8 2 6 0 ++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff -r 2051ee3d1b75 -r 80c00c7d8734 config/cc.in --- a/config/cc.in Tue Dec 23 22:20:25 2008 +0000 +++ b/config/cc.in Wed Dec 24 17:34:32 2008 +0000 @@ -28,8 +28,6 @@ config CC_SUPPORT_OBJCXX bool -if ! BARE_METAL - comment "Additional supported languages:" config CC_LANG_CXX @@ -43,6 +41,8 @@ Only select this if you know that your specific version of the compiler supports this language. +if ! BARE_METAL + config CC_LANG_FORTRAN bool prompt "Fortran" @@ -115,8 +115,4 @@ endif # ! BARE_METAL -if BARE_METAL -comment "Only C language supported on bare metal" -endif # BARE_METAL - endmenu diff -r 2051ee3d1b75 -r 80c00c7d8734 scripts/build/cc/gcc.sh --- a/scripts/build/cc/gcc.sh Tue Dec 23 22:20:25 2008 +0000 +++ b/scripts/build/cc/gcc.sh Wed Dec 24 17:34:32 2008 +0000 @@ -72,6 +72,7 @@ local build_libgcc local core_prefix_dir local extra_config + local lang_opt eval $1 eval $2 @@ -80,10 +81,11 @@ # In normal conditions, ( "${mode}" = "shared" ) implies # ( "${build_libgcc}" = "yes" ), but I won't check for that + CT_DoStep INFO "Installing ${mode} core C compiler" mkdir -p "${CT_BUILD_DIR}/build-cc-core-${mode}" cd "${CT_BUILD_DIR}/build-cc-core-${mode}" - CT_DoStep INFO "Installing ${mode} core C compiler" + lang_opt=c case "${mode}" in static) core_prefix_dir="${CT_CC_CORE_STATIC_PREFIX_DIR}" @@ -98,6 +100,7 @@ baremetal) core_prefix_dir="${CT_PREFIX_DIR}" extra_config="${extra_config} --with-newlib --enable-threads=no --disable-shared" + [ "${CT_CC_LANG_CXX}" = "y" ] && lang_opt="${lang_opt},c++" copy_headers=n ;; esac @@ -140,7 +143,7 @@ ${extra_config} \ --disable-nls \ --enable-symvers=gnu \ - --enable-languages=c \ + --enable-languages="${lang_opt}" \ --enable-target-optspace \ ${CT_CC_CORE_EXTRA_CONFIG}