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 C8544A0C49; Wed, 7 Jul 2021 22:23:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D159413DB; Wed, 7 Jul 2021 22:23:37 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 874CD413B6 for ; Wed, 7 Jul 2021 22:23:35 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id C44EB20B7188; Wed, 7 Jul 2021 13:23:34 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C44EB20B7188 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1625689414; bh=0H9byGJ2zDt7JahFXBLB0MzzIf8FhKgkrhzRVcklmms=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qEvOH74X8D9GEM9TZJuBD9/+q9d6XGccowtER6QXVAD72ePJDEW8FBbv1xTQeHHsW TWAJW7+/VktPP9F3FIhx2hRjHwZeItC1+R7UcMGSr7Av1XeCyTN1tqJdXY0EcGvSYR DQiShLk04ltM7YFDWFecbvu9SRq6IylTHQkkvRA8= Date: Wed, 7 Jul 2021 13:23:34 -0700 From: Tyler Retzlaff To: Thomas Monjalon Cc: dev@dpdk.org, ferruh.yigit@intel.com, dmitry.kozliuk@gmail.com, david.marchand@redhat.com Message-ID: <20210707202334.GA1370@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20210623182657.GA24634@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <3277479.bKIgzLV6lZ@thomas> <20210624160228.GB22718@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <2661083.m9YJQ7Gqa3@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2661083.m9YJQ7Gqa3@thomas> User-Agent: Mutt/1.5.21 (2010-09-15) 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. thanks > > This way we have a documentation in a single place for the macro, > and compilation fails if it is not implemented for the toolchain. >