Add *-helenos-* target to GCC
Patch GCC compiler to support a truly native *-helenos-*
target.
- Details
-
The GCC compiler was ported to HelenOS during 2013. The porting effort concentrated on running the GCC somehow in HelenOS and there was no emphasis on patching GCC to look as a native compiler. Thus, the user still needs to add
-nostdlib
and similar flags to it to compile anything in HelenOS.
The goal of this project is to add a *-helenos-*
target to GCC that would target the Linux ABI but would use HelenOS-specific directories or predefined macros. Also, the ported GCC is rather old (4.6.3) and shall be updated to the newest version (this includes the need to add rudimentary support for C++ in HelenOS).
Follows an incomplete list of some of the features that needs to be covered
- update to newest GCC
- add support for C++ to HelenOS
- add HelenOS specific defines such as
__LE__
or __32_BITS__
- get rid of Linux defines such as
__unix__
- use HelenOS include directory
/inc
instead of all the /usr/something
that are used in Linux
- use proper linker script
It would very nice to add a custom HelenOS -posix
switch for building POSIX applications opposed to native HelenOS ones.
- What Gains and Benefits will this bring?
-
One of the strategic goals for HelenOS is becoming self-hosting. Since most of the HelenOS code is written in C, having a portable, full-fledged native C compiler is a prerequisite to reaching this goal. Using the same compiler for cross-compilation and building HelenOS from itself is also a benefit of its own. This particular task will improve the usability of GCC when run inside HelenOS.
- Difficulty
-
Easy to Medium. Once the student becomes acquainted with the organization of GCC source tree, the patches would be rather straightforward. Prospective applicants shall consider proposing this one together with Bazaar port.
- Required skills
-
A successful applicant will have good skills of programming in the 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
-
- Possible mentors
-
HelenOS Core Team, Vojtech Horky
Change History
(10)
Description: |
modified (diff)
|
Keywords: |
gsoc14 gsoc15 gsoc16 gsoc17 removed
|
Milestone: |
→ 0.7.2
|
Owner: |
set to Jiří Zárevúcky
|
Status: |
new → assigned
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
Working on this.