You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2020/07/11 18:06:18 UTC
[incubator-nuttx] 01/04: sim/c++: correct the compile flags
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 159053ab629502b3db1dc5a14a2ba9c1fc450a77
Author: chao.an <an...@xiaomi.com>
AuthorDate: Fri May 8 20:10:45 2020 +0800
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 <an...@xiaomi.com>
---
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 abb9a9e..d6fdf23 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