anchao commented on code in PR #12846:
URL: https://github.com/apache/nuttx/pull/12846#discussion_r1704881423


##########
arch/arm/src/common/gnu/fork.S:
##########
@@ -78,7 +77,11 @@
  ****************************************************************************/
 
        .globl  up_fork
+#ifdef __ghs__
+       .type   up_fork, $function

Review Comment:
   ```suggestion
        .type   up_fork, "function"
   ```
   Use double quotes, remove the check



##########
include/nuttx/compiler.h:
##########
@@ -87,12 +87,21 @@
 #  define CONFIG_HAVE_CXX14 1
 #endif
 
+/* Green Hills Software definitions *****************************************/
+
+#if defined(__ghs__)

Review Comment:
   move to line 103



##########
include/nuttx/compiler.h:
##########
@@ -87,12 +87,21 @@
 #  define CONFIG_HAVE_CXX14 1
 #endif
 
+/* Green Hills Software definitions *****************************************/
+
+#if defined(__ghs__)
+
+#  pragma weak __gh_long_long_printf
+#  pragma weak __gh_float_printf
+
+#endif
+
 /* GCC-specific definitions *************************************************/
 
 #ifdef __GNUC__
 
 /* Built-ins */
-#  if __GNUC__ >= 4
+#  if __GNUC__ >= 4 && !defined(__ghs__)

Review Comment:
   check ghs before __GNUC__



##########
include/nuttx/compiler.h:
##########
@@ -87,12 +87,21 @@
 #  define CONFIG_HAVE_CXX14 1
 #endif
 
+/* Green Hills Software definitions *****************************************/
+
+#if defined(__ghs__)
+
+#  pragma weak __gh_long_long_printf
+#  pragma weak __gh_float_printf

Review Comment:
   add some comments for this hack



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to