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 79CBEA034F; Fri, 26 Feb 2021 11:04:54 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1D7DF407FF; Fri, 26 Feb 2021 11:04:54 +0100 (CET) Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com [66.111.4.224]) by mails.dpdk.org (Postfix) with ESMTP id 4721A40692; Fri, 26 Feb 2021 11:04:52 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id B0FAA580585; Fri, 26 Feb 2021 05:04:51 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 26 Feb 2021 05:04:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm3; bh= FlxmGKuA6wYMtqPIdkpFGAHWV737j6ckZ9RmAIvCM7c=; b=jPyjv5v6bL3hAp3+ jQRo4E1IxzY3CT2aWBUsdPzo13VYfawDqJIPI3+QKajH5AP61uuBHjNcaxKMW4L1 WM1bnsktbyn6xjsSNzvEP/sbbWdNBigY/HKMD2ddByC6hDYm+hmgty9MKFHhkW9D QQw+y+4m3EyEiNETwjidMDAEC7+F6vbruspBqUIizLPqUWu170y32bkaQ7wv1oBY +fbwuFjRhy4jCEQB/MzD7YHlptMKsrmMuibg/HAJq31cmr001EOf9COn9E8GVKJZ wZvtYnO83UIuaaSWvDDZ/G8W6xhQV4TEeOxPVca5T2C1fACbVt6igjL4bXisTaaz C6daGw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=FlxmGKuA6wYMtqPIdkpFGAHWV737j6ckZ9RmAIvCM 7c=; b=RfVlr944z0oAhX6u08wnLrEu3+IIbEC00xGMvT2i8DTqN5bX8zefmEO6N 0XwzPe4rJtzKDp29aYX4wbO2X//IPgITV/tJTsHgMp+JtSimpL5brow9udot9zRQ /MAlwORdb4zPO9lUDg9U6o3wg3gI/ZHllk4W8kHQpHOAA/lNPWmoxmrM0wwTaodr xXfmXWv2fGSCFaohd4TTuBwIhmw/vT53CDBMMDiID+XgBktG4vXrJXYUQQJXipYD s86qyoF+VB3+/yK9+x5m3oaNAk2uiqfwMTE63zhC4I/gicucncVHyKEj41B9JFwu TiWT3Gd9bBPUmxIG13nJ6rPTfeEww== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrledugddufecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 8BCE3240067; Fri, 26 Feb 2021 05:04:48 -0500 (EST) From: Thomas Monjalon To: Bruce Richardson 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 Date: Fri, 26 Feb 2021 11:04:46 +0100 Message-ID: <2086874.LCvNQC0ieA@thomas> In-Reply-To: <20210226094656.GD1308@bricha3-MOBL.ger.corp.intel.com> References: <20190313170657.16688-1-ncopa@alpinelinux.org> <2843306.ICY3tYd9bS@thomas> <20210226094656.GD1308@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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" 26/02/2021 10:46, Bruce Richardson: > 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? That would be the simplest solution yes :) I don't really like defining such flag in a header file because it impacts all code coming after the include. It would mean all includes done after DPDK ones behave differently. I vote for the trick: #ifdef _GNU_SOURCE typedef cpu_set_t rte_cpuset_t; #else typedef void rte_cpuset_t; #endif Opinions?