LingaoM commented on PR #19369:
URL: https://github.com/apache/nuttx/pull/19369#issuecomment-4920845577

   One more point: this was not originally intended as a NuttX core change. Our 
first choice was to keep this entirely inside the application/porting layer. 
However, in sim builds NuttX intentionally renames libc/POSIX symbols before 
the final link, so application code cannot reliably opt in to selected host 
Linux APIs by itself. That restriction is real and is defined by the sim symbol 
renaming mechanism.
   
   If there is an accepted way for sim-only application code to explicitly opt 
in to host Linux APIs without bypassing NuttX’s normal interfaces, I am happy 
to move this PR out of the core changes or close that.
   
   Actually, I also think this may be the cleaner direction: provide an 
explicit sim-only opt-in mechanism for applications that intentionally need 
host Linux APIs. The default NuttX behavior should remain unchanged: 
applications should use standard NuttX interfaces, and libc/POSIX symbols 
should continue to be renamed to avoid accidental host binding.
   
   With that mechanism, we could keep these host-Linux shims in the 
application/porting layer and avoid adding workload-specific APIs to the NuttX 
core repository. The NuttX core would only provide the opt-in path; the app 
would decide whether to use it.
   


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