From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 98342A0C49;
	Wed,  7 Jul 2021 22:36:02 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 0D08B413DB;
	Wed,  7 Jul 2021 22:36:02 +0200 (CEST)
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com
 [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id 35AAD413B6
 for <dev@dpdk.org>; Wed,  7 Jul 2021 22:36:01 +0200 (CEST)
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailout.nyi.internal (Postfix) with ESMTP id 99BE75C0113;
 Wed,  7 Jul 2021 16:36:00 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute4.internal (MEProxy); Wed, 07 Jul 2021 16:36:00 -0400
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=fm1; bh=
 o95R1WW9qnFW03N41iX8Cy3G3WddUAYx6oBtA2BgssE=; b=cWuoFbkCwtAZHqrt
 270PxC7MLOCPfJ41TvjdLkqRyNJzMLQV9yiMabfOwxszV8iPWrhEWMoN+7HUcp2Z
 0d+vBgwPur6Fhc4VZobvQSlxK3Wooo533znrNnaY9q8q/CoS0a5C/l4J9yYNIUUx
 oFzC0SVKCRVkBEtp0ymwXcM0p0THW+IgumZEwoDzHPQt4gOfW16XiIUUz1/Beu0N
 /811nlqLz4AMNdOy1d55dByzRDMFebDahdiA6tSWNuaJOza1a38lehzsr4UMsnHh
 jknlCUkUHTlK+f8N9jW75p3/+lk6Lu3cmfV8lkbJk1fASTeHOiAxU19UZkMhyeqz
 5WySCg==
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=fm3; bh=o95R1WW9qnFW03N41iX8Cy3G3WddUAYx6oBtA2Bgs
 sE=; b=tVG86fhZMfK38fdvknlZUIK6vNJ9ebN3fyCEORcbEh+fdL9VGFcRb0SUV
 VimqW7nCQeOfbb5m5Gq2lYLqgq9z3LzZeRuBQijCyUWANQWhcq3MylqKyl9r/us5
 gPcAiVZ9C7IpPJL1q9j+oX3hbiC5j5DLMx9DaUJckp6bXNP44XomMvEAnlYTo+sS
 kqztV9PHWauB/l4BwbIRjgZ0S/J1UoI9OpeMDEuUtU5oP5LHT/8qN2nwEdx2sIHm
 JQ21lOwUofVVRWDyI3rb2o1WjNLONK2zQF9x2QCoo38ZcjuLG1xafkBtA+P3U2SP
 bM7JkI+kaMFTMFpx6owvREIAio4vg==
X-ME-Sender: <xms:LxDmYIcjXGNkq56JEZMnunOzMQ-VNvQBluHhWsrpbHq8ncHwb6fw1Q>
 <xme:LxDmYKOGkDDYHmwWd9uZhuo08LbzrnuNqwLa8TsYUanyOvuoF5R_vlRubCf21gy1G
 1H6lzM4os1IDM7nxg>
X-ME-Received: <xmr:LxDmYJgdJPZALMFjuW72lGlY6Ig1YF_ijKyNBUlK7Fso7oBrQCB3eoqXKwCzTmDkkMQvXOuVWiiDPgv97lbAbq-jTQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrtddvgddugeeiucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkjghfggfgtgesthfure
 dttddtvdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshes
 mhhonhhjrghlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpedugefgvdefudfftdefge
 elgffhueekgfffhfeujedtteeutdejueeiiedvffegheenucevlhhushhtvghrufhiiigv
 pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrd
 hnvght
X-ME-Proxy: <xmx:LxDmYN-V-pzgxkmohVCJDgbY3xw0vYuyJKk8V7dA_8zZXLJGG0fNvg>
 <xmx:LxDmYEvuL8F0pwMu2_q-LgheyDpva8uQ6XiN_I-_8hd0Ehh-PsC98A>
 <xmx:LxDmYEF0iomH9Ev2xCDnnlp9RamKRqhRQA-N8Z-i8CmuVUZV4pj5Bg>
 <xmx:MBDmYALBGsuiVeRzDv8oToL3C2KRArxGd2yPOCVk-_Ll8MfEpneKPw>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 7 Jul 2021 16:35:58 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: Tyler Retzlaff <roretzla@linux.microsoft.com>
Cc: dev@dpdk.org, ferruh.yigit@intel.com, dmitry.kozliuk@gmail.com,
 david.marchand@redhat.com
Date: Wed, 07 Jul 2021 22:35:56 +0200
Message-ID: <5114228.tcCnuoUIAK@thomas>
In-Reply-To: <20210707202334.GA1370@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
References: <20210623182657.GA24634@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
 <2661083.m9YJQ7Gqa3@thomas>
 <20210707202334.GA1370@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Subject: Re: [dpdk-dev] [RFC] toolchain specific macro expansion
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

07/07/2021 22:23, Tyler Retzlaff:
> On Thu, Jun 24, 2021 at 06:29:20PM +0200, Thomas Monjalon wrote:
> > 24/06/2021 18:02, Tyler Retzlaff:
> > > On Thu, Jun 24, 2021 at 08:54:49AM +0200, Thomas Monjalon wrote:
> > > > 23/06/2021 20:26, Tyler Retzlaff:
> > > > > // lib/eal/gcc/rte_toolchain_common.h
> > > > > #define __rte_noreturn __attribute__((noreturn))
> > > > 
> > > > We should keep a macro in rte_common.h which triggers an explicit error
> > > 
> > > i think that's relatively trivial to do. rte_common.h could after
> > > toolchain specific include do a simple test.
> > > 
> > > #ifndef __rte_no_return
> > > #error no __rte_no_return defined for toolchain
> > > #endif
> > 
> > No I was thinking of:
> > 
> > /** Doxygen comment for the attribute below */
> > #define __rte_no_return RTE_ATTR_NOT_SUPPORTED
> 
> when you suggested this i thought it was something already established.
> i see now that's not the case.  would you mind elaborating a little with
> a complete example of the toolchain specific override and the generic
> include?  i'd just like to understand completely what you were
> proposing so i can try it out.

Sorry I don't have time currently to elaborate,
and not sure how to implement it.
I may look at it next week if that's the way we want to go.
 
> > This way we have a documentation in a single place for the macro,
> > and compilation fails if it is not implemented for the toolchain.