xiaoxiang781216 commented on pull request #1344:
URL: https://github.com/apache/incubator-nuttx/pull/1344#issuecomment-652362444


   > > nsh> cat /proc/version
   > > NuttX version 9.0.0 ac6183365a-dirty Jul  1 2020 18:33:52
   > > nsh> uname -a
   > > NuttX  9.0.0 ac6183365a-dirty Jul  1 2020 18:33:34 sim sim
   > 
   > Yes. But what compiler built it?
   > 
   > Think about 3 years from now. There is a hard fault on a product. You need 
to debug it. But you have upgraded your compiler 3 times. How would you 
generate an elf to debug it to do postmortem debugging? If you list the 
compiler in the build you can.
   
   If you want these features, the same info already provide by the predefined 
macros:
   
https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html#Common-Predefined-Macros
   ```
   __GNUC__
   __GNUC_MINOR__
   __GNUC_PATCHLEVEL__
   __VERSION__
   ```
   It's simple to directly reference them here:
   
https://github.com/apache/incubator-nuttx/blob/master/libs/libc/misc/lib_utsname.c#L113


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

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


Reply via email to