From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id EFB90A055A; Thu, 27 Feb 2020 05:26:49 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0915A1BFFC; Thu, 27 Feb 2020 05:26:04 +0100 (CET) Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by dpdk.org (Postfix) with ESMTP id C01DD1BFE1 for ; Thu, 27 Feb 2020 05:25:56 +0100 (CET) Received: by mail-lf1-f67.google.com with SMTP id n25so1030265lfl.0 for ; Wed, 26 Feb 2020 20:25:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4XnHnvFEwZRBcq06sml3mLo5vH7FoLwcoxI9OcsVhyc=; b=F223Q53ksThavVeCfqw9RDAdn+COetNrTrBD9oKgttDC9UCOkitchUY/HLTb/NR0Uk zxcX/pQEQ+SpkBKI3xfHwxEbFG2idGwnV7g/MS+GGyYgdL6ba586JKgxK3xMYHCas2u2 eEbJcyvdeOP7swH9H99YHUoLhzxwM61FBmVB86ME6NNiK/JBB84suoRNNa/3XIEuDa0u SkFbeUCC5/oZkK9kHGd+vvv8JtAq1vr70HaNqyXDs1q0JUNAZboJCYiySF3brNXjTvhv JI3W3TT9/XTP6wg/qGqIWAgj3kZXhzaGii7pMBLFnQzMp/Iv4EmDrbguCek9HkbjwM3q DKFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4XnHnvFEwZRBcq06sml3mLo5vH7FoLwcoxI9OcsVhyc=; b=OoODq0CSI+CedvcFfCCk2Dxk4h5nHxHuTIyx7gmK0C33lEJ7u7E4w/KXoIWXgpUigb CfA7xBI8WqDJOOAHejRpky4025kg3Vumn8u/XWpyHYxme/JCgRxk6BJWfGcPqt9NpLbB 5fukJZtflw8mwdkbQufdoygqMo6BZfB8lnDRogHSEfLM7TXRpZqPr7IPcglw0vZsgIsW ZPh/HXuiuQMQrhs0Sj2qAvh56migXUFpajNDwZ/R5BeT9m3kZbKi7Z4NyUGFARb/y6ec 5P5zTfgCCN0bLgYWNaX7bY2tYslidiUwlEaBtWgOI+d5HE1zLpKApvaoXQWeoVObFcQE j0JA== X-Gm-Message-State: ANhLgQ28rosPr0zMpJ9kW08zImyW1/sa6RucD7+P45s0xEXr/DUcWyC+ VFIaVJV7lZOisbGhL2FfSzWmccgT1Ag= X-Google-Smtp-Source: ADFU+vuaBK073t+7K890/rmbXV/HIP+mjkLYVDyxBoH2dj6Y2NVZiJ0ZEPRf4dmTDOjcvCUiQ6GIHg== X-Received: by 2002:a19:ca15:: with SMTP id a21mr1003489lfg.67.1582777556013; Wed, 26 Feb 2020 20:25:56 -0800 (PST) Received: from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.googlemail.com with ESMTPSA id g21sm2224350ljj.53.2020.02.26.20.25.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 20:25:55 -0800 (PST) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Dmitry Kozlyuk , Thomas Monjalon , Jeff Shaw , Pallavi Kadam , Ranjit Menon , Harini Ramakrishnan , Anand Rawat Date: Thu, 27 Feb 2020 07:25:37 +0300 Message-Id: <20200227042537.187459-8-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200227042537.187459-1-dmitry.kozliuk@gmail.com> References: <20200218000229.86621-1-dmitry.kozliuk@gmail.com> <20200227042537.187459-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v4 7/7] build: fix linker warnings with Clang on Windows X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Clang on Windows doesn't use pthread for now, while MinGW does. Removing `-pthread` option with MS linker fixes the following warning: clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument] Option `--no-as-needed` is meaningless for PE output. Disabling it on Windows fixes the following warning: LINK : warning LNK4044: unrecognized option '/-no-as-needed'; ignored Fixes: 98edcbb5a ("eal/windows: introduce Windows support") Signed-off-by: Dmitry Kozlyuk --- config/meson.build | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/config/meson.build b/config/meson.build index 68aeb8470..abedd76f2 100644 --- a/config/meson.build +++ b/config/meson.build @@ -112,11 +112,15 @@ dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1) dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8) -add_project_link_arguments('-Wl,--no-as-needed', language: 'c') +if not is_windows + add_project_link_arguments('-Wl,--no-as-needed', language: 'c') +endif -# use pthreads -add_project_link_arguments('-pthread', language: 'c') -dpdk_extra_ldflags += '-pthread' +# use pthreads if available for the platform +if not is_ms_linker + add_project_link_arguments('-pthread', language: 'c') + dpdk_extra_ldflags += '-pthread' +endif # on some OS, maths functions are in a separate library if cc.find_library('m', required : false).found() -- 2.25.1