Re: [dpdk-dev] [RFC] toolchain specific macro expansion
From: Tyler Retzlaff <hidden>
Date: 2021-07-07 20:56:59
On Wed, Jul 07, 2021 at 10:35:56PM +0200, Thomas Monjalon wrote:
07/07/2021 22:23, Tyler Retzlaff:quoted
On Thu, Jun 24, 2021 at 06:29:20PM +0200, Thomas Monjalon wrote:quoted
24/06/2021 18:02, Tyler Retzlaff:quoted
On Thu, Jun 24, 2021 at 08:54:49AM +0200, Thomas Monjalon wrote:quoted
23/06/2021 20:26, Tyler Retzlaff:quoted
// 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 errori 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 #endifNo I was thinking of: /** Doxygen comment for the attribute below */ #define __rte_no_return RTE_ATTR_NOT_SUPPORTEDwhen 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 <arch>/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.