* [PATCH]] kvm: selftests: use -pthread instead of -lpthread
@ 2018-08-29 7:04 Lei Yang
2018-09-14 17:38 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Lei Yang @ 2018-08-29 7:04 UTC (permalink / raw)
To: lei.yang, pbonzini, shuahkh, linux-kselftest, linux-kernel
I run into the following error
testing/selftests/kvm/dirty_log_test.c:285: undefined reference to `pthread_create'
testing/selftests/kvm/dirty_log_test.c:297: undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
my gcc version is gcc version 4.8.4
"-pthread" would work everywhere
Signed-off-by: Lei Yang <Lei.Yang@windriver.com>
---
tools/testing/selftests/kvm/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile
index 03b0f55..48c970c 100644
--- a/tools/testing/selftests/kvm/Makefile
+++ b/tools/testing/selftests/kvm/Makefile
@@ -20,7 +20,7 @@ INSTALL_HDR_PATH = $(top_srcdir)/usr
LINUX_HDR_PATH = $(INSTALL_HDR_PATH)/include/
LINUX_TOOL_INCLUDE = $(top_srcdir)tools/include
CFLAGS += -O2 -g -std=gnu99 -I$(LINUX_TOOL_INCLUDE) -I$(LINUX_HDR_PATH) -Iinclude -I$(<D) -I..
-LDFLAGS += -lpthread
+LDFLAGS += -pthread
# After inclusion, $(OUTPUT) is defined and
# $(TEST_GEN_PROGS) starts with $(OUTPUT)/
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH]] kvm: selftests: use -pthread instead of -lpthread
2018-08-29 7:04 [PATCH]] kvm: selftests: use -pthread instead of -lpthread Lei Yang
@ 2018-09-14 17:38 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2018-09-14 17:38 UTC (permalink / raw)
To: Lei Yang, shuahkh, linux-kselftest, linux-kernel
On 29/08/2018 09:04, Lei Yang wrote:
> I run into the following error
>
> testing/selftests/kvm/dirty_log_test.c:285: undefined reference to `pthread_create'
> testing/selftests/kvm/dirty_log_test.c:297: undefined reference to `pthread_join'
> collect2: error: ld returned 1 exit status
>
> my gcc version is gcc version 4.8.4
> "-pthread" would work everywhere
>
> Signed-off-by: Lei Yang <Lei.Yang@windriver.com>
> ---
> tools/testing/selftests/kvm/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile
> index 03b0f55..48c970c 100644
> --- a/tools/testing/selftests/kvm/Makefile
> +++ b/tools/testing/selftests/kvm/Makefile
> @@ -20,7 +20,7 @@ INSTALL_HDR_PATH = $(top_srcdir)/usr
> LINUX_HDR_PATH = $(INSTALL_HDR_PATH)/include/
> LINUX_TOOL_INCLUDE = $(top_srcdir)tools/include
> CFLAGS += -O2 -g -std=gnu99 -I$(LINUX_TOOL_INCLUDE) -I$(LINUX_HDR_PATH) -Iinclude -I$(<D) -I..
> -LDFLAGS += -lpthread
> +LDFLAGS += -pthread
>
> # After inclusion, $(OUTPUT) is defined and
> # $(TEST_GEN_PROGS) starts with $(OUTPUT)/
>
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-14 17:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-29 7:04 [PATCH]] kvm: selftests: use -pthread instead of -lpthread Lei Yang
2018-09-14 17:38 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).