On Fri, Jan 8, 2021 at 9:57 AM Anthony Merlino <anth...@vergeaero.com> wrote:
> Hey all, > > Would someone be willing to share their experience with libcxx and their > toolchain? This toolchain should work: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm > I've now caught up to the tip of master, which now downloads > and builds libcxx for me instead of using Alan's modified version. I am > facing an issue I've faced before, and would really love to properly > understand how this is supposed to work. > > My issues mostly center around libsupc++.a > > Currently, my build fails because it can't find libsupc++. From my > understanding, this should be provided by my toolchain. But I am using a > toolchain built by the NuttX buildroot and it does not build the C++ > libraries. I am not using RTTI or exceptions, so I don't need what > libsupc++.a doesn't only provide RTTI and exectpions, but also provide some basic functions called by compiler: https://github.com/gcc-mirror/gcc/tree/master/libstdc%2B%2B-v3/libsupc%2B%2B libsupc++ provides, however the Kconfig option > `[ ] Have libsupc++ (required)` > says, it's required. > > What's the right answer here? What are others doing about this? > > Three methods you can try: 1. Switch to the ARM maintained toolchain 2. Build libsupc++.a for NuttX toolchain 3. Enhance NuttX's libc++ runtime support https://github.com/apache/incubator-nuttx/tree/master/libs/libxx > Is getting NuttX buildroot to build and provide libsupc++.a the *right* > solution? > > Yes, a complete toolchain should provide libsupc++.a. libsupc++.a just like libgcc.a should part of toolchain, not part of c/c++ library implemetnation, because libsupc++.a tightly couple with the implementaion detail of compiler. > Do we need to change how libcxx is built in this case? > > https://libcxx.llvm.org/docs/BuildingLibcxx.html#using-alternate-abi-libraries > > Then you need port the libcxxrt: https://github.com/libcxxrt/libcxxrt > Thank you! > > Anthony >