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 AF969A0527; Sun, 29 Nov 2020 16:38:58 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ECD76C8F6; Sun, 29 Nov 2020 16:38:56 +0100 (CET) Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by dpdk.org (Postfix) with ESMTP id CC454C86E for ; Sun, 29 Nov 2020 16:38:55 +0100 (CET) Received: by mail-lj1-f193.google.com with SMTP id y10so12894777ljc.7 for ; Sun, 29 Nov 2020 07:38:55 -0800 (PST) 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=UCAnBz9biGg48/t26KlyZlThWeYzbBdSyOZwJHNgzXY=; b=pirQ7DYRoXPLaPXTxziJG1jKhfYSsVoje6+731cUUaq2royAXrNr3/fcFYl9L+OKqh pj4KBIlz4TLKxV9WnRedjvF+owecLvGe+VMODyyZzLmO3BxNFf0GevrwG49iLwB4ZG6J ij+lb6ToopXpDZ93jVFAsw3miv7Hm1HPkuOjG6CTNAIBbmwtrJZsbXh7B7IO6ZQjb7oz er3ANzMXsJdVU5dlNzz5lUakvQUedkZIu973QnR32UQzI6l5UFS9o17Fom4ApCLB8Irz 3DIrNdL7emSW8BzxbAdDpWMcXv60+/LVs+VcIZGVXDbC3w8IcRxrBFSQAYfMs3aXAeJz HFPQ== 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=UCAnBz9biGg48/t26KlyZlThWeYzbBdSyOZwJHNgzXY=; b=UwJMcg6wK3ygpSBAFRH0MA6qgHKESpu+SNgz1Qa/XxOXDS7Lnrx4J623mfIXEQ6mS5 386SksFdTOc9bXZx8OhXwk5K9TFASzz0kqvz7/c4jx9dMPyKzYaZdPMohFhMDaJMlL7k Eh3t9YX3aofi1wGsevfFwJkF9/67DS0bJVx3R0OIkhDKOcZME+/CsfZs0xTgpcjCBvbL bV121W33O2gWMPw/hpKok2yxSSjLPxi8ZYtwG+26A0ZaGAYk8GzV2RuwmsQtEdBaZLkY X3wIDLrQ9dXsWQOxh4Ii9Rz+no/SjtgdRGlsUVsm3SaxzQt/iIN3IG4+IuJj6XLa8Yyg eIsg== X-Gm-Message-State: AOAM530rAjzUfle3rI2k/5aRsC/q6DmWkelPgytA5PvYxmWRVEDMWBpx WZ0tx8N15bxW8qxQaM+XP3E= X-Google-Smtp-Source: ABdhPJxdnuAQbebQqADPtpOyo5L51+1ka330WJjRsbWTiUuX/JQlQ+yipmITX1plPFJut6mp2dO/iA== X-Received: by 2002:a2e:a167:: with SMTP id u7mr7400142ljl.186.1606664334401; Sun, 29 Nov 2020 07:38:54 -0800 (PST) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id y28sm2007253ljn.18.2020.11.29.07.38.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2020 07:38:53 -0800 (PST) Date: Sun, 29 Nov 2020 18:38:52 +0300 From: Dmitry Kozlyuk To: Nick Connolly Cc: Bruce Richardson , dev@dpdk.org, David Marchand Message-ID: <20201129183852.44ce7e38@sovereign> In-Reply-To: <20201127113623.26707-1-nick.connolly@mayadata.io> References: <20201127113623.26707-1-nick.connolly@mayadata.io> X-Mailer: Claws Mail 3.17.6 (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] [PATCH] windows: build warnings with clang 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" On Fri, 27 Nov 2020 11:36:23 +0000, Nick Connolly wrote: > Compiling with Clang (11.0, --buildtype=debug) for Windows > produces deprecated warnings related to secure crt functions. Please explain what these warnings mean and why disabling them is OK. FWIW, I examined present warnings and found no useful ones. Also, --buildtype=debug is not necessary to trigger these warnings. Proposed wording (feel free to adjust): Microsoft CRT defines Windows-specific secure alternatives to standard library functions and triggers warnings when "insecure" functions are used [1]. However, calling code already has all necessary checks around those functions, so these warnings are not useful for DPDK. MinGW provides its own CRT without this issue. [1]: https://docs.microsoft.com/en-us/cpp/c-runtime-library/security-features-in-the-crt?view=msvc-160 > Disable this by defining -D_CRT_SECURE_NO_WARNINGS. > > It is unclear exactly which commit this fixes. It is probably a > consequence of building more libraries for Windows. Tip: Unless you want to make this paragraph part of the commit, you can write such notices below "---" line, like version info. > > Signed-off-by: Nick Connolly > --- > config/meson.build | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/config/meson.build b/config/meson.build > index c02802c18..a3154e29c 100644 > --- a/config/meson.build > +++ b/config/meson.build > @@ -279,6 +279,11 @@ if is_windows > add_project_arguments('-D__USE_MINGW_ANSI_STDIO', language: 'c') > endif > > + # Disable secure CRT deprecated warnings for clang > + if cc.get_id() == 'clang' > + add_project_arguments('-D_CRT_SECURE_NO_WARNINGS', language: 'c') > + endif > + > add_project_link_arguments('-lws2_32', language: 'c') > > # Contrary to docs, VirtualAlloc2() is exported by mincore.lib