hujun260 opened a new pull request, #18274:
URL: https://github.com/apache/nuttx/pull/18274

   Improve tls_get_info function availability in different build configurations
   
   Simplify the conditional compilation logic for the tls_get_info() function in
   libs/libc/tls/tls_getinfo.c. The function is essential for TLS management and
   should be available in most build configurations. By removing the restrictive
   CONFIG_TLS_ALIGNED dependency and implementing an explicit undef directive,
   the implementation ensures broader availability while maintaining proper 
control
   over macro definitions.
   
   ###Summary
   
   - Modify conditional compilation from complex multi-condition check to 
simpler up_tls_info check
   - Add explicit undef directive for tls_get_info to prevent macro definition 
conflicts
   - Ensure tls_get_info function is compiled and available in most 
configurations instead of being limited to kernel or non-aligned TLS builds
   
   #TEST
   
   In FlatBuild, if we use the CONFIG_TLS_ALIGNED=y and also utilize poll, the 
following compilation error will occur.
   
   for example:
   make distclean -j20; ./tools/configure.sh -l fvp-armv8r:nsh;make -j25;
   
   ```
   LD: nuttx
   aarch64-none-elf-ld: 
/home/hujun5/downloads/vela_sim/nuttx/staging/libfs.a(fs_poll.o): in function 
`poll':
   
/home/hujun5/downloads/vela_sim/nuttx/fs/vfs/fs_poll.c:470:(.text.poll+0x114): 
undefined reference to `tls_get_info'
   aarch64-none-elf-ld: 
/home/hujun5/downloads/vela_sim/nuttx/fs/vfs/fs_poll.c:521:(.text.poll+0x14c): 
undefined reference to `tls_get_info'
   Memory region         Used Size  Region Size  %age Used
              ksram:        288 KB       128 MB      0.22%
   ```


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