Gentoo Archives: gentoo-soc

From: Gunwant Jain <therealgunwant@×××××.com>
To: gentoo-soc@l.g.o
Subject: Re: [gentoo-soc] Weekly Report: Portage Powered Android
Date: Wed, 01 Jul 2020 16:54:07
Message-Id: 20200701165354.4f4yyz5fuwqdqpk7@tardis.localdomain
In Reply to: RE: [gentoo-soc] Weekly Report: Portage Powered Android by Pengcheng Xu
1 Thanks for your comments Pengcheng.
2
3 On 20/07/01 10:07PM, Pengcheng Xu wrote:
4 > 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.
5
6 Thanks for the tip, I will definitely look into it.
7
8 > > But while building the toolchain, I was not able to compile `gcc` as
9 > > I was riddled with errors along the way. Most of them are related to the
10 > > newer `gcc` (version 9.x) finding incompatibility in the sources of the
11 > > `gcc` I am trying to build (version 4.9).
12 > > I will continue to build the toolchain and hopefully move onto
13 > > separating `Bionic` from the other side of Android mid-week.
14 >
15 > 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.
16
17 I agree, and I just realised that even though NDK requires gcc-4.9,
18 Android 8.0 and above uses Clang for compilation. This differs from my
19 days of compiling custom ROMs (pre Android 8). I am sorry for the
20 confusion created with gcc, I should have known better.
21
22 Let me switch to building a clang based toolchain now onwards.
23
24 > 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.
25
26 I wasn't planning on keeping the logs of errors I face, but since it is
27 requested, I will provide them in a new segment of "weekly blogs" now
28 onwards (keeping in mind that I have switched to using clang based
29 toolchains). Furthermore, I will be actively indicating the errors in
30 the IRC chatroom, which is logged as well.
31
32 Please let me know if you have more comments.
33
34 Regards,
35 Gunwant

Attachments

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

Replies

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