﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	field_blocks	field_dependson	field_seealso
517	Port the clang (LLVM) compiler to HelenOS	Vojtech Horky		"Port the [http://clang.llvm.org/ clang] (C frontend to LLVM) compiler to run in HelenOS.

 Details::
  Integrate a reasonably recent version of clang into HelenOS so that it can be used to compile C programs from within HelenOS.
  [[br]][[br]]
  clang is partially written in C++ and thus it would be necessary to introduce a rudimentary support for C++ into HelenOS libraries. The first requirement is a C++ cross-compiler but that is already prepared by the toolchain script. Next is support for some C++ constructs in HelenOS libraries (exceptions and stack unwinding) that is missing but shall not be that difficult to add. Last thing is the STL but there are many implementations around and it shall not be a big problem to find some BSD-licensed that would be easily portable. Performance of the STL is currently not an issue, the main factor shall be the simplicity of bringing it into HelenOS.

 What Gains and Benefits will this bring?::
  One of the strategic goals for HelenOS is becoming self-hosting. During previous GSoC, a PCC compiler (Portable C compiler) was ported to HelenOS but it is not possible to compile all sources with it, while clang is able to compile kernel completely and there are only very minor issues with few userspace files. Thus, having clang it would be possible to compile whole HelenOS inside HelenOS (there is already a working port of GNU binutils in HelenOS).
  [[br]][[br]]
  There is a parallel effort to bring GCC to HelenOS and it would be very nice to have the possibility to choose between more compilers when compiling HelenOS.

 Difficulty::
  Medium 

 Required skills::
  A successful applicant will have good skills of programming in the C and C++ language and the ability to survive in a non-standard non-POSIX application environment. The applicant should also be familiar with the basic concepts behind compilers and the build toolchain. 

 Documentation::
  * [DeveloperDocs#Clanguage C language standard]
  * [BinutilsMaintenance Maintenance instructions for another ported application (binutils)]
  * [http://clang.llvm.org/ clang homepage]

 Possible mentors::
  HelenOS Core Team, Vojtech Horky"	enhancement	new	major		helenos/app/other	mainline		gsoc13, gsoc14, gsoc15, socis15,gsoc16, gsoc17				#413
