From patchwork Sun Nov 29 16:00:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Connolly X-Patchwork-Id: 84628 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6CE09A04DD; Sun, 29 Nov 2020 17:00:47 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D2B6EC86E; Sun, 29 Nov 2020 17:00:45 +0100 (CET) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 71CD92952 for ; Sun, 29 Nov 2020 17:00:44 +0100 (CET) Received: by mail-wr1-f66.google.com with SMTP id z7so11805240wrn.3 for ; Sun, 29 Nov 2020 08:00:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mayadata-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=demQZvrCux/HE99oEjZAbGiYpzg1eLa8KCMOKOuVSfo=; b=KSzmzuSXZJUUlNe43fJoz4RGnrfKRKJsD2+NF6JiOZ5jq6dw+JTjIp2aACeW43abHn dtPJ3/Pw8yCchmfMwdMC502gO3OyJHTZSlvkMMY6L/9q6NaqHnEcb0fCEPJNIsfSEOOD DEOVzT0jPjW27Y2JE2A2y10U9Mly8hauoThDNDFb6dx/VI7/l6iSKTIKwuw5hNjVBc3h oa6BrOHH3ZJpIEe1VGeAiu8YqNq5CYtvp8zoepkZvwhEwRl4aYy8n5U2K5UlAJC6cEvc ottmCvaq4filNO9Cfay7vwS/fn/ljmz9PdR+saRY4iXSAvgVvfhBD8sV4jRPtw3Xl5VS jDcg== 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=demQZvrCux/HE99oEjZAbGiYpzg1eLa8KCMOKOuVSfo=; b=qVaLiELyv7M7sdilMGJ1E15fNwt4hbRe1pdT3miJuGOsYqsMz36S7teb0E1YtzyjTz 5hAnHz4R3ASkm4GMdv0Yb+7+fOwqryYyYxDhqmLRwwK8BiVSDmNywwn0kAQyLHTZxlin Jjn5PN0v5jPdElZlmtykImTqyNA2+f/dR9pALZLYdRz1o4KbjgGeQjO+7gscIZRG2E+N fTavseIjYT2Cka2pGQlp8INowKz6Msx/F0fnj0bdZyTH93HatseceAsM9Aj8vEBzodPO h2ylX5mzC35ek9bgMVa34xvM/0guMngEy5QGD6xZI8ZPpB2hqvYZCP/+V+NA5cf43JOL qTOw== X-Gm-Message-State: AOAM532bNL8b3dvxND7eZZZsHqT9lgYkFROINO4F/7OZPeOWQfXBdfDk RRuzWA3YBLma91AScgWS6W+NPQ== X-Google-Smtp-Source: ABdhPJxfjIApnwHPxyqwAS4x7A7K6Vgo+06MQ9nvhK8dSGreczO4+d0tZJG/VW0YjobGFsEFrrwb+w== X-Received: by 2002:adf:f602:: with SMTP id t2mr23613500wrp.40.1606665642975; Sun, 29 Nov 2020 08:00:42 -0800 (PST) Received: from FENIX.localdomain (cpc98320-croy25-2-0-cust77.19-2.cable.virginm.net. [80.235.134.78]) by smtp.gmail.com with ESMTPSA id u23sm21168512wmc.32.2020.11.29.08.00.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2020 08:00:42 -0800 (PST) From: Nick Connolly To: Bruce Richardson Cc: dev@dpdk.org, David Marchand , Dmitry Kozlyuk , Nick Connolly Date: Sun, 29 Nov 2020 16:00:24 +0000 Message-Id: <20201129160024.879-1-nick.connolly@mayadata.io> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201127113623.26707-1-nick.connolly@mayadata.io> References: <20201127113623.26707-1-nick.connolly@mayadata.io> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2] 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" 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. Signed-off-by: Nick Connolly Acked-by: Dmitry Kozlyuk Acked-by: Pallavi Kadam --- v2: * Adjust commit wording as per Dmitry Kozlyuk Note: It is unclear exactly which commit this fixes. It is probably a consequence of building more libraries for Windows. 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