Skip to content

Commit ba84782

Browse files
committed
greenhills: add empty "__extension__" definition to fix build error
"libcxxmini/libxx_cxa_guard.cxx", line 47: error apache#77-D: this declaration has no storage class or type specifier __extension__ typedef int __guard __attribute__((mode(__DI__))); ^ "libcxxmini/libxx_cxa_guard.cxx", line 47: error apache#65: expected a ";" __extension__ typedef int __guard __attribute__((mode(__DI__))); ^ "libcxxmini/libxx_cxa_guard.cxx", line 64: error apache#20: identifier "__guard" is undefined int __cxa_guard_acquire(FAR __guard *g) ^ "libcxxmini/libxx_cxa_guard.cxx", line 64: error apache#20: identifier "g" is undefined int __cxa_guard_acquire(FAR __guard *g) ^ "libcxxmini/libxx_cxa_guard.cxx", line 65: error apache#65: expected a ";" { ^ "libcxxmini/libxx_cxa_guard.cxx", line 93: warning apache#12-D: parsing restarts here after previous syntax error } Signed-off-by: guoshichao <guoshichao@xiaomi.com>
1 parent 02b69f7 commit ba84782

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/nuttx/compiler.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@
9191

9292
#if defined(__ghs__)
9393

94+
# define __extension__
95+
96+
/* the following function is not truly need in runtime, and in order to fix
97+
* undefined symbol link error, we need to make the following symbols as weak
98+
*/
99+
94100
# pragma weak __gh_long_long_printf
95101
# pragma weak __gh_float_printf
96102
# pragma weak __gh_fputs_stdout

0 commit comments

Comments
 (0)