From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B90D0A034F; Fri, 26 Feb 2021 10:47:09 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0D98322A269; Fri, 26 Feb 2021 10:47:09 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id E6EEE40692; Fri, 26 Feb 2021 10:47:04 +0100 (CET) IronPort-SDR: k/+RHjWkr+6EwI357bmTTDKG+sj3dDkEbg5c+aC5scQGH/zyLOsns23Vz8/kW88zdlw2PRdPyE qElNgBy/81sA== X-IronPort-AV: E=McAfee;i="6000,8403,9906"; a="185882414" X-IronPort-AV: E=Sophos;i="5.81,208,1610438400"; d="scan'208";a="185882414" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2021 01:47:03 -0800 IronPort-SDR: 0cfNWn8UlqCFq/1MNfxLF3kMWTPZn+g9PjhIXhxDifWbhmd5qWg4PFvIq3YEes3wgzTNGbmxSI P7YrPCQ5Vfaw== X-IronPort-AV: E=Sophos;i="5.81,208,1610438400"; d="scan'208";a="404831952" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.16.207]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 26 Feb 2021 01:46:59 -0800 Date: Fri, 26 Feb 2021 09:46:56 +0000 From: Bruce Richardson To: Thomas Monjalon Cc: dev@dpdk.org, ncopa@alpinelinux.org, stable@dpdk.org, Hemant Agrawal , Sachin Saxena , Jakub Grajciar , Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko , Cristian Dumitrescu , John McNamara , Maxime Coquelin , Chenbo Xia , Anatoly Burakov , Konstantin Ananyev , Marcin Smoczynski Message-ID: <20210226094656.GD1308@bricha3-MOBL.ger.corp.intel.com> References: <20190313170657.16688-1-ncopa@alpinelinux.org> <20210225182250.1149592-5-thomas@monjalon.net> <20210226090803.GA1308@bricha3-MOBL.ger.corp.intel.com> <2843306.ICY3tYd9bS@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2843306.ICY3tYd9bS@thomas> Subject: Re: [dpdk-dev] [PATCH v5 04/17] build: define _GNU_SOURCE globally X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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, Feb 26, 2021 at 10:40:32AM +0100, Thomas Monjalon wrote: > 26/02/2021 10:08, Bruce Richardson: > > On Thu, Feb 25, 2021 at 07:22:37PM +0100, Thomas Monjalon wrote: > > > There was an intent to define _GNU_SOURCE globally, > > > but it was not set in pkg-config for external applications. > > > > > Is this something that we really want to do, to force all external apps to > > use _GNU_SOURCE when compiling? Do some of our header files rely on > > definitions only available with _GNU_SOURCE? If so, we should probably look > > to remove that dependency rather than mandating the define. > > From patch 5: > In musl libc, cpu_set_t is defined only if _GNU_SOURCE is defined. > > If we avoid mandating _GNU_SOURCE, > we must #ifdef functions relying on rte_cpuset_t in the headers: > - rte_lcore_cpuset > - rte_thread_set_affinity > - rte_thread_get_affinity > - rte_telemetry_init (internal) > Or a different trick in linux/include/rte_os.h could be: > typedef void rte_cpuset_t; > so it allows including files, but not using above functions of course. > Can we just define _GNU_SOURCE in the header file with rte_cpuset_t?