简体   繁体   English

构建Linux内核时,gcc-7无法与交叉编译一起使用

[英]gcc-7 will not work with cross compiling when building linux kernel

gcc-7 isn't working when I am trying to build a linux kernel. 当我尝试构建Linux内核时,gcc-7无法正常工作。

The command which I am using: 我正在使用的命令:

make export CROSS_COMPILE=/usr/bin/arm-linux-gnueabi-gcc-7

Output: 输出:

make: /usr/bin/arm-linux-gnueabi-gcc-7gcc: Command not found make:/ usr / bin / arm-linux-gnueabi-gcc-7gcc:找不到命令

It has added gcc automatically after gnueabi- but not gcc-7 how do I stop it adding gcc automatically? 它已经在gnueabi-之后自动添加了gcc,但是没有gcc-7如何停止自动添加gcc?

The CROSS_COMPILE variable contains only the prefix needed for cross-compilation, apparently. 显然, CROSS_COMPILE变量仅包含交叉编译所需的前缀。

Most likely you can reset the CC variable to choose a different named compiler. 您很可能可以重置CC变量以选择其他命名的编译器。 It's been a very long time since I tried to build the Linux kernel so I'm not sure, but something like this may work: 自从我尝试构建Linux内核以来已经很长时间了,所以我不确定,但是类似的事情可能会起作用:

make export CROSS_COMPILE=arm-linux-gnueabi- CC=gcc-7

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM