Android内核编译错误gcc6 linaro 6 [英] Android kernel compile error gcc6 linaro 6

查看:305
本文介绍了Android内核编译错误gcc6 linaro 6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Linaro 6进行编译,而且我收到了这个错误,我认为这个错误与GCC 6有关?我非常擅长编译内核或编码,但我甚至都不知道如何搜索类似的术语:

I'm trying to compile using Linaro 6 and I'm receiving this error which I believe have something do do with GCC 6? I'm very amateur with compiling kernels or coding for that matter, but I couldn't figure this out even search similar terms:

  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:

this is my GitHUB:

https://github.com/mykesorrel/surnia_kernel

推荐答案

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

Looks like a bug with that iommu driver. It's trying to do a bit-shift into an int instead of a long, an int doesn't have enough bits to complete the operation. I'm guessing the -Wno-error isn't used, so all warnings are treated as errors.

这个问题会帮助你:

This question will help you: How to compile without warnings being treated as errors?

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

What I personally do is update CFLAGS in my .bashrc (Assuming you're using Linux). This is what I use:

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

这篇关于Android内核编译错误gcc6 linaro 6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆