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
40 lines
639 B
Makefile
40 lines
639 B
Makefile
# $FreeBSD$
|
|
|
|
.include <bsd.init.mk>
|
|
|
|
PACKAGE= tests
|
|
|
|
TESTS_SUBDIRS= detail
|
|
|
|
ATF= ${SRCTOP}/contrib/atf
|
|
.PATH: ${ATF}/atf-c
|
|
.PATH: ${ATF}/atf-c/detail
|
|
|
|
CFLAGS+= -DATF_INCLUDEDIR='"${INCLUDEDIR}"'
|
|
CFLAGS+= -I${ATF}
|
|
|
|
${PACKAGE}FILES+= macros_h_test.c
|
|
${PACKAGE}FILES+= unused_test.c
|
|
|
|
.for _T in atf_c_test \
|
|
build_test \
|
|
check_test \
|
|
error_test \
|
|
macros_test \
|
|
tc_test \
|
|
tp_test \
|
|
utils_test
|
|
ATF_TESTS_C+= ${_T}
|
|
SRCS.${_T}= ${_T}.c test_helpers.c
|
|
.endfor
|
|
|
|
.for _T in atf_c_test \
|
|
build_test \
|
|
check_test \
|
|
macros_test
|
|
TEST_METADATA.${_T}+= required_programs="cc"
|
|
.endfor
|
|
|
|
.include "Makefile.inc"
|
|
.include <bsd.test.mk>
|