v01d commented on pull request #3589:
URL: https://github.com/apache/incubator-nuttx/pull/3589#issuecomment-828079445


   > No, your understanding is not quite correct. In the FLAT build, only one 
copy of the libraries is built. The OS and the applications link to the same 
libraries. For example, libs/libc builds libc.a for both the applications and 
the OS code. Sorry, I didn't clarify: my question regarding *KERNEL* was for 
FLAT mode. I noticed looking at |LibTargets.mk| that libs, mm and libapps do 
not ever receive the KDEFINE flags, while other libs do.
   > I don't think __KERNEL__ does anything in the FLAT build.
   
   Oh ok. In my case I had an issue with these lines in `stdlib.h` when 
building the C++ library:
   
   ```c
   /* System() command is not implemented in the NuttX libc because it is so
    * entangled with shell logic.  There is an experimental version at
    * apps/system/system.  system() is prototyped here, however, for
    * standards compatibility.
    */
   
   #ifndef __KERNEL__
   int       system(FAR const char *cmd);
   #endif
   ```


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