libc-test is mainly added to compare the behavior of nolibc to the system libc, it is meaningless and error-prone with cross compiling. Let's use HOSTCC instead of CC to avoid wrongly use cross compiler when CROSS_COMPILE is passed or customized. Signed-off-by: Zhangjin Wu <falcon@xxxxxxxxxxx> --- tools/testing/selftests/nolibc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index d1012f006405..91ccfc27780f 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -191,7 +191,7 @@ nolibc-test: nolibc-test.c endif libc-test: nolibc-test.c - $(QUIET_CC)$(CC) -o $@ $< + $(QUIET_CC)$(HOSTCC) -o $@ $< # local libc-test run-libc-test: libc-test -- 2.25.1