From 159053ab629502b3db1dc5a14a2ba9c1fc450a77 Mon Sep 17 00:00:00 2001 From: "chao.an" Date: Fri, 8 May 2020 20:10:45 +0800 Subject: [PATCH] sim/c++: correct the compile flags fix the following linker error: nuttx.rel:(.eh_frame+0x93): undefined reference to `__gxx_personality_v0' Change-Id: I94f43a15275194d42199c91f276e8848ad5189f6 Signed-off-by: chao.an --- arch/sim/src/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/sim/src/Makefile b/arch/sim/src/Makefile index abb9a9e405..d6fdf23061 100644 --- a/arch/sim/src/Makefile +++ b/arch/sim/src/Makefile @@ -292,7 +292,9 @@ endif nuttx$(EXEEXT): cleanrel nuttx.rel $(HOSTOBJS) $(Q) echo "LD: nuttx$(EXEEXT)" - $(Q) "$(CC)" $(CCLINKFLAGS) $(LIBPATHS) -o $(TOPDIR)/$@ nuttx.rel $(HOSTOBJS) $(DRVLIB) $(STDLIBS) + $(if $(CONFIG_HAVE_CXX),\ + $(Q) "$(CXX)" $(CCLINKFLAGS) $(LIBPATHS) -o $(TOPDIR)/$@ nuttx.rel $(HOSTOBJS) $(DRVLIB) $(STDLIBS),\ + $(Q) "$(CC)" $(CCLINKFLAGS) $(LIBPATHS) -o $(TOPDIR)/$@ nuttx.rel $(HOSTOBJS) $(DRVLIB) $(STDLIBS)) $(Q) $(NM) $(TOPDIR)/$@ | \ grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ sort > $(TOPDIR)/System.map