Hi Adrian, Thank you for your explanation. But I am still a little confused. If a C++ program uses standard library, then both standard library C++ library and C library are needed, right? And in sel4, you have ported a standard library C library (muslc), but you do not port any standard library C++ library to sel4. Is this correct? I know some standard library C library, such as glibc or muslc, but I do not know any standard library C++ library. Could you give me suggestion which C++ library may easy to port?
In additon, you said that you had some success with using your native gcc C++ libraries for compilation. Do you mean you link C++ program with Linux native C++ library first, and then link it to C library in sel4? Thanks a lot!. Yuxin On Tue, Jun 16, 2015 at 8:42 PM, Adrian Danis <[email protected]> wrote: > The seL4 kernel itself does not need anything for running C++ support. > However, a version of the C++ standard library would need to be ported / > implemented to a particular seL4 environment. If you would like to compile > C++ code that does not use the standard library then this relatively easy > and there is a trivial example in sel4test (see > https://github.com/seL4/sel4test/blob/master/apps/sel4test-tests/src/tests/domains.cxx > and > https://github.com/seL4/sel4test/blob/master/apps/sel4test-tests/Makefile) > > I had some success with using my native gcc C++ libraries for compilation, > although it was a little fiddly to make work. The idea there is that since > the C++ standard libraries depend upon the syscalls and other symbols > defined in the C library you can just link against your native C++ > libraries, and rely on the ported C library (in our case muslc) to > implement the syscalls and make everything work. > I am not promoting this as a good idea or a way to build a reliable > system, but might give you a bit of insight into what is required for a > proper C++ port. > > Adrian > > > On 17/06/15 08:32, Yuxin Ren wrote: > > Hi, > > Can I run C++ programs on sel4? > I am not familiar with programming language. > I do not know the relationship between the OS and the C++ language. > In order to run C++, does the OS need to provide some support or what user > level library are needed? > > Thanks a lot. > Yuxin > > > _______________________________________________ > Devel mailing [email protected]https://sel4.systems/lists/listinfo/devel > > > > ------------------------------ > > The information in this e-mail may be confidential and subject to legal > professional privilege and/or copyright. National ICT Australia Limited > accepts no liability for any damage caused by this email or its attachments. >
_______________________________________________ Devel mailing list [email protected] https://sel4.systems/lists/listinfo/devel
