[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] configure: correctly define PTHREAD_LIB
From: |
Daniel P. Berrange |
Subject: |
Re: [Qemu-devel] [PATCH] configure: correctly define PTHREAD_LIB |
Date: |
Fri, 29 Sep 2017 14:05:36 +0100 |
User-agent: |
Mutt/1.9.0 (2017-09-02) |
On Fri, Sep 29, 2017 at 03:52:34PM +0300, Alexey Perevalov wrote:
> On 09/29/2017 01:40 PM, Daniel P. Berrange wrote:
> > On Fri, Sep 29, 2017 at 01:11:14PM +0300, Alexey Perevalov wrote:
> > > In case of -pthread already exists in QEMU_CFLAGS,
> > > compilation of sample pthread program successed,
> > > but -pthread is not putting into PTHREAD_LIBS in this case.
> > > PTHREAD_LIB is using while compiling tests/migration/stress.
> > >
> > > Signed-off-by: Alexey Perevalov <address@hidden>
> > > ---
> > > configure | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/configure b/configure
> > > index 6587e80..a2dd044 100755
> > > --- a/configure
> > > +++ b/configure
> > > @@ -3359,6 +3359,7 @@ int main(void) {
> > > EOF
> > > if compile_prog "" "" ; then
> > > pthread=yes
> > > + PTHREAD_LIB="-pthread"
> > > else
> > > for pthread_lib in $PTHREADLIBS_LIST; do
> > > if compile_prog "" "$pthread_lib" ; then
> > We shouldn't do this because it affects whole of QEMU. The stress program
> > needs -lpthread because it is linking statically, so just add it to the
> > Makefile rule for building stress.
> ok, but I didn't find any explicit usage of PTHREAD_LIB,
> and avoiding it in Makefile I think will make PTHREAD_LIB
> redundant.
Oh yeah, actually PTHREAD_LIB is a variable i introduced specifically
for the stress program, so my comment above is wrong and I think your
patch is ok.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Re: [Qemu-devel] [PATCH] fix tests/migration/stress build, Daniel P. Berrange, 2017/09/29