All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: JonY <10walls@gmail.com>
Cc: qemu-devel@nongnu.org, Sebastian Herbszt <herbszt@gmx.de>
Subject: Re: [Qemu-devel] [PATCH][RESEND] Set PTHREADLIBS to "-lpthreadGC2" for	MinGW
Date: Sun, 17 May 2009 19:06:02 +0100	[thread overview]
Message-ID: <20090517180602.GB13426@shareable.org> (raw)
In-Reply-To: <4A1013A1.20003@gmail.com>

JonY wrote:
> On 5/17/2009 20:21, Sebastian Herbszt wrote:
> >MinGW with pthreads-w32 requires "-lpthreadGC2" instead of "-lpthread".
> >
> >Signed-off-by: Sebastian Herbszt<herbszt@gmx.de>
> >
> >--- qemu-20090426/configure.orig	2009-04-26 13:28:03.000000000 +0200
> >+++ qemu-20090426/configure	2009-04-26 13:36:09.000000000 +0200
> >@@ -1143,6 +1143,9 @@
> >    if $cc $ARCH_CFLAGS -o $TMPE $PTHREADLIBS $TMPC 2>  /dev/null ; then
> >      pthread=yes
> >      PTHREADLIBS="-lpthread"
> >+    if test "$mingw32" = "yes" ; then
> >+      PTHREADLIBS="-lpthreadGC2"
> >+    fi
> >    fi
> >  fi
> 
> Hi,
> I think its better to check which library exists.
> 
> I have mine renamed to "libpthread.a" in MinGW because many packages 
> expect it to be called libpthread.
> 
> I'm fine with this change if the majority agrees to it.

I agree, check for library is most appropriate.

pthreads-w32 isn't a standard part of MinGW, and pthreads-w32 isn't
the only pthreads implementation that you can use with MinGW.

(Quick look).  No, my MinGW doesn't have it - after all the point of
MinGW is to provide a native Windows API GCC, not POSIX emulation.

If this were Autoconf, I'd write:

    AC_SEARCH_LIBS([pthread_create], [pthread pthreadGC2])

Not that "-lpthread" isn't always correct on other platforms - even if
it compiles.

-- Jamie

  reply	other threads:[~2009-05-17 18:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-17 12:21 [Qemu-devel] [PATCH][RESEND] Set PTHREADLIBS to "-lpthreadGC2" for MinGW Sebastian Herbszt
2009-05-17 13:39 ` JonY
2009-05-17 18:06   ` Jamie Lokier [this message]
2009-05-17 18:54     ` Sebastian Herbszt

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=20090517180602.GB13426@shareable.org \
    --to=jamie@shareable.org \
    --cc=10walls@gmail.com \
    --cc=herbszt@gmx.de \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.