You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/07/01 09:50:56 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 opened a new pull request #1344: boards: Remove the unused ARCHCCVERSION and ARCHCCMAJOR

xiaoxiang781216 opened a new pull request #1344:
URL: https://github.com/apache/incubator-nuttx/pull/1344


   ## Summary
   
   ## Impact
   No, since nobody reference these variables.
   
   ## Testing
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #1344: boards: Remove the unused ARCHCCVERSION and ARCHCCMAJOR

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #1344:
URL: https://github.com/apache/incubator-nuttx/pull/1344#issuecomment-652339778


   > @xiaoxiang781216 Should this be removed or used?
   > Printing the version of a compiler and the git hash allows us to due post postmortem debugging.
   > if used it should be displayed at build time and stored stored in proc with there version info.
   
   The same info already support, you can:
   1.Call uname programatically
   2.Or cat /proc/version by scripting
   The output include:
   1.The build date/time
   2.The release tag(e.g. 9.0.1)
   3.The last commit id
   4.The dirty flag(whether has the uncommited change)
   ```
   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
   ```
   So we don't need keep these unused variables.
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 edited a comment on pull request #1344: boards: Remove the unused ARCHCCVERSION and ARCHCCMAJOR

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 edited a comment on pull request #1344:
URL: https://github.com/apache/incubator-nuttx/pull/1344#issuecomment-652375887


   > @xiaoxiang781216 that seems limited to gnu and would not be in alignment with not using compiler specific macros in code other than compiler.h.
   
   All compilers define the similar macros:
   https://developer.arm.com/documentation/dui0472/k/Compiler-specific-Features/Predefined-macros
   https://sourceforge.net/p/predef/wiki/Compilers/
   Yes, if you want to print toolchain info, please:
   1.Add a new macro(e.g. COMPILER_VERSION) in compiler.h
   2.Assign it to the different predefined value according the compiler type
   3.Reference the common macro in uname
   This approach is much better than let's the board file generate the version individually. Do you want to modify more than 200 files to support this feature? 
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] davids5 commented on pull request #1344: boards: Remove the unused ARCHCCVERSION and ARCHCCMAJOR

Posted by GitBox <gi...@apache.org>.
davids5 commented on pull request #1344:
URL: https://github.com/apache/incubator-nuttx/pull/1344#issuecomment-652386557


   @xiaoxiang781216 that make much more sense then your last suggestion.  


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] davids5 commented on pull request #1344: boards: Remove the unused ARCHCCVERSION and ARCHCCMAJOR

Posted by GitBox <gi...@apache.org>.
davids5 commented on pull request #1344:
URL: https://github.com/apache/incubator-nuttx/pull/1344#issuecomment-657100844


   @xiaoxiang781216 I was waiting for @patacongo to chime in.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 edited a comment on pull request #1344: boards: Remove the unused ARCHCCVERSION and ARCHCCMAJOR

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 edited a comment on pull request #1344:
URL: https://github.com/apache/incubator-nuttx/pull/1344#issuecomment-652375887


   > @xiaoxiang781216 that seems limited to gnu and would not be in alignment with not using compiler specific macros in code other than compiler.h.
   
   All compilers define the similar macros:
   https://developer.arm.com/documentation/dui0472/k/Compiler-specific-Features/Predefined-macros
   https://sourceforge.net/p/predef/wiki/Compilers/
   Yes, if you want to print toolchain info, please:
   1.Add a new macro(e.g. COMPILER_VERSION) in compiler.h
   2.Assign it to the different predefined value according the compiler type
   3.Reference the common macro in uname
   This approach is much better than let's the board files generate the version individually. Do you want to modify more than 200 files to support this feature? 
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #1344: boards: Remove the unused ARCHCCVERSION and ARCHCCMAJOR

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #1344:
URL: https://github.com/apache/incubator-nuttx/pull/1344#issuecomment-652375887


   > @xiaoxiang781216 that seems limited to gnu and would not be in alignment with not using compiler specific macros in code other than compiler.h.
   
   All compilers define the similar macros, the different is whether you put the check:
   https://developer.arm.com/documentation/dui0472/k/Compiler-specific-Features/Predefined-macros
   https://sourceforge.net/p/predef/wiki/Compilers/
   Yes, if you want to print toolchain info, please:
   1.Add a new macro(e.g. COMPILER_VERSION) in compiler.h
   2.Assign it to the different predefined value according the compiler type
   3.Reference the common macro in uname
   This approach is much better than let's the board file generate the version individually. Do you want to modify more than 200 file to support this feature? 
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 edited a comment on pull request #1344: boards: Remove the unused ARCHCCVERSION and ARCHCCMAJOR

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 edited a comment on pull request #1344:
URL: https://github.com/apache/incubator-nuttx/pull/1344#issuecomment-652375887


   > @xiaoxiang781216 that seems limited to gnu and would not be in alignment with not using compiler specific macros in code other than compiler.h.
   
   All compilers define the similar macros:
   https://developer.arm.com/documentation/dui0472/k/Compiler-specific-Features/Predefined-macros
   https://sourceforge.net/p/predef/wiki/Compilers/
   Yes, if you want to print toolchain info, please:
   1.Add a new macro(e.g. COMPILER_VERSION) in compiler.h
   2.Assign it to the different predefined value according the compiler type
   3.Reference the common macro in uname
   This approach is much better than let's the board file generate the version individually. Do you want to modify more than 200 file to support this feature? 
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 edited a comment on pull request #1344: boards: Remove the unused ARCHCCVERSION and ARCHCCMAJOR

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 edited a comment 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 task 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:
users@infra.apache.org



[GitHub] [incubator-nuttx] davids5 edited a comment on pull request #1344: boards: Remove the unused ARCHCCVERSION and ARCHCCMAJOR

Posted by GitBox <gi...@apache.org>.
davids5 edited a comment on pull request #1344:
URL: https://github.com/apache/incubator-nuttx/pull/1344#issuecomment-652353953


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


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #1344: boards: Remove the unused ARCHCCVERSION and ARCHCCMAJOR

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #1344: boards: Remove the unused ARCHCCVERSION and ARCHCCMAJOR

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #1344:
URL: https://github.com/apache/incubator-nuttx/pull/1344#issuecomment-657079737


   @davids5 please help merge this patch if you don't have more concern.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] davids5 commented on pull request #1344: boards: Remove the unused ARCHCCVERSION and ARCHCCMAJOR

Posted by GitBox <gi...@apache.org>.
davids5 commented on pull request #1344:
URL: https://github.com/apache/incubator-nuttx/pull/1344#issuecomment-652365645


   @xiaoxiang781216 that seems limited to gnu and would not be in alignment with not using compiler specific macros in code other than compiler.h. 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] davids5 commented on pull request #1344: boards: Remove the unused ARCHCCVERSION and ARCHCCMAJOR

Posted by GitBox <gi...@apache.org>.
davids5 commented on pull request #1344:
URL: https://github.com/apache/incubator-nuttx/pull/1344#issuecomment-652353953


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


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] davids5 merged pull request #1344: boards: Remove the unused ARCHCCVERSION and ARCHCCMAJOR

Posted by GitBox <gi...@apache.org>.
davids5 merged pull request #1344:
URL: https://github.com/apache/incubator-nuttx/pull/1344


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #1344: boards: Remove the unused ARCHCCVERSION and ARCHCCMAJOR

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #1344:
URL: https://github.com/apache/incubator-nuttx/pull/1344#issuecomment-659421394


   @davids5 it seem that @patacongo don't have an objection for this patch.


----------------------------------------------------------------
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:
users@infra.apache.org