OSDN Git Service

selftests: filesystems/epoll: fix build error
authorShuah Khan <skhan@linuxfoundation.org>
Wed, 11 Dec 2019 00:12:33 +0000 (17:12 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 23 Dec 2019 17:52:40 +0000 (10:52 -0700)
commit7648dd9fc981cec52df8a635fa2eefc249e138b9
tree1af9b6533e5eae73168ac1c63d297b4f1a973355
parent46cf053efec6a3a5f343fead837777efe8252a46
selftests: filesystems/epoll: fix build error

epoll build fails to find pthread lib. Fix Makefile to use LDLIBS
instead of LDFLAGS. LDLIBS is the right flag to use here with -l
option when invoking ld.

gcc -I../../../../../usr/include/  -lpthread  epoll_wakeup_test.c  -o .../tools/testing/selftests/filesystems/epoll/epoll_wakeup_test
/usr/bin/ld: /tmp/ccaZvJUl.o: in function `kill_timeout':
epoll_wakeup_test.c:(.text+0x4dd): undefined reference to `pthread_kill'
/usr/bin/ld: epoll_wakeup_test.c:(.text+0x4f2): undefined reference to `pthread_kill'
/usr/bin/ld: /tmp/ccaZvJUl.o: in function `epoll9':
epoll_wakeup_test.c:(.text+0x6382): undefined reference to `pthread_create'
/usr/bin/ld: epoll_wakeup_test.c:(.text+0x64d2): undefined reference to `pthread_create'
/usr/bin/ld: epoll_wakeup_test.c:(.text+0x6626): undefined reference to `pthread_join'
/usr/bin/ld: epoll_wakeup_test.c:(.text+0x684c): undefined reference to `pthread_tryjoin_np'
/usr/bin/ld: epoll_wakeup_test.c:(.text+0x6864): undefined reference to `pthread_kill'
/usr/bin/ld: epoll_wakeup_test.c:(.text+0x6878): undefined reference to `pthread_join'

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/filesystems/epoll/Makefile