From: Paolo Bonzini <pbonzini@redhat.com>
To: Lei Yang <Lei.Yang@windriver.com>,
shuahkh@osg.samsung.com, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH]] kvm: selftests: use -pthread instead of -lpthread
Date: Fri, 14 Sep 2018 19:38:04 +0200 [thread overview]
Message-ID: <6955862a-e192-fbfd-3ff3-cac7d70f02d0@redhat.com> (raw)
In-Reply-To: <1535526248-3759-1-git-send-email-Lei.Yang@windriver.com>
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
prev parent reply other threads:[~2018-09-14 17:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-29 7:04 Lei Yang
2018-09-14 17:38 ` Paolo Bonzini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6955862a-e192-fbfd-3ff3-cac7d70f02d0@redhat.com \
--to=pbonzini@redhat.com \
--cc=Lei.Yang@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuahkh@osg.samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome