Android内核编译错误gcc6 linaro 6

Android内核编译错误gcc6 linaro 6,android,gcc,compiler-errors,kernel,linaro,Android,Gcc,Compiler Errors,Kernel,Linaro,我试图使用Linaro6进行编译,我收到了这个错误,我相信这与GCC6有关?我对编译内核或编写代码非常业余,但即使搜索类似的术语,我也无法理解这一点: 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

我试图使用Linaro6进行编译,我收到了这个错误,我相信这与GCC6有关?我对编译内核或编写代码非常业余,但即使搜索类似的术语,我也无法理解这一点:

  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
CC驱动程序/iommu/msm\u iommu-v1.o
在include/linux/io.h:22:0中包含的文件中,
来自drivers/iommu/msm_iommu-v1.c:20:
drivers/iommu/msm\u iommu-v1.c:在函数“\u程序\u上下文”中:

drivers/iommu/msm_iommu_hw-v1.h:78:31:警告:“16777215的结果看起来像是iommu驱动程序的错误。它试图将位移到
int
而不是
long
,int没有足够的位来完成操作。我猜没有使用
-Wno错误
,因此所有警告都被视为错误

这个问题将帮助您:

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

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

谢谢,我选择了-w,它似乎效果更好,我不知道为什么另一个不起作用。