我试着用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:
发布于 2017-01-07 19:39:38
看上去像是那个iommu司机的窃听器。它试图将一个比特转换为一个int而不是一个long,一个int没有足够的位来完成这个操作。我猜-Wno-error没有被使用,所以所有的警告都被视为错误。
这个问题会帮助你:How to compile without warnings being treated as errors?
我个人所做的是在我的.bashrc中更新.bashrc(假设您使用的是Linux)。这就是我所用的:
# Ensure C builds don't fail on warnings
export CFLAGS="-Wno-error"
export CXXFLAGS="-Wno-error"https://stackoverflow.com/questions/41525496
复制相似问题