These are installed in /usr/share/toolchains. Just hardcode the two
possible names for now rather than invoking ls to get a list.
Details
- built a self-hosted world + kernel with base/* and suitable files in /usr/share/toolchains. These files set suitable settings per my mail to toolchains@ to turn off the build of base components that are replaced by the base packages and also fixup 'make delete-old' to not delete bits installed by the packages.
- also tested that 'make buildenv' creates an environment where the Right Thing (tm) happens
Note that I originally pursued a plan of support arbitrary files in
/etc/src.conf.d/, however, there is the problem of ignoring them
when CROSS_TOOLCHAIN is set to support cross builds and the risk of
invoking 'ls' to enumerate those files in each invocation of
make, etc. Note that the installed files I will add to the ports
shortly have to use 'export' for WITH/WITHOUT options since they
are only included in Makefile.inc1 and not by sub-makes.
Diff Detail
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 22916 Build 22002: arc lint + arc unit
Event Timeline
Technically seems fine.
Feels like a POLA issue though. If I happened to have some package installed then buildworld behaved differently.
Maybe CROSS_TOOLCHAIN=yes or CROSS_TOOLCHAIN=base?
I don't really care either way; default on like you have is fine too as I don't fully understand the use case.
My goal was that if a user has installed base/binutils or base/gcc, I wanted 'make buildworld' to work as-is rather than defaulting to building and installing older binaries that overwrote the files installed by the package. For a platform where external GCC becomes the only toolchain I don't think they should have to remember to use 'make CROSS_TOOLCHAIN=foo' every time. The separate files approach also lets a platform only use base/binutils if, for example, clang works, but lld does not.
FYI, as an update I found that this did break a cross-build that didn't use an explicit CROSS_TOOLCHAIN, e.g. make buildworld TARGET_ARCH=i386. I haven't committed this yet or the port changes to add the new files. I'll have to think a bit more about what the right solution is. I'd really like this to be seamless in terms of the base toolchain just being used without having to have an explicit CROSS_TOOLCHAIN.
Makefile.inc1 | ||
---|---|---|
71 | I think we want to gate this on some option like WITH_EXT_TOOLCHAIN so that you don't run afoul of situations where these are installed, but you don't want to use them for some builds. |