首页 文章

waf - 交叉编译,编译器检测

提问于
浏览
0

我在 ${ARMHOST} 中得到了一个交叉编译的rootfs,我之前通过 buildroot 创建了一个 armv5te / ARM9ARM926t 核心也称为 ARM926ej-s )目标,试图使用CodeLite工具链

waf distclean
ARMHOST="${HOME}/buildroot-2013.08/output/host";
export PKG_CONFIG_PATH="${ARMHOST}/usr/lib/pkgconffg/";
export CC="${ARMHOST}/opt/ext-toolchain/arm-none-linux-gnueabi/bin/gcc";
export AR="${ARMHOST}/opt/ext-toolchain/arm-none-linux-gnueabi/bin/ar";
export CROSS_COMPILE="/usr/bin/arm-none-eabi-";
export CFLAGS="-march=armv5te -I${ARMHOST}/usr/include/ -I${ARMHOST}/opt/ext-toolchain/arm-none-linux-gnueabi/include/";
export LDFLAGS="-L${ARMHOST}/usr/lib/";
waf configure debug

导致

'distclean' finished successfully (0.000s)
Setting top to                           : ~/Desktop/myapp 
Setting out to                           : ~/Desktop/myapp/build 
Checking for 'gcc' (c compiler)          : not found 
Checking for 'icc' (c compiler)          : not found 
could not configure a c compiler!
(complete log in ~/Desktop/myapp/build/config.log)

wscript在每个阶段使用 context.load('compiler_c gnu_dirs glib2') 来加载功能 .


Update #1 - 如果我将 compiler_c 替换为 gcc ,那么我最终得到:CC = "$/opt/ext-toolchain/arm-none-linux-gneabi/bin/gcc" AR = "$/opt/ext-toolchain/arm-none-linux-gnueabi/bin/ar" ./waf configure设置top to:〜/ myapp设置为:〜/ myapp / build检查程序gcc,cc:$ / opt / ext-toolchain / arm-none-linux-gnueabi / bin / gcc无法确定编译器类型


So how can I tell waf that this compiler is gcc based? (code sourcery lite 2013 toolchain)

我是否必须创建新的编译器配置文件或是否有更简单的方法?

1 回答

  • 1

    不要使用... / host / opt / ext-toolchain / arm-none-linux-gnueabi / bin / gcc但 .../host/opt/ext-toolchain/bin/arm-none-linux-gnueabi-gcc - gcc检测显然是由一些巫毒教徒完成的

相关问题