summaryrefslogtreecommitdiff
path: root/toolchain/gcc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain/gcc/Makefile')
-rw-r--r--toolchain/gcc/Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index 175af8aae..8798b06d2 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -259,6 +259,10 @@ ifneq ($(ADK_TARGET_ABI_RISCV),)
GCC_CONFOPTS+= --with-abi=${ADK_TARGET_ABI_RISCV}
endif
+ifeq ($(ADK_TOOLCHAIN_GCC_NDS32),y)
+EXTRA_CXXFLAGS:= --std=c++03
+endif
+
ifeq (${ADK_MAKE_PARALLEL},y)
GCC_MAKEOPTS+= -j${ADK_MAKE_JOBS}
endif
@@ -286,8 +290,13 @@ GCC_BUILD_DIR_FINAL:= $(WRKBUILD)-final
$(GCC_BUILD_DIR_INITIAL)/.configured:
ifeq ($(ADK_TARGET_ARCH_XTENSA),y)
+ifeq ($(ADK_TARGET_ABI),)
tar xf $(ADK_TOPDIR)/target/xtensa/overlay/xtensa_$(ADK_TARGET_CPU_TYPE).tar \
--strip-components=1 -C $(WRKSRC) gcc
+else
+ tar xf $(ADK_TOPDIR)/target/xtensa/overlay/xtensa_$(ADK_TARGET_CPU_TYPE)_$(ADK_TARGET_ABI).tar \
+ --strip-components=1 -C $(WRKSRC) gcc
+endif
endif
mkdir -p $(GCC_BUILD_DIR_INITIAL)
# these symlinks are very important, do not remove
@@ -327,7 +336,7 @@ endif
CC='$(HOST_CC)' \
CXX='$(HOST_CXX)' \
CFLAGS="-O0 -g0 -fomit-frame-pointer" \
- CXXFLAGS="-O0 -g0 -fomit-frame-pointer" \
+ CXXFLAGS="-O0 -g0 -fomit-frame-pointer $(EXTRA_CXXFLAGS)" \
$(WRKBUILD)/configure \
${GCC_INITIAL_CONFOPTS} \
${GCC_CONFOPTS} \
@@ -368,7 +377,7 @@ $(WRKBUILD)/.compiled:
cd $(GCC_BUILD_DIR_FINAL); \
PATH='$(TARGET_PATH)' \
CC='$(HOST_CC)' \
- CXX='$(HOST_CXX)' \
+ CXX='$(HOST_CXX) $(EXTRA_CXXFLAGS)' \
CFLAGS_FOR_TARGET='$(TARGET_CFLAGS)' \
CXXFLAGS_FOR_TARGET='$(TARGET_CXXFLAGS)' \
$(WRKBUILD)/configure \