mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-04-13 22:23:04 +00:00
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(-)
This commit is contained in:
parent
a3ffccfeff
commit
a4e2d34a0f
@ -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
|
||||
|
@ -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}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user