Currently, we encode the full path and compile flags for the build
compiler in libatf. However, these values are not correct when
cross-compiling: For example, when I build on macOS, CC is set to the
host path /usr/local/Cellar/llvm/11.0.0_1/bin/clang-11. This path will
not exist on the target system.
Simplify this logic and use cc/cpp/c++ since those binaries will exist
on the target system unless the compiler was explicitly disabled.
I'm not convinced ATF needs to encode these values, but this is a
minimal fix for these tests when using a non-bootstrapped compiler.
Details
Details
I noticed this while testing an atf contrib update since one of the
tests now requires ATF_BUILD_CC.
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
IMO these tests are extremely dubious and fragile. Embedding cc/c++/cpp seems most likely to work at all. I think I've proposed something like this in the past.
Comment Actions
I agree with @brooks ; the functionality that involves compiling as part of tests is very dubious functionality that should be removed.
Comment Actions
I agree, I had a look at not compiling those tests but it seems like this change needs to be done inside ATF. For now this works around the problem.