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 0C5FEA0554; Tue, 18 Feb 2020 01:03:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C89481DABD; Tue, 18 Feb 2020 01:02:49 +0100 (CET) Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) by dpdk.org (Postfix) with ESMTP id D8AA31DAA1 for ; Tue, 18 Feb 2020 01:02:44 +0100 (CET) Received: by mail-lf1-f65.google.com with SMTP id 203so13079412lfa.12 for ; Mon, 17 Feb 2020 16:02:44 -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=s3wMNnRsGpaNal+DEvRhr3WOzzZBhd0oeaMLom14dKA=; b=F0Zi5yZRUxR9skGIkCUlaOv3pN2ZmKtc13xp6bTEbI0qbwQsCdl6aGYayWVwDQh3JW YAAi0g+W7+cVJWTOEQk3ZfiIJzWEYwF8aRKVq8hLGlbbs3uXjw7w45w0ULWwRXgONE8h bnNT9ULhZFd6H0ZaypOkQKMEieJdwfnrAXjfAq0fxn3FPJ+7g8j2WYxRNyOFpUGfaa9m cRcbTQTuZvNhm8BXlja9uNwd3O0D9CyjczX9fxyor2N/eD7xbqktQtyJTbed33M5iiTZ SGQ3gBTB1JdLt2rzWhmIJY6uiAVRsWGDk4rDVnOXt2YT6dg6gEBLZvqZ8U87EZhqDOlU K8Og== 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=s3wMNnRsGpaNal+DEvRhr3WOzzZBhd0oeaMLom14dKA=; b=WPRTsKJBW5QCv2GU9FyNgp9oFeahd0RxrDx6Iz7l4AYajbg9QpQxLtXy0v3CuSdKtS jK2ITIXRq7W3N/8s7q152r4+P21XDdP6kAasEEry28BWvrzdpXYtckbVS1B3dlfMfkho QN2+gBaTSR6m5eZPogH/PHeeWyN6D98z6l26aW+c84DQyXlDwCjUU0H/5JmAU2Ink54e +la833P1AE3t6ntiKdsD3T3v4qY1bjizRIEA24RnNMFadSkXwefVHdOIUYd33WuIjOd/ 2oy9j0h1glKy7wIoV5SsE20U5dcw3AxdgR3hMf0fijBCzhFrYSI4n4wzAfpbyzpfzz03 i0Dg== X-Gm-Message-State: APjAAAXFGAMxwbtkPHIuhCdTLRdTD+JzYQqCmQES3N5w7+f7l43uUey9 xDGsOytNOgT67V4+kqaHxjrXqKgTZVc= X-Google-Smtp-Source: APXvYqxS8Npx0M3vBXjzICydtxf0iAN+f+tjfVnKc3un3ljU4Rri5/t83+u8MUohBHRtYR8qnRm2ww== X-Received: by 2002:ac2:52a2:: with SMTP id r2mr8997709lfm.33.1581984163140; Mon, 17 Feb 2020 16:02:43 -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 r20sm1068864lfi.91.2020.02.17.16.02.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2020 16:02:42 -0800 (PST) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Dmitry Kozlyuk , Thomas Monjalon Date: Tue, 18 Feb 2020 03:02:29 +0300 Message-Id: <20200218000229.86621-8-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200218000229.86621-1-dmitry.kozliuk@gmail.com> References: <20200218000229.86621-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 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 61eeec0de..69e53e41d 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.0