Gentoo Archives: gentoo-soc

From: Pengcheng Xu <i@××××××××.moe>
To: gentoo-soc@l.g.o
Subject: RE: [gentoo-soc] Weekly Report: Portage Powered Android
Date: Wed, 01 Jul 2020 14:07:53
Message-Id: 02fc01d64fb1$006b0e30$01412a90$@jsteward.moe
In Reply to: [gentoo-soc] Weekly Report: Portage Powered Android by Gunwant Jain
1 Hi Gunwant,
2
3 Glad to see your progress regarding the toolchain. Stupid Microsoft Outlook won't do inline replies correctly, so bear with me if you see the following folded in your email client. And yes, I'm aware that the line breaks are completely messed up (i.e. super-long lines). I've planned to fix it some time later, just don't have much time to spare recently...
4
5 Anyway, find my comments below.
6
7 > -----Original Message-----
8 > From: Gunwant Jain <therealgunwant@×××××.com>
9 > Sent: Tuesday, June 30, 2020 4:12 AM
10 > To: gentoo-soc@l.g.o
11 > Subject: [gentoo-soc] Weekly Report: Portage Powered Android
12 >
13 > Hello Everyone,
14 >
15 > This week, I had relatively less work done.
16 > I spent most of my time perusing the LFS guide and osdev.org learning
17 > about building toolchains. Then I went onto building the
18 > aarch64-linux-android toolchain as described in [1]. I updated the
19 > kernel sources for my phone [2]. And in general tidied up my kernel
20 > repository.
21
22 It's good that you chose to get familiar with the GNU build system (autotools); it will save you large amounts of time when meddling with toolchain-related work. I would also suggest taking a look at the "GNU Hello" project; it serves as a genuine example of the basics for a GNU project, which GCC is as well. Get familiar with how to read the configuration and compilation logs, especially when they're littered with libtool calls instead of directly calling the compiler.
23
24 > But while building the toolchain, I was not able to compile `gcc` as
25 > I was riddled with errors along the way. Most of them are related to the
26 > newer `gcc` (version 9.x) finding incompatibility in the sources of the
27 > `gcc` I am trying to build (version 4.9).
28 > I will continue to build the toolchain and hopefully move onto
29 > separating `Bionic` from the other side of Android mid-week.
30
31 Just as Benda pointed out, 4.9 may be the one I chose two years ago, but it's not a hard requirement: most Android things should compile fine with any newer versions of GCC as long as the toolchain is correctly configured for an Android target; in many occasions even Clang works perfectly fine. You may try to fix the problems in the 4.9 tree, tweak the options for the "build" compiler (gcc-9) to accept older, non-compliant sources, or try to find a newer version of GCC source tree with Android (i.e. Bionic) support. You may have better luck looking for such a source tree in the AOSP codebase.
32
33 >
34 > Thanks,
35 > Gunwant
36 >
37 > [1]
38 > https://wiki.gentoo.org/wiki/Android/SharkBait/Building_a_toolchain_for_aa
39 > rch64-linux-android
40 > [2]
41 > https://github.com/WantGuns/overlay/blob/master/sys-kernel/linux-headers/l
42 > inux-headers-4.4.222.ebuild
43
44 And, we'd love to see a link to your weekly writeup of your efforts and problems encountered in greater detail. We can find out more about your progress and perhaps provide assistance if we can see the exact problem; for example, it would be helpful if you quoted or linked to the exact error message in the gcc build process you just mentioned. It's also a good idea to keep these in track for archival purposes, such that future contributors can have an idea of what's going on if they run into the same problem.
45
46 Regards,
47 --
48 Pengcheng Xu
49 https://jsteward.moe

Attachments

File name MIME type
openpgp-digital-signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-soc] Weekly Report: Portage Powered Android Gunwant Jain <therealgunwant@×××××.com>