我正在尝试使用 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 https://github.com/mykesorrel/surnia_kernel
看起来像是 iommu 驱动程序的错误。它试图将位转换为int
代替long
, int 没有足够的位来完成操作。我猜-Wno-error
未使用,因此所有警告都被视为错误。
这个问题将帮助你:如何编译而不将警告视为错误? https://stackoverflow.com/questions/11561261/how-to-compile-without-warnings-being-treated-as-errors
我个人做的是更新CFLAGS
在我的 .bashrc 中(假设您使用的是 Linux)。这就是我使用的:
# Ensure C builds don't fail on warnings
export CFLAGS="-Wno-error"
export CXXFLAGS="-Wno-error"
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)