From: | Ahmed Soliman <ahmedsoliman0x666@×××××.com> |
---|---|
To: | gentoo-soc@l.g.o |
Cc: | Luca Barbato <lu_zero@g.o> |
Subject: | [gentoo-soc] Weekly Progress Report: Porting Relibc to gentoo |
Date: | Sun, 07 Jun 2020 12:09:11 |
Message-Id: | CAAGnT3bQqVOSE1aSwxvMNqGrLxrUJYpTUHRf+c+TUMG1LT-Ptg@mail.gmail.com |
1 | Hello, |
2 | |
3 | For past (few) week(s): I have been working on compiling Gcc with relibc, |
4 | |
5 | I have faced bunch of bugs and missing features and bugs, |
6 | |
7 | First about setting up the environment and my previous work on the |
8 | task, I had documented it in a public blog post so I will just like it |
9 | to it here[1]. |
10 | |
11 | As for GCC, the first issue I faced was that it was expecting types |
12 | that was not defined in relibc and it has been fixed in this merge |
13 | request[2] |
14 | |
15 | Next issue was bug[3] that was revealed by GCC was well but related to |
16 | LD_SEARCH_PATH variable. The issue was that it was using errno which |
17 | is Thread Local variable even though thread local memory was not |
18 | setted up yet. |
19 | |
20 | Third issue[4] was related to gcc using -fpermessive and that didn't |
21 | play well with some macros defined in include/bits/limits.h . |
22 | |
23 | The last issue[5] which is the most complex by far was that *scanf* |
24 | functions required lookahead but they never seek back after the |
25 | lookahead, The problem was that at their core they all were dealing |
26 | with a rust Reader object which doesn't support seek back at all. So |
27 | my solution was designing a new wrapper for both Files and Buffers |
28 | that supports reading as well as looking ahead. |
29 | |
30 | [1] https://oddcoder.com/GSOC-with-gentoo/ |
31 | [2] https://gitlab.redox-os.org/redox-os/relibc/-/merge_requests/270 |
32 | [3] https://gitlab.redox-os.org/redox-os/relibc/-/merge_requests/275 |
33 | [4] https://gitlab.redox-os.org/redox-os/relibc/-/merge_requests/276 |
34 | [5] https://gitlab.redox-os.org/redox-os/relibc/-/merge_requests/277 |