Skip to content

Commit

Permalink
CPP: enable c++ compiler by default
Browse files Browse the repository at this point in the history
  • Loading branch information
franzflasch committed Nov 16, 2024
1 parent 4514215 commit 0e2f1f8
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 10 deletions.
10 changes: 5 additions & 5 deletions configs/target_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ function setup_default_config()

# If you want to enable c++ please specify:
#local enable_languages="c,c++"
local enable_languages="c"
local fake_cpp=""
local enable_languages="c,c++"
local CPP_COMPILER_NAME="${TARGET}-g++"

if [[ ${enable_languages} = "c" ]]; then
fake_cpp="fake"
CPP_COMPILER_NAME="false"
fi

# According to the gcc docs bootstrap is only enabled for native builds by default.
Expand All @@ -54,7 +54,7 @@ function setup_default_config()
)

# Notes:
# Add CC and a fake CXX to circumvent an issue in glibc in case of a c only build:
# In case of a c only build, we need to specify "CXX=false" otherwise the build won't work.
# https://sourceware.org/bugzilla/show_bug.cgi?id=24183
#
# CFLAGS: It seems there is an issue when building glibc with GCC-11, so we add
Expand All @@ -68,7 +68,7 @@ function setup_default_config()
"CFLAGS='-g -O2 \
-Wno-error=stringop-overread'"
"CC=${TARGET}-gcc"
"CXX=${TARGET}${fake_cpp}-g++"
"CXX=${CPP_COMPILER_NAME}"
"--host=${TARGET}"
"--prefix=${INSTALL}/${TARGET}"
"--with-headers=${INSTALL}/${TARGET}/include"
Expand Down
1 change: 0 additions & 1 deletion configs/targets/cortex-m0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ function config_cortex-m0() {
"--disable-shared"
"--with-float=soft"
"--disable-multilib"
"--enable-languages=c,c++"
)

GDB_CONFIGURATION=(
Expand Down
1 change: 0 additions & 1 deletion configs/targets/cortex-m3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ function config_cortex-m3() {
"--disable-shared"
"--with-float=soft"
"--disable-multilib"
"--enable-languages=c,c++"
)

GDB_CONFIGURATION=(
Expand Down
1 change: 0 additions & 1 deletion configs/targets/cortex-m4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ function config_cortex-m4() {
"--disable-shared"
"--with-float=hard"
"--disable-multilib"
"--enable-languages=c,c++"
)

GDB_CONFIGURATION=(
Expand Down
1 change: 0 additions & 1 deletion configs/targets/riscv32-baremetal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ function config_riscv32-baremetal() {
"--with-newlib"
"--disable-shared"
"--disable-multilib"
"--enable-languages=c,c++"
)

GDB_CONFIGURATION=(
Expand Down
1 change: 0 additions & 1 deletion configs/targets/riscv64-baremetal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ function config_riscv64-baremetal() {
"--with-newlib"
"--disable-shared"
"--disable-multilib"
"--enable-languages=c,c++"
)

GDB_CONFIGURATION=(
Expand Down

0 comments on commit 0e2f1f8

Please sign in to comment.