mirror of
https://github.com/apache/nuttx.git
synced 2026-03-27 10:39:28 +08:00
arm64_head.S: fix the asm code build error
Add __ASSEMBLY__ protection in stddef.h and stdint.h to prevent assembly files from attempting to parse C typedef statements, which causes "unknown mnemonic" errors when assembly source includes these headers. the following are the detailed build error: /home/guoshichao/work_profile/vela_os/vela_open_source_trunk4/nuttx/include/stdint.h:167: Error: unknown mnemonic `typedef' -- `typedef _int8_t int8_t' /home/guoshichao/work_profile/vela_os/vela_open_source_trunk4/nuttx/include/stdint.h:168: Error: unknown mnemonic `typedef' -- `typedef _uint8_t uint8_t' /home/guoshichao/work_profile/vela_os/vela_open_source_trunk4/nuttx/include/stdint.h:170: Error: unknown mnemonic `typedef' -- `typedef _int16_t int16_t' /home/guoshichao/work_profile/vela_os/vela_open_source_trunk4/nuttx/include/stdint.h:171: Error: unknown mnemonic `typedef' -- `typedef _uint16_t uint16_t' /home/guoshichao/work_profile/vela_os/vela_open_source_trunk4/nuttx/include/stdint.h:178: Error: unknown mnemonic `typedef' -- `typedef _int32_t int32_t' /home/guoshichao/work_profile/vela_os/vela_open_source_trunk4/nuttx/include/stdint.h:179: Error: unknown mnemonic `typedef' -- `typedef _uint32_t uint32_t' /home/guoshichao/work_profile/vela_os/vela_open_source_trunk4/nuttx/include/stdint.h:193: Error: unknown mnemonic `typedef' -- `typedef _int8_t int_least8_t' /home/guoshichao/work_profile/vela_os/vela_open_source_trunk4/nuttx/include/stdint.h:194: Error: unknown mnemonic `typedef' -- `typedef _uint8_t uint_least8_t' /home/guoshichao/work_profile/vela_os/vela_open_source_trunk4/nuttx/include/stdint.h:196: Error: unknown mnemonic `typedef' -- `typedef _int16_t int_least16_t' /home/guoshichao/work_profile/vela_os/vela_open_source_trunk4/nuttx/include/stdint.h:197: Error: unknown mnemonic `typedef' -- `typedef _uint16_t uint_least16_t' /home/guoshichao/work_profile/vela_os/vela_open_source_trunk4/nuttx/include/stdint.h:203: Error: unknown mnemonic `typedef' -- `typedef _int32_t int_least24_t' Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
@@ -37,6 +37,8 @@
|
||||
* Type Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/* The <stddef.h> header shall define the following types:
|
||||
*
|
||||
* ptrdiff_t
|
||||
@@ -84,4 +86,6 @@ typedef struct
|
||||
#endif
|
||||
} max_align_t;
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* __INCLUDE_STDDEF_H */
|
||||
|
||||
@@ -156,6 +156,8 @@
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/* Exact-width integer types. NOTE that these types are defined in
|
||||
* architecture-specific logic with leading underscore character. This file
|
||||
* typedef's these to the final name without the underscore character. This
|
||||
@@ -254,5 +256,7 @@ typedef _uint_farptr_t uint_farptr_t;
|
||||
typedef _intmax_t intmax_t;
|
||||
typedef _uintmax_t uintmax_t;
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* CONFIG_ARCH_STDINT_H */
|
||||
#endif /* __INCLUDE_STDINT_H */
|
||||
|
||||
Reference in New Issue
Block a user