id summary reporter owner description type status priority milestone component version resolution keywords cc field_blocks field_dependson field_seealso 654 C++ support Vojtech Horky "Implement support for C++ in HelenOS to allow compilation and execution of C++ programs. Details:: Currently the only language that is fully supported for development of applications for HelenOS is plain C. While C is a good choice for kernel and low-level services, for more complex applications C++ might be a better choice. The goal of this ticket is to bring support for C++ to HelenOS, from toolchain installation to run-time support in HelenOS. [[br]][[br]] HelenOS toolchain script already installs a C++ compiler (`g++`). Still some minor changes might be needed (probably in the form of `configure` options). [[br]][[br]] Since all HelenOS components (kernel, userspace servers and utilities) are currently written in C, the build process compiles all source files with a C compiler. It would be necessary to add support for compilation of C++ programs, e.g. by automatic detection of `.cpp` files among the sources or by a manually specified flag. [[br]][[br]] Next step is adding the run-time support for C++. The C++ compiler expects that a system library implementats functions needed for the support of exceptions (namely support for stack unwinding) and run-time type identification. There are two options: port the GCC-provided libraries or write implementation from scratch. The first option would probably require extensive patching as HelenOS is a non-POSIX environment but it would bring a full-fledged support. On the other hand, rudimentary support can be written from scratch and extra functionality might be added later, in an on-demand manner. [[br]][[br]] Last step towards full C++ support is STL with `std::string`, containers and streams. Again, it is possible to write the library from scratch or port an existing solution. What Gains and Benefits will this bring?:: The obvious benefit when this task is completed is the ability to execute C++ programs inside HelenOS. That would give HelenOS developers more flexibility in development of new utilities and servers as another language would be supported. By adding the C++ support it would also be possible to upgrade the GCC version we currently use inside HelenOS (i.e. not the cross-compiler but the native compiler available through Coastline), bringing HelenOS one-more step closer to being self-hosted. Difficulty:: medium to high Required skills:: A successful applicant will have good skills of programming in the C and C++ languages and the ability to survive in a non-standard non-POSIX application environment. Understanding of compiler internals would be beneficial. Documentation:: * DeveloperDocs * [[http://wiki.osdev.org/C%2B%2B|On C++ run-time support (OSDev wiki)]] * [[PortingSoftware|Porting software to HelenOS]] Possible mentors:: HelenOS Core Team, Vojtech Horky " enhancement closed major 0.7.2 helenos/unspecified mainline fixed gsoc16, gsoc17