解决编译linux kernel 时 出现的 error, forbidden warning

现象:

编译kernel时,出现error, forbidden warning, 导致编译中断。

 

解决办法:

scripts/gcc-wrapper.py中注释掉interpret_warning(line)即可。

 

def run_gcc():
    args = sys.argv[1:]
    # Look for -o
    try:
        i = args.index('-o')
        global ofile
        ofile = args[i+1]
    except (ValueError, IndexError):
        pass

    compiler = sys.argv[0]

    try:
        proc = subprocess.Popen(args, stderr=subprocess.PIPE)
        for line in proc.stderr:
            print line,
#            interpret_warning(line)

        result = proc.wait()
    except OSError as e:
        result = e.errno
        if result == errno.ENOENT:
            print args[0] + ':',e.strerror
            print 'Is your PATH set correctly?'
        else:
            print ' '.join(args), str(e)

    return result

你可能感兴趣的:(linux系统)