Shanks0224 commented on PR #21834:
URL: https://github.com/apache/nuttx/pull/21834#issuecomment-6910454725

   > > CI fails because b-g431b-esc1:nsh, nucleo-g431kb:nsh, nucleo-g431rb:nsh 
and nucleo-l432kc:wgen overflow the flash by 160 to 1028 bytes.They build 
ostest with LTO, and the new EINVAL checks keep the ostest error paths that LTO 
used to drop.
   > > Earlier overflows here were fixed by disabling unused NSH 
commands([cb6d987](https://github.com/apache/nuttx/commit/cb6d98746b9413fc54aeb9202429b7d1adf44dbe),
 
[b118542](https://github.com/apache/nuttx/commit/b118542e31915b167edad04ba23c8579cf04b4b8)).Is
 there a guideline for which options to disable, or would you prefer another 
approach? @xiaoxiang781216
   > 
   > let's enable LTO first, but why this pr increase the code size so larger?
   
   Most of the growth is in ostest.  On nucleo-g431rb:nsh the "Return EINVAL 
for invalid pthread objects" commit adds 1191 of the 1235 bytes.
   About 800 bytes of that are ostest error messages: LTO inlines 
pthread_attr_setschedparam() and pthread_attr_setstacksize() and could prove 
that they return 0 for ostest's constant arguments, so it dropped
   those error paths.  The new PTHREAD_ATTR_IS_VALID() check keeps 12 of them.
     
   nucleo-l432kc:wgen fits with CONFIG_LTO_FULL=y.  The three stm32g4 configs 
already use LTO and still overflow by 160-1028 bytes.


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