[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1509876499-18499-1-git-send-email-Lei.Yang@windriver.com>
Date: Sun, 5 Nov 2017 18:08:19 +0800
From: Lei Yang <Lei.Yang@...driver.com>
To: <lei.yang@...driver.com>, <shuahkh@....samsung.com>,
<linux-kselftest@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] selftests: fix compile error for sync
I got below error message when building sync test:
make[1]: Entering directory `tools/testing/selftests/sync'
gcc -c sync.c -o tools/testing/selftests/sync/sync.o
sync.c:42:29: fatal error: linux/sync_file.h: No such file or directory
#include <linux/sync_file.h>
obviously, CFLAGS and LDFLAGS are not used when comipling.
Signed-off-by: Lei Yang <Lei.Yang@...driver.com>
---
tools/testing/selftests/sync/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/sync/Makefile b/tools/testing/selftests/sync/Makefile
index 8e04d0a..46cbcc3 100644
--- a/tools/testing/selftests/sync/Makefile
+++ b/tools/testing/selftests/sync/Makefile
@@ -29,9 +29,9 @@ $(TEST_CUSTOM_PROGS): $(TESTS) $(OBJS)
$(CC) -o $(TEST_CUSTOM_PROGS) $(OBJS) $(TESTS) $(CFLAGS) $(LDFLAGS)
$(OBJS): $(OUTPUT)/%.o: %.c
- $(CC) -c $^ -o $@
+ $(CC) -c $^ -o $@ $(CFLAGS) $(LDFLAGS)
$(TESTS): $(OUTPUT)/%.o: %.c
- $(CC) -c $^ -o $@
+ $(CC) -c $^ -o $@ $(CFLAGS) $(LDFLAGS)
EXTRA_CLEAN := $(TEST_CUSTOM_PROGS) $(OBJS) $(TESTS)
--
1.9.1
Powered by blists - more mailing lists