From a4e2d34a0fa11a7728303dd761586492ed40b016 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Wed, 24 Dec 2008 17:34:32 +0000 Subject: 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 --git a/config/cc.in b/config/cc.in index d383be3..df714e2 100644 --- a/config/cc.in +++ b/config/cc.in @@ -28,8 +28,6 @@ config CC_SUPPORT_OBJC config CC_SUPPORT_OBJCXX bool -if ! BARE_METAL - comment "Additional supported languages:" config CC_LANG_CXX @@ -43,6 +41,8 @@ config CC_LANG_CXX 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 @@ config CC_LANG_OTHERS endif # ! BARE_METAL -if BARE_METAL -comment "Only C language supported on bare metal" -endif # BARE_METAL - endmenu diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index 089a9b9..09556c1 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -72,6 +72,7 @@ do_cc_core() { local build_libgcc local core_prefix_dir local extra_config + local lang_opt eval $1 eval $2 @@ -80,10 +81,11 @@ do_cc_core() { # 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 @@ do_cc_core() { 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 @@ do_cc_core() { ${extra_config} \ --disable-nls \ --enable-symvers=gnu \ - --enable-languages=c \ + --enable-languages="${lang_opt}" \ --enable-target-optspace \ ${CT_CC_CORE_EXTRA_CONFIG} -- cgit v0.10.2-6-g49f6