forked from nuttx/nuttx-update
ghs: fix the naked_function attr cannot handle warning
with greenhills version older than 202354, the __attribute__((naked)) cannot handled by greenhills compiler, and will report warning: "/home/guoshichao/work_profile/vela_os/vela_car_6/nuttx/arch/arm/src/armv7-m/arm_svcall.c", line 79: warning #1097-D: unknown attribute "naked" static void dispatch_syscall(void) naked_function; ^ Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
parent
6036a318f4
commit
f94e092fad
1 changed files with 5 additions and 1 deletions
|
@ -240,7 +240,11 @@
|
|||
* the function prolog and epilog.
|
||||
*/
|
||||
|
||||
# define naked_function __attribute__((naked,no_instrument_function))
|
||||
# if !defined(__ghs__) || __GHS_VERSION_NUMBER >= 202354
|
||||
# define naked_function __attribute__((naked,no_instrument_function))
|
||||
# else
|
||||
# define naked_function
|
||||
# endif
|
||||
|
||||
/* The always_inline_function attribute informs GCC that the function should
|
||||
* always be inlined, regardless of the level of optimization. The
|
||||
|
|
Loading…
Reference in a new issue