Google 删除了 Android 内核的交叉编译器。他们现在在哪里?
到目前为止,我已经使用了 UBERTC 预构建的交叉编译器,但是在编译 Android 内核时出现错误,并且它们自 2016 年以来就没有更新过他们的东西,所以我只是想找到一个替代方案。
显然,谷歌应该拥有它们。但我找不到他们。它们应该位于此处,但存储库是空的,最后一次提交显示:
删除 aarch64-linux-android gcc-4.9 库并包含
Android 已迁移到 LLVM。
垃圾箱已经被移除。删除除所有者之外的所有其他内容。
所以,我想他们已经把它们转移到其他地方了。但在哪里呢?
我不想听到您需要编译整个 AOSP 树才能进入编译器。我真的希望有另一种方式。
I've used UBERTC prebuilt cross compilers so far, but I get errors when compiling an android kernel, and they haven't updated their stuff since 2016, so I just would like to find an alternative.
Google should have them, obviosly. But I'm unable to find them. They should be here, but the repo is empty and the last commit says:
Remove aarch64-linux-android gcc-4.9 libs and includes
Android has moved to LLVM.
The bins were already removed. Remove everything else except for OWNERS.
So, I suppose they've moved them elsewhere. But where?
I wouldn't like to hear that you need to compile the whole AOSP tree to get to the compilers. I really hope there is another way.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了旧的工具链。有趣的是:由于某种原因,清理存储库之前的最新提交不包含
gcc
。所以我必须“爬”上 git 树才能找到包含它的树。这是 32 -bit ARM 工具链 和 64 位 ARM 工具< /a>.这是 2019 年的gcc 4.9
。他们的意思是什么
是您应该能够使用
clang
和llvm
交叉编译内核,并且不应再使用它们的独立解决方案。但他们没有提供任何有关如何操作的信息。是的,干得好。下载看起来像这样:
对于像我这样还没有完全了解
llvm
和clang
的人来说,还有替代工具链。 这是来自arm的一个。 com 基于gcc 11.2
。还有 Linaro 的。不管怎样,有时你应该使用旧的工具链来构建旧的内核,因为新的编译器往往会抛出更多警告,默认情况下,
Makefile
将这些警告视为错误。例如,我无法使用 arm.com 编译我的内核,因为它们太聪明并且发现了太多警告,而我还没有找到禁用它们的方法。修改Makefile
似乎不是一个有效的选项,因为它大约有 2k 行长。如果有人知道如何禁用它们,我也很想知道。但现在我将尝试坚持使用旧内核的谷歌工具链。
GLHF,哈哈。
I've found the old toolchain. The funny thing is: the latest commit before the repository was cleaned out does not contain
gcc
for some reason. So I had to "climb" up the git tree to find one which contains it. Here is 32-bit ARM toochain and 64-bit ARM toolchan. It'sgcc 4.9
from back in 2019.What they meant by
is that you should be able to cross-compile kernels with
clang
andllvm
and should not use their stand-alone solution anymore. But they didn't provide any info on how to do it. So yeah, nice job.Downloading looks like this:
There are also alternative toolchains for those like myself, who haven't wrapped their heads around
llvm
andclang
just yet. Here is one from arm.com based ongcc 11.2
. There are also Linaro ones.Anyways, you should sometimes use the old toolchains to build older kernels, since new compilers tend to throw more warnings, which are treated by
Makefile
as errors by default. For example, I'm not able to compile my kernel with the arm.com ones, because they are too smart and spot too many warnings, which I haven't found a way to disable. Modifying theMakefile
doesn't seem like a valid option, as it's ~2k lines long.If someone knows, how to disable those, I'd really love to know that too. But for now I'm gonna try to stick with the google toolchain for the older kernels.
GLHF, lol.