Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/futex: fix build for clang

Don't use the test-specific header files as source files to force a
target dependency, as clang will complain if more than one source file
is used for a compile command with a single '-o' flag.

Use the proper Makefile variables instead as defined in
tools/testing/selftests/lib.mk.

Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
Reviewed-by: André Almeida <andrealmeid@igalia.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

authored by

Ricardo Cañuelo and committed by
Shuah Khan
03cab65a 9abf2313

+2 -4
+2 -4
tools/testing/selftests/futex/functional/Makefile
··· 3 3 CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES) $(KHDR_INCLUDES) 4 4 LDLIBS := -lpthread -lrt 5 5 6 - HEADERS := \ 6 + LOCAL_HDRS := \ 7 7 ../include/futextest.h \ 8 8 ../include/atomic.h \ 9 9 ../include/logging.h 10 - TEST_GEN_FILES := \ 10 + TEST_GEN_PROGS := \ 11 11 futex_wait_timeout \ 12 12 futex_wait_wouldblock \ 13 13 futex_requeue_pi \ ··· 24 24 top_srcdir = ../../../../.. 25 25 DEFAULT_INSTALL_HDR_PATH := 1 26 26 include ../../lib.mk 27 - 28 - $(TEST_GEN_FILES): $(HEADERS)