nuttx使用uclibc在new的时候遇到__verbose_terminate_handler

在构建uClibc++时遇到undefined reference to _impure_ptr的问题,官方建议删除libsupc++.a中的vterminate.o并使用uClibc++提供的替代版本。该方法在某些情况下有效。问题最终被发现与arm-none-eabi-gcc的版本有关,使用4.9.3版本的gcc可以解决此问题,而7.x版本则导致失败。
摘要由CSDN通过智能技术生成

关于这个问题,官方的回答写在了Readme里面了

Undefined reference to _impure_ptr
----------------------------------
Problem: When building uClibc++ I encounter an undefined reference to
_impure_ptr like:

  LD: nuttx
  .../arm-none-eabi/lib/armv7e-m\libsupc++.a(vterminate.o): In function
  `__gnu_cxx::__verbose_terminate_handler()':
  vterminate.cc:(.text._ZN9__gnu_cxx27__verbose_terminate_handlerEv+0xfc):
  undefined reference to `_impure_ptr'

Solution: No good solution is known. The following works, however:

Locate Get the directory where you can find libsupc++:

  arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -print-file-name=libsupc++.a

Go to that directory and save a copy of vterminate.o (in case you want to
restore it later):

  cd <the-directory-containing-libsupc++.a>
  arm-none-eabi-ar.exe -x libsupc++.a v

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值