]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
atf: Fix ATF_BUILD_* values when not using the bootstrap compiler
authorAlex Richardson <arichardson@FreeBSD.org>
Wed, 3 Feb 2021 09:32:16 +0000 (09:32 +0000)
committerAlex Richardson <arichardson@FreeBSD.org>
Wed, 17 Mar 2021 12:23:26 +0000 (12:23 +0000)
commit4b6082c4985cc3d17b22f9734357837b62587232
tree7ea423081d5e1c3e4bd47ccd02b03705fe6c8746
parent1d8b72afe89c2b9d76fe94e00230c29b1e8ddea9
atf: Fix ATF_BUILD_* values when not using the bootstrap compiler

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.

Reviewed By: ngie, brooks
Differential Revision: https://reviews.freebsd.org/D28414

(cherry picked from commit 9b131f1e51a00c8bbbda32672fb5db88010400f6)
lib/atf/libatf-c/Makefile
lib/atf/libatf-c/Makefile.inc
lib/atf/libatf-c/tests/Makefile