gpt4 book ai didi

Android内核编译报错gcc6 linaro 6

转载 作者:行者123 更新时间:2023-11-29 01:13:16 25 4
gpt4 key购买 nike

我正在尝试使用 Linaro 6 进行编译,但我收到了这个错误,我认为这与 GCC 6 有什么关系?我在编译内核或编码方面非常业余,但即使搜索类似的术语我也无法弄清楚:

  CC      drivers/iommu/msm_iommu-v1.o
In file included from include/linux/io.h:22:0,
from drivers/iommu/msm_iommu-v1.c:20:
drivers/iommu/msm_iommu-v1.c: In function '__program_context':
drivers/iommu/msm_iommu_hw-v1.h:78:31: warning: result of '16777215 << 14' requires 39 bits to represent, but 'int' only has 32 bits [-Wshift-overflow=]
error, forbidden warning: msm_iommu_hw-v1.h:78
scripts/Makefile.build:308: recipe for target 'drivers/iommu/msm_iommu-v1.o' failed

这是我的 GitHUB:

https://github.com/mykesorrel/surnia_kernel

最佳答案

看起来像是那个 iommu 驱动程序的错误。它试图将位移位转换为 int 而不是 long,int 没有足够的位来完成操作。我猜未使用 -Wno-error,因此所有警告都被视为错误。

这个问题对你有帮助:How to compile without warnings being treated as errors?

我个人所做的是更新我的 .bashrc 中的 CFLAGS(假设您使用的是 Linux)。这是我使用的:

# Ensure C builds don't fail on warnings
export CFLAGS="-Wno-error"
export CXXFLAGS="-Wno-error"

关于Android内核编译报错gcc6 linaro 6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41525496/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com