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 83D12A0542; Fri, 7 Feb 2020 20:27:16 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B44681C067; Fri, 7 Feb 2020 20:27:15 +0100 (CET) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) by dpdk.org (Postfix) with ESMTP id 3EBCB1BFFD for ; Fri, 7 Feb 2020 20:27:14 +0100 (CET) Received: by mail-lj1-f181.google.com with SMTP id n18so485659ljo.7 for ; Fri, 07 Feb 2020 11:27:14 -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=uyB6h2KkRuovID6p8vkAop90iZTyqLCPMEIJ0baMl6Q=; b=SNpWyahKwe0lEioJBiTwdi2tjN8J5q8Tw5lpHQznfEGEIvbgmSSGEsz/G6jnzqGL7G uzSb1vHPBqpZN2OZPpOS+eZDqPBqWXR4/m485zYlqFDG+aX0bmO9i+re+EW3VHYFKkXl 49yCwCbTGFg9VOZs4dbmxrJQDS028BWfuQmjjMrctlJPkKGwzKJcOmjGtn131zRWdWP4 lt7ffquLNpnGuOwjPqGXlbAeU+UYKJLxIYg7Crfaa6UIDNi9lJnsi+05guygeIFeo7yT IdrZ/2v2t4IOwzrDOOdk+HPYJqvzm/Vhxxf+6Ep1XCLVSiRm8gW5JE41LH2Jxa6uAMNe lWfw== 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=uyB6h2KkRuovID6p8vkAop90iZTyqLCPMEIJ0baMl6Q=; b=A+2V29r018uqkryp05FrzaYJSecGJTBb2s3y2Vhprg8we03FPLdZiGg7VxwTuW+WoL MADDUVPDeh9DWW4zlBd8cpGIXmeGfsiRPjevGtItQS8krxFlgqZFFTiDBae2OG/fbzTO oCIiQK8oekcy9hw8v/3EMnSw56RvU456EPHuH1b8Zvs7JkYTsiF/NUYL/5EzbneDC3fF T2UpyqB0v3NDgDNnR/O+NCpKRfYmhnuOps2033pHnjidT8r/naLrMWNUG/CeXY0mCQTp Z7ViQ9h0Z+L6axbuCCwHFnsdCt+wCxLW0PMpGcpc+7k+g4mkjjn8rSnK6kfWS68Z/zMx kChQ== X-Gm-Message-State: APjAAAWWZhVtmFKH4q0Nsy/tPblJ93bCfo83Xs9ZSC3v4X3l6g0y6Qmb +CgcOpwK8wwim8/HJA/ZQPE= X-Google-Smtp-Source: APXvYqx4tpkcQZzugRIm1mwAdnMEvtn30+tPUSSuudB+QNgTUOTktljJo3h/15giGii+MW41MgoW6Q== X-Received: by 2002:a2e:9052:: with SMTP id n18mr421181ljg.251.1581103633567; Fri, 07 Feb 2020 11:27:13 -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 q13sm2004864ljj.63.2020.02.07.11.27.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Feb 2020 11:27:12 -0800 (PST) Date: Fri, 7 Feb 2020 22:27:11 +0300 From: Dmitry Kozlyuk To: Bruce Richardson Cc: Thomas Monjalon , dev@dpdk.org, harini.ramakrishnan@microsoft.com Message-ID: <20200207222711.0db45dbc@Sovereign> In-Reply-To: <20200206105902.GA767@bricha3-MOBL.ger.corp.intel.com> References: <20200131030744.19596-1-dmitry.kozliuk@gmail.com> <2199644.NG923GbCHz@xps> <20200205022138.68c6b854@Sovereign> <12853507.RDIVbhacDa@xps> <20200205143050.GB687@bricha3-MOBL.ger.corp.intel.com> <20200205234105.61ad5c55@Sovereign> <20200206105902.GA767@bricha3-MOBL.ger.corp.intel.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] [PATCH 4/6] build: MinGW-w64 support for Meson 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 Wed, Feb 05, 2020 at 11:41:05PM +0300, Dmitry Kozlyuk wrote: > > > > > > > +if is_windows > > > > > > > + # Require platform SDK for Windows 7 and above. > > > > > > > + add_project_arguments('-D_WIN32_WINNT=0x0601', language: 'c') > > > > > > > > > > > > Please explain. Why Windows 7 is needed? What this define is doing? > > > > > > > > > > Yes, Windows 7 and above is need for already existing code in eal_lcore.c, > > > > > specifically for GetLogicalProcessorInformation() call. > > > > > > > > > > When including , one must define minimum API version the > > > > > application is compiled against [0]. MSVC and Clang default to the version of > > > > > platform SDK (that is, maximum supported). MinGW defaults to Windows XP, so > > > > > this definition must be either in before #include or > > > > > here. Because other files may include , I'd prefer to have a > > > > > global definition via compiler command-line. > > > > > > > > > > [0]: > > > > > https://docs.microsoft.com/en-us/windows/win32/WinProg/using-the-windows-headers > > > > > > > > OK, thanks. > > > > Please reword the comment with something like > > > > "Minimum supported API is Windows 7." > > > > > > > For this, as an alternative to putting it as a project argument, you can just > > > add it to dpdk_conf which means it will end up as a define in the global > > > rte_build_config.h and so be directly included in each compilation unit > > > ahead of any other headers. (rte_config.h includes rte_build_config.h) > > > > Can you please explain why using dpdk_conf is a better alternative? In > > lib/meson.build I can see add_project_arguments('_D_GNU_SOURCE', ...), which > > serves a similar purpose on POSIX systems. Compiler option also makes it > > impossible to forget or redefine this constant in code by mistake. > > > I'm not necessarily saying it's better, it's just an alternative to > consider. :-) Having it in rte_config.h makes the define available to any > external apps using DPDK, which may or may not be desirable. It's certainly *not* desirable, apps usually have this value consciously and explicitly defined on their own, and it may differ from the one required to compile DPDK. Thanks for the tip, but as I hope you can see, it should stay a project argument. -- Dmitry Kozlyuk