Hello! Ricardo Wurmus <rek...@elephly.net> skribis:
> The latest version includes C++ sources for the firmware. > Unfortunately, our “arm-none-eabi” cross-compiler package does not > build libstdc++, nor does it come with any of the required C++ headers > like “cmath”. > > So I tried to change our “arm-none-eabi” cross-compiler packages to also > build and install libstdc++ but failed in a multitude of ways. The end > result is always that either the compiler fails to build (e.g. when > enabling libstdc++ via configure flags) or that the compiler fails to > find the header files that are included via “#include_next” directives > (e.g. when building libstdc++ as a separate package). > > Could someone with GCC experience give me a hint despite my vague > problem description? libstdc++ itself can probably be cross-built with: guix build libstdc++ --target=arm-none-eabi The problem is getting a cross-g++. I suspect libstdc++ sorta relies on having a “real” libc, which is why we normally do things like: (let ((triplet "arm-linux-gnueabihf")) (cross-gcc triplet (cross-binutils triplet) (cross-libc triplet)))) where the final ‘cross-gcc’ has C++ support. I’m not sure if it makes sense for the board you’re targeting, but maybe you could try building with a full-blown cross-gcc like this? HTH, Ludo’.