Porting musl libc to RISC-V Description: ... Goals and deliverables: * Milestone #1 (MANDATORY): Complete musl-libc port for riscv-linux, targeting RV32G and RV64G ISAs. Milestone #1 completion criterions: Functional criterion: riscv-musl (lets call it so) should pass all libc-test [http://wiki.musl-libc.org/wiki/Libc-Test] tests, except tests for: * optional features that are not implemented in musl yet (e.g. posix/XSI, mentioned at libc-test musl-wiki page above) * features, that could not be implemented, because of ISA limitations * features, that could not be implemented, because of riscv-toolkit limitations (e.g. unimplemented riscv-gcc or riscv-linux feature/API or unstable riscv-gcc or riscv-linux API/ABI) Of course reasoned explanation of "why particular feature was not implemented" should (and would) be granted. Perfomance criterion: riscv-musl should be tested with libc-bench [http://www.etalabs.net/libc-bench.html][http://git.musl-libc.org/cgit/libc-bench/] benchmark and should not show any significant regression compared to existing riscv-musl benchmarking results [http://www.etalabs.net/compare_libcs.html] for other platforms. * Milestone #2 (MANDATORY): *Analysis* and/or testing of potential optimization candidates. What, why and how could be further optimized and which perfomance increase expected. * Milestone #3 (OPTIONAL): Implementation (partial or full) of *found* optimizations with constant regression and functional *testing*. If all milestones would be achieved ahead of time, or as a further development of the project after GSoC completion, following stretch goal could be implemented: Adapt riscv-musl to modular nature of RISC-V ISA, e.g. adapt build system for modular ISA (conditional compilation and stuff), add support for soft-float, for ISA's without F and D extensions, add support for no-mmu systems, etc. Timeline: This timeline targets more of pessimistically-realistic schedule. Porting libc to the new, mostly undocumented ISA, is hard and routine task, so I include a lot of time for investigation, taking wrong pathes, etc. As I'm a pre-graduaded student, I won't be able to work full-time during June. So, I would spread my June work to "community bonding" (i.e. before 25.05.2015, when GSoC coding officially starts) period as well. 30.03.2015 - 26.04.2015 Catching up with my university stuff. 0-15 hours of work per week. My main milestone for this period is: Investigating source code, specifying list of things that I don't know or don't understand yet. As a result by the end of April I should clearly "know the things that I don't know". e.g. Rich Felker mentions "cas" in his musl-libc porting tips [http://www.openwall.com/lists/musl/2012/07/08/1]; RISC-V ISA also mentions "CAS" and says that RISC-V implements "LR/SC" approach. And I have no idea what both of them means and how it affects my work. Other milestones: Porting crt. Getting familiar with arch/*/bits, start porting process. This is not very tough work (we don't even know, if I'm accepted into GSoC until 27.04.2015), yet it's extremely important. 27.04.2015 - 03.05.2015 ("Community bonding" period) University. 15-30 hours of work. Main milestone for this week is: Make up detailed schedule for following 2 months. And of course continue previous work in some reasonable way. 04.05.2015 - 24.05.2015 ("Community bonding" period) University. 15-30 hours of work per week. Main milestone for this period is: Achieve requirments for "most single-threaded, static-linked programs", according to Rich Felker's porting tips [http://www.openwall.com/lists/musl/2012/07/08/1]. Other tasks: Get familiar with build system. Get fully working and ready development environment. Toolchain. ISA simulator. At least *begin* working on testsuites (libc-test and libc-bench). e.g. libc-test use make for both building suite and runing tests, so either I should have working riscv-linux image with gcc and make or I should prepare some cross-testing suite. 25.05.2015 - 31.05.2015 (GSoC start) Exams. 0-20 hours of work. Work continued in the same way. Dynamic linking, threading and everything else. 01.06.2015 - 07.06.2015 Exams. 0-20 hours of work. ... 08.06.2015 - 14.06.2015 Almost free. *At least* 20-30 hours of work. ... 15.06.2015 - 21.06.2015 Almost free. *At least* 20-30 hours of work. ... 22.06.2015 - 28.06.2015 (GSoC mid-term evaluation; from 26.06.2015) Evaluation work verification. Degree. 15-30 hours of work. Work continued in the same way. Intensive testing and bugfixing. 29.06.2015 - 05.07.2015 (GSoC mid-term evaluation; till 03.07.2015) Full 40 hours of work per week *from now on*. Work continued in the same way. Dynamic linking, threading and everything else. Intensive testing and bugfixing. *Milestone #1 should be fully reached this week!* 06.07.2015 - 12.07.2015 Working on milestones #2 and #3 from now on. Constant testing and bugfixing. 13.07.2015 - 19.07.2015 ... 20.07.2015 - 26.07.2015 ... 27.07.2015 - 02.08.2015 ... 03.08.2015 - 09.08.2015 ... 10.08.2015 - 16.08.2015 ... 17.08.2015 - 23.08.2015 (GSoC finish) Final rounds of testing, bugfixing and code-polishing. Working on documentation and reports. Why this project?: ... Personal details: Roman Titov email: titovroman@gmail.com IRC: zoorg Phone number: +7(914)326-28-26 Postal adress: 55a-51 Russkaya Str. Vladivostok Primorskiy region 690105 Russian Federation