Thread (8 messages) 8 messages, 2 authors, 2021-07-07

Re: [dpdk-dev] [RFC] toolchain specific macro expansion

From: Thomas Monjalon <hidden>
Date: 2021-07-07 20:36:04

07/07/2021 22:23, Tyler Retzlaff:
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 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.
 
quoted
This way we have a documentation in a single place for the macro,
and compilation fails if it is not implemented for the toolchain.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help