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

selftests: sync: missing CFLAGS while compiling

Based on patch: https://patchwork.kernel.org/patch/10042045/

arch64-linux-gnu-gcc -c sync.c -o sync/sync.o
sync.c:42:29: fatal error: linux/sync_file.h: No such file or directory
#include <linux/sync_file.h>
^
CFLAGS is not used during the compile step, so the system instead of
kernel headers are used. Fix this by adding CFLAGS to the OBJS compile
rule.

Reported-by: Lei Yang <Lei.Yang@windriver.com>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>

authored by

Anders Roxell and committed by
Shuah Khan
b2c93e30 7928b2cb

+1 -1
+1 -1
tools/testing/selftests/sync/Makefile
··· 30 30 $(CC) -o $(TEST_CUSTOM_PROGS) $(OBJS) $(TESTS) $(CFLAGS) $(LDFLAGS) 31 31 32 32 $(OBJS): $(OUTPUT)/%.o: %.c 33 - $(CC) -c $^ -o $@ 33 + $(CC) -c $^ -o $@ $(CFLAGS) 34 34 35 35 $(TESTS): $(OUTPUT)/%.o: %.c 36 36 $(CC) -c $^ -o $@