extinguish commented on code in PR #12885:
URL: https://github.com/apache/nuttx/pull/12885#discussion_r1713833990


##########
include/nuttx/compiler.h:
##########
@@ -87,12 +87,29 @@
 #  define CONFIG_HAVE_CXX14 1
 #endif
 
+/* Green Hills Software definitions *****************************************/
+
+#if defined(__ghs__)
+
+#  define __extension__
+
+/* the following function is not truly need in runtime, and in order to fix
+ * undefined symbol link error, we need to make the following symbols as weak
+ */
+
+#  pragma weak __gh_long_long_printf

Review Comment:
   > Instead of adding ugly code to the architecture, you could refer to the 
tricore arch how to handles unreferenced symbols , use a dummy c file to 
implement these symbols: 
https://github.com/apache/nuttx/blob/master/arch/tricore/src/tc3xx/tc3xx_libc.c
   
   I have carefully examined the directory structure of NuttX's code, but I did 
not find any directory specific to a particular compiler. 
   Instead, I found code directories specific to certain architectures. 
   If we want to create a special dummy implementation for GHS, can we create 
an implementation file like **"nuttx/compiler/ghs/ghs_dummy.c".**? is that work?



-- 
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