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 457E1A0C49; Wed, 7 Jul 2021 22:56:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C016E413DB; Wed, 7 Jul 2021 22:56:56 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 007D5413B6 for ; Wed, 7 Jul 2021 22:56:55 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 4FADC20B7188; Wed, 7 Jul 2021 13:56:55 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4FADC20B7188 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1625691415; bh=RuIlM2Qqi5YvgQkCrYpAmiJuUmLX9VqJqSvQsIPjzTI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fx4Xq7sqLYqwM3YL3F1Nu18WW4p3JdtWwUcUhmupS8VRB26oZxHNgXSEMCc9QFD/0 GSQb8t3imHmJpceh/OXf7/4xgO3r3cZKf8qcaaCO9YedulHK6TVzimrfPKIiWFhqPX 18PbceLfKWP2kjqF9lPlqlIUGthP5siys88tLlu4= Date: Wed, 7 Jul 2021 13:56:55 -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: <20210707205655.GA10180@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> <5114228.tcCnuoUIAK@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5114228.tcCnuoUIAK@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 Wed, Jul 07, 2021 at 10:35:56PM +0200, Thomas Monjalon wrote: > 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. i think the community generally preferences not having obvious conditional compilation on a per-macro basis so i think it is the way we want to go. i'll take a look at the existing uses of include/generic/foo.h and /include/foo.h where the arch specific includes generic for inspiration. but i look forward to seeing what you come up with when you get a chance to focus on the topic.