From a5057713a0394d189adc8b9abb0eb65592ecfc49 Mon Sep 17 00:00:00 2001 From: Bryan Hundven Date: Wed, 6 Jan 2016 11:22:58 -0800 Subject: [PATCH] gcc: Fix CC_GCC_ENABLE_CXX_FLAGS for mode=baremetal When creating a baremetal toolchain, CC_GCC_ENABLE_CXX_FLAGS has no effect. This closes #298 Signed-off-by: Bryan Hundven --- scripts/build/cc/100-gcc.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/build/cc/100-gcc.sh b/scripts/build/cc/100-gcc.sh index a54f6f93..195a185b 100644 --- a/scripts/build/cc/100-gcc.sh +++ b/scripts/build/cc/100-gcc.sh @@ -266,6 +266,11 @@ do_gcc_core_backend() { extra_config+=("--disable-__cxa_atexit") fi + if [ -n "${CT_CC_GCC_ENABLE_CXX_FLAGS}" + -a "${mode}" = "baremetal" ]; then + extra_config+=("--enable-cxx-flags=${CT_CC_GCC_ENABLE_CXX_FLAGS}") + fi + extra_config+=(--disable-libgomp) extra_config+=(--disable-libmudflap) @@ -705,6 +710,7 @@ do_gcc_backend() { if [ -n "${CT_CC_GCC_ENABLE_CXX_FLAGS}" ]; then extra_config+=("--enable-cxx-flags=${CT_CC_GCC_ENABLE_CXX_FLAGS}") fi + if [ "${CT_THREADS}" = "none" ]; then extra_config+=(--disable-libatomic) fi