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

时间:2013-09-09 21:29:40

标签: compilation cross-compiling waf

我在${ARMHOST}中有一个交叉编译的rootfs,我以前通过buildroot创建了一个armv5te / ARM9ARM926t核心,也称为{{ 1}})target尝试使用CodeLite工具链

ARM926ej-s

导致

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

wscript在每个阶段使用'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) 来加载功能。


更新#1 - 如果我将context.load('compiler_c gnu_dirs glib2')替换为compiler_c,那么我最终会: CC =“$ {ARMHOST} / opt / ext-toolchain / arm-none-linux-gneabi / bin / gcc”AR =“$ {ARMHOST} / opt / ext-toolchain / arm-none-linux-gnueabi / bin / ar“./waf configure 将顶部设置为:〜/ myapp 设置为:〜/ myapp / build 检查程序gcc,cc:$ {ARMHOST} / opt / ext-toolchain / arm-none-linux-gnueabi / bin / gcc 无法确定编译器类型


那么我怎么能告诉waf这个编译器是基于gcc的呢? (code sourcery lite 2013 toolchain)

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

1 个答案:

答案 0 :(得分:1)

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