2017-01-07 78 views
2

我試圖編譯使用Linaro 6,我收到這個錯誤,我相信有一些與GCC 6做?我很業餘與編譯內核或編碼對於這個問題,但我不知道這一點甚至搜索類似的術語:Android內核編譯錯誤gcc6 linaro 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

回答

1

看起來像該iommu驅動程序的錯誤。它試圖對int進行位移,而不是long,int沒有足夠的位來完成操作。我猜測-Wno-error沒有被使用,所以所有的警告被視爲錯誤。

這個問題將有助於你: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" 
+0

謝謝我用-w去,而不是似乎工作得更好,不知道爲什麼其他不工作。 – Mike