libc functions from c++ issues

Karel Gardas karel at functional.vision
Tue Apr 12 08:24:22 UTC 2022


On 4/12/22 10:05, Chris Johns wrote:
> I think there is something else happening here. If I use a 4.11 compiler the
> `setenv` call is not seen but `pthread_kill` is. Maybe 6 is more standards
> compliant? I do not know.
> 
> I am porting a large piece of existing code to RTEMS and that code compiles and
> runs on current Linux systems.
> 
> Why does Linux build this code and we do not?
> 
> Should we be compatible or standards compliant?

This is million dollar question.

But I can offer just simple advice: try to compile the code in question 
on Solaris (11 or even better 10). In the past it was much more strict 
about standard than both Linux and BSD camp hence I usually used that 
for detecting: is the code Linux specific or is it written to be more 
portable and standards compliant? It'll just give you a sign although in 
this particular case of C/C++ integration it may not work that well...

Good luck!
Karel


More information about the devel mailing list