mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] selftests: fix compile error for sync
@ 2017-11-05 10:08 Lei Yang
  2017-11-06 23:35 ` Shuah Khan
  0 siblings, 1 reply; 4+ messages in thread
From: Lei Yang @ 2017-11-05 10:08 UTC (permalink / raw)
  To: lei.yang, shuahkh, linux-kselftest, linux-kernel

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@windriver.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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-07 22:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-05 10:08 [PATCH] selftests: fix compile error for sync Lei Yang
2017-11-06 23:35 ` Shuah Khan
2017-11-07  1:14   ` lei yang
2017-11-07 22:54     ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®