From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id DFF4BBC57 for ; Mon, 24 May 2010 12:04:24 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuUAAGfs+UvRhLcckWdsb2JhbACeEBUBAQEBCQsKBxEGHLxohRME X-IronPort-AV: E=Sophos;i="4.53,290,1272837600"; d="scan'208";a="51118259" Received: from mx1.redhat.com ([209.132.183.28]) by mail3-smtp-sop.national.inria.fr with ESMTP; 24 May 2010 12:04:00 +0200 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4OA3lBU029109 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 24 May 2010 06:03:47 -0400 Received: from localhost (vpn2-8-99.ams2.redhat.com [10.36.8.99]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4OA3j7n028708; Mon, 24 May 2010 06:03:46 -0400 Date: Mon, 24 May 2010 11:03:44 +0100 From: "Richard W.M. Jones" To: Paul Steckler Cc: "caml-list@yquem.inria.fr" Subject: Re: Multi-threaded programs using MinGW x-compiler Message-ID: <20100524100344.GA3351@amd.home.annexia.org> References: <2EB36A07AAE8C44BBB1986425E7A22D00FF060AD0D@atp-mbx1.in.nicta.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2EB36A07AAE8C44BBB1986425E7A22D00FF060AD0D@atp-mbx1.in.nicta.com.au> User-Agent: Mutt/1.5.18 (2008-05-17) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-Spam: no; 0.00; mingw:01 steckler:01 compiler:01 defaults:01 threading:01 model:01 cross-:01 compiler:01 sizeof:01 sizeof:01 bindings:01 threads:01 wrote:01 int:01 int:01 On Mon, May 24, 2010 at 11:39:07AM +1000, Paul Steckler wrote: > At least with the Fedora distribution of that compiler, there's a > libthreadsnat.a, but it's missing some symbols. The source for that > library assumes the availability of pthreads and Unix-style signals > on the target. There is a pthreads library for MingGW, but there > isn't a complete emulation of signals on Windows. So I think > another approach is needed. Likely what's happening here is the configure script that we run (under Fedora of course) is detecting pthreads. We go through various hoops to modify the output of the configure script to suite Windows defaults, since the upstream configure script knows nothing about cross-compilation. However we probably didn't adjust the threading model, because I tend to avoid threads, and in any case this cross- compiler was more of a technology demonstration than something you'd necessarily want to use regularly. The real solution is to get the changes we've already made upstream, and get the upstream configure script to understand cross-compilation properly (especially that sizeof(int) on the host != sizeof(int) on the target). This is a lot of work, and I don't have the time now, what with the RHEL 6 crunch happening. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html