From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 9BFEFA04A5;
	Tue, 16 Jun 2020 23:34:04 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id DD1151BFB5;
	Tue, 16 Jun 2020 23:34:03 +0200 (CEST)
Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com
 [209.85.167.41]) by dpdk.org (Postfix) with ESMTP id 443DC1BFB4
 for <dev@dpdk.org>; Tue, 16 Jun 2020 23:34:02 +0200 (CEST)
Received: by mail-lf1-f41.google.com with SMTP id u25so21533lfm.1
 for <dev@dpdk.org>; Tue, 16 Jun 2020 14:34:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=date:from:to:cc:subject:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=PzCSJ0/6lcUhuykHAWwolxD8mVdd8rFmaSbFofa0O0Q=;
 b=n7dQh33Ihupbzip5MAr+gO75Un39RQ2cJkXk+fvZ3dmbZuP2sfYklAe656fdZHBGDx
 1TLwTTj363A2lQf+VbJK1yEzb2VSlOnHZ5eC2ndp1Oix86AI5dh7mY9+fV5q7K3EDgVu
 QrvpUnSBlRICD065FhCfYtTi+W1oU2jsXELH93VYtE33ZBz9W7wQcKhSVC2slDsGDGcz
 Esh3ISaupEiF5Qj98SJpTpFZalQg1ctL+hCVS9rW0j1pfnwzqfibyY5tdBHpUTvzUEq+
 Oo86te9wGGYVURBBm7QYFkGQy6NbuGRLp7RWPOaMCK5VSACNSop7xxVVCrDWR6xIhhcg
 rbOA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=PzCSJ0/6lcUhuykHAWwolxD8mVdd8rFmaSbFofa0O0Q=;
 b=XXheasTLz18mG6hXBJ0TsmJKGX0U7OHxt7WXwK9ntKzZAUZheK4E6B/BslH+SCetxj
 cOCOiv7W9JtGVoQbpN8qiAuvenhHDvRyxzYnOdLfUCCNipi7EOMEHMxq3nDUD0QSZP6Z
 BKWbaMLF7XOxoO2T/myOcRiZ8ydTMqKPXoQf+uQ2dypA+UFoeAIaF+9nal4VZkQlf94M
 eCmYDQb8O28wVk5lwRzcyfRx2329ohQK6Q6PPbf+FvBu3tnoBLiS3hKGuwj2SoTfDjPF
 Wl0TF5IMpzLTm3WC6PUIMDQc0bV8zv1k95iGg16x2/5P47ey6UVnXllIGYlzfU3Ho8Yp
 ymPg==
X-Gm-Message-State: AOAM530Su92wfO7f2bHrs9fFAkBs30W0/hv73U3JghqwQZVtBhwat3B4
 e9DXCIZQSPuWL2erDT1V/Zs=
X-Google-Smtp-Source: ABdhPJw/mXANixOLzFh3rpLf/ya4j5SPTpy222H7ao+qRHeff6UHdScGkYdPOUjpOewnggAV66tGbA==
X-Received: by 2002:ac2:5a4b:: with SMTP id r11mr1641998lfn.39.1592343241810; 
 Tue, 16 Jun 2020 14:34:01 -0700 (PDT)
Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru.
 [37.110.65.23])
 by smtp.gmail.com with ESMTPSA id u9sm5483743ljd.9.2020.06.16.14.34.01
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 16 Jun 2020 14:34:01 -0700 (PDT)
Date: Wed, 17 Jun 2020 00:34:00 +0300
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: Tal Shnaiderman <talshn@mellanox.com>
Cc: Thomas Monjalon <thomas@monjalon.net>,
 "harini.ramakrishnan@microsoft.com" <harini.ramakrishnan@microsoft.com>,
 "dev@dpdk.org" <dev@dpdk.org>
Message-ID: <20200617003400.4fcbbce4@sovereign>
In-Reply-To: <AM0PR05MB53138CD01A5006AB6ECEC8F4A99C0@AM0PR05MB5313.eurprd05.prod.outlook.com>
References: <2439238.EZ8FaLj9Nj@thomas> <20200615034800.2d9b7590@sovereign>
 <AM0PR05MB53138CD01A5006AB6ECEC8F4A99C0@AM0PR05MB5313.eurprd05.prod.outlook.com>
X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Subject: Re: [dpdk-dev] MinGW guide
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On Mon, 15 Jun 2020 09:25:07 +0000
Tal Shnaiderman <talshn@mellanox.com> wrote:

> > Subject: Re: MinGW guide
> > 
> > On Sat, 13 Jun 2020 10:55:14 +0200
> > Thomas Monjalon <thomas@monjalon.net> wrote:  
> 
> [snip]
> 
> > > Then when installing mingw-w64-install.exe, a choice must be done
> > > between threads POSIX or Win32.
> > > If I understand well, POSIX must be chosen?  
> > 
> > Yes. DPDK config/meson.build now links with pthread if linker is not link.exe.
> >   
> 
> Where do we actually use pthread in Windows?

Nowhere indeed. Probably it was my mistake to link with it when adding MinGW
support. Shim is always used anyway.

> 
> > Note that maybe this can be relaxed (test needed!), i. e. link with pthread if
> > it is found, otherwise use shim. Benefit, if this works: no runtime
> > dependency on "libwinpthread-1.dll" for Windows.  
> 
> I was sure, since we create the threads with Win32 API (CreateThread), the correct option is Win32.
> My mingw-w64 is installed with that option and I didn't see issues with it.

Then I'm totally wrong. Your way MinGW-w64 produces an executable without
dependencies (apart from system libraries), so this should be preferred. I
tried and it works for me.

-- 
Dmitry Kozlyuk