Gentoo Archives: gentoo-soc

From: Ahmed Soliman <ahmedsoliman0x666@×××××.com>
To: gentoo-soc@l.g.o
Cc: Luca Barbato <lu_zero@g.o>
Subject: [gentoo-soc] Weekly Progress: Porting relibc to gentoo
Date: Sun, 21 Jun 2020 20:49:02
Message-Id: CAAGnT3a=vx2p7wnUvUiT_vmOtfEdvmV_s0raPfi_GJDkiwqJ-Q@mail.gmail.com
1 So for this week I worked on two patch sets (still trying to get gcc
2 to link against relibc).
3
4 While compiling Gcc using relibc, there was a stage where xgcc is
5 generated and linked against relibc and used to compile the rest of
6 the compiler. But the issue was that I was using the debug version of
7 relibc which is significantly slower than the release version. When I
8 tried switching to the release version, ld.so crashed in a very early
9 stage. The issue was that Relibc had some assembly code (that broke
10 ABI compatibility) when compiled in the release build. This patch[1]
11 fixes this issue by trying to replace the assembly code by pure rust.
12
13 Catching this bug was extremely complex because back then I didn't
14 have debug symbols to help me figure where is the bug I only had to
15 use prints for debugging and reading through the generated assembly
16
17 I have also worked on porting elf.h to relibc as it was needed by gcc
18 but not implemented yet in relibc, also gcc needed the posix defined
19 file locking mechanism which wasn't implemented either in relibc. Both
20 are implemented in this patch[2].
21
22 Thanks,
23 Ahmed.
24
25 [1] https://gitlab.redox-os.org/redox-os/relibc/-/merge_requests/282
26 [2] https://gitlab.redox-os.org/redox-os/relibc/-/merge_requests/283