1 |
Plan for today: |
2 |
- build a stage4 |
3 |
|
4 |
Progress: |
5 |
- (thanks to jmbsvicetto's advice on #gentoo-releng) install clang and |
6 |
related libs in a vanilla musl stage3, make clang the default |
7 |
compiler, try to rebuild @world, fix packages that fail, and build a |
8 |
stage4 based on that customized stage3 |
9 |
|
10 |
Surprisingly, when rebuilding @world with the native clang, only two |
11 |
packages failed: iproute2 and llvm itself, which are not hard to fix |
12 |
:) |
13 |
|
14 |
iproute2 depends on libmnl, which is mis-compiled by clang. This is a |
15 |
known issue, and easy to fix: just compile libmnl with gcc. Or |
16 |
alternatively, apply USE=minimal on iproute2 so it doesn't depend on |
17 |
libmnl. For more info: |
18 |
https://bugs.chromium.org/p/chromium/issues/detail?id=548786 |
19 |
|
20 |
As for llvm, certain components of it depend some symbols provided by |
21 |
libgcc_s, but unavailable in libunwind, including __regsiter_frame and |
22 |
__deregister_frame. Interestingly, these symbols are provided by |
23 |
llvm's version of libunwind. Anyway, I'm using the non-llvm libunwind |
24 |
now just for convenience, and this problem is easy to fix: build all |
25 |
llvm libs as static libs, and disable the llvm bitcode interpreter |
26 |
(lli). This fix doesn't affect the functionality of clang. I may |
27 |
revisit this issue later and see how llvm's libunwind work. |
28 |
|
29 |
The building of stage4 went quite smoothly as well. It seems stage4 |
30 |
doesn't require rebuilding of the kernel, so using clang as the |
31 |
default compiler causes no problem so far. |
32 |
|
33 |
Plan for tomorrow: |
34 |
- test the stage4 |
35 |
- submit my ebuilds to the GitHub repo |
36 |
|
37 |
|
38 |
Lei |