Skip to content

Commit

Permalink
toolchain/ghs: Fix green hills toolchain build Vela "no storage class…
Browse files Browse the repository at this point in the history
… or type specifier" 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: yanghuatao <[email protected]>
  • Loading branch information
yanghuatao authored and extinguish committed Aug 6, 2024
1 parent 439b9e9 commit 684882d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/nuttx/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,12 @@

# define no_builtin(n)

/* Green Hills Software definitions *****************************************/

#elif defined(__ghs__)

# define __extension__

/* Unknown compiler *********************************************************/

#else
Expand Down

0 comments on commit 684882d

Please sign in to comment.