You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2024/08/11 17:28:23 UTC

(nuttx) 05/06: greenhills: fix the moblib asm compile error

This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit d76218e817a13f17763ffe03cdc349cae01c3124
Author: guoshichao <gu...@xiaomi.com>
AuthorDate: Thu Aug 1 21:36:03 2024 +0800

    greenhills: fix the moblib asm compile error
    
    CC:  assert/lib_assert.c [asarm] (error #2179) modlib/modlib_globals.S 61: unexpected token type (char) encountered; expected type (identifier)
      .size \ globalNames , . - \ globalNames
    --------^
    
    [asarm] (error #2179) modlib/modlib_globals.S 67: unexpected token type (char) encountered; expected type (identifier)
      .size \ nglobals , . - \ nglobals
    --------^
    
    [asarm] (error #2179) modlib/modlib_globals.S 72: unexpected token type (char) encountered; expected type (identifier)
      .size \ global_table , . - \ global_table
    --------^
    
    Signed-off-by: guoshichao <gu...@xiaomi.com>
---
 libs/libc/modlib/modlib_globals.S | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libs/libc/modlib/modlib_globals.S b/libs/libc/modlib/modlib_globals.S
index bdc8912271..b65edfb51a 100644
--- a/libs/libc/modlib/modlib_globals.S
+++ b/libs/libc/modlib/modlib_globals.S
@@ -16,7 +16,11 @@
 	.type	SYMBOL(\ep), "object"
 	.endm
 	.macro SIZE ep
+#  if defined(__ghs__)
+	.size	SYMBOL(ep), . - SYMBOL(ep)
+#  else
 	.size	SYMBOL(\ep), . - SYMBOL(\ep)
+#  endif
 	.endm
 #else
 #  define SYMBOL(s) _##s