From f0e0e6ab4d819cc1e120e2869c9ec9dd02141aa0 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Thu, 22 Oct 2020 12:57:00 +0900 Subject: [PATCH] sim: Make.defs: tweak CXXFLAGS for LIBCXX --- boards/sim/sim/sim/scripts/Make.defs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/boards/sim/sim/sim/scripts/Make.defs b/boards/sim/sim/sim/scripts/Make.defs index f7dc83665f..23b6acdcf3 100644 --- a/boards/sim/sim/sim/scripts/Make.defs +++ b/boards/sim/sim/sim/scripts/Make.defs @@ -54,9 +54,9 @@ ifeq ($(CONFIG_STACK_CANARIES),y) endif ARCHCPUFLAGS = -fno-builtin -ARCHCPUFLAGSXX = -fno-builtin -nostdinc++ -fcheck-new +ARCHCPUFLAGSXX = -fno-builtin -nostdinc++ ifeq ($(CONFIG_CXX_EXCEPTION),) - ARCHCPUFLAGSXX += -fno-exceptions + ARCHCPUFLAGSXX += -fno-exceptions -fcheck-new endif ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wstrict-prototypes -Wundef @@ -100,6 +100,10 @@ CXXFLAGS := $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \ CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) AFLAGS := $(CFLAGS) -D__ASSEMBLY__ +ifeq ($(CONFIG_LIBCXX),y) + CXXFLAGS += -DLIBCXX_BUILDING_LIBCXXABI +endif + # Loadable module definitions CMODULEFLAGS = $(CFLAGS)