默认情况下使用g++而不是arm编译器进行构建

Build is happening by default with g++ instead of arm compiler?

本文关键字:编译器 arm 构建 情况下 g++ 默认      更新时间:2023-10-16

我遇到了一个非常奇怪的问题。我正在用ARM编译器构建我的ARM源代码。我修改了makefile中的CXX字段,使用arm-linux-gnueabihf-g++而不是g++来构建,但在构建时仍然使用g++。有人能帮我一下吗?我的makefile有以下条目

CXX         = g++ 

我将其修改如下

CXX         = arm-linux-gnueabihf-g++ 

不应该使用arm-linux-gnueabihf-g++而不是g++来构建吗?

如果没有构建系统的其余部分,你就不可能知道为什么你看到了你所看到的,但这里有一些一般性的建议:

不要编辑makefile;在命令行上传递所需的值:

make CXX=arm-linux-gnueabihf-g++ <whatever your normal args are>

命令行值覆盖那些在文件中设置的,并且通常被传递到嵌套的makefiles,并覆盖所有其他可能使这复杂化的令人困惑的东西。

如果这不起作用,检查是否有configure脚本,或者其他你应该使用的东西。