selftests: sync: missing CFLAGS while compiling
authorAnders Roxell <anders.roxell@linaro.org>
Tue, 6 Feb 2018 22:23:39 +0000 (16:23 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:51:54 +0000 (07:51 +0200)
commit198e26a0efefb21c9854adc630011837bca45a72
tree31fcfc816ac2b11d2dd3827a2b948a51b40f0d60
parent4adc95c5a020996a2088b44f9e3bbf2e0b518efb
selftests: sync: missing CFLAGS while compiling

[ Upstream commit b2c93e300a11b419b4c67ce08e16fa1436d8118c ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/sync/Makefile