Open tpetazzoni opened 2 years ago
I am also not sure the best approach to resolving this issue. I would suggest opening this question up on the crossgcc (crossgcc@sourceware.org) mailing list.
This is because crosstool-ng does carry some extra target packages (gdb, strace & ltrace) an some libraries (I think there's even an open issue wanting zlib for the target). This makes sense for a minimal standalone toolchain but isn't great when the toolchain is a smaller part of a larger package ecosystem like buildroot.
I think what we could do is have a "pure"/"buildroot compatible"/"some other name" kconfig option that disables the target packages. Or perhaps it's just a documentation thing that when building a toolchain for use with buildroot don't enable gdb/strace/other packages provided by buildroot.
Indeed, I also thought of an explicit option "please generate a toolchain that is just a toolchain". Another possibility is perhaps installing those libraries in another place than the toolchain sysroot ? But I'm not sure how that would work really.
This is not really an issue per-se, but more a discussion topic.
I've recently encountered a situation where Buildroot got confused because the Crosstool-NG toolchain it was using as an external toolchain containing in its sysroot more than the C library. Indeed, the Crosstool-NG toolchain sysroot also contained the libexpat library, used as a dependency to GDB.
This broke things because:
So essentially, the fact that Crosstool-NG generates toolchains that are not "pure" (i.e only contains the C library in their sysroot) causes a problem for build systems that use Crosstool-NG as external toolchains.
I am unclear on what would be the approach to resolve this issue, but I wanted to open the discussion, and see if there are some useful suggestions.