0
我为avr使用了编译源代码gcc。我的GCC配置选项有:我如何知道我在编译mac?
${PWD}/../gcc/configure --prefix="${PWD}/../build/" --exec-prefix="${PWD}/../build/" --datadir="${PWD}/../build/" --target=avr --enable-languages=c --disable-libssp --disable-lto --disable-nls --disable-libgomp --disable-gdbtk --disable-threads --enable-poison-system-directories
当我使用预处理的下面的代码片段魔术
#if defined __APPLE__
#error "Apple"
#else
#error "Ahh"
#endif
它输出
error: #error "Ahh"
如果我跑avr-cpp -dM version.h
我看是没有定义__APPLE__
。如果我运行cpp -dM version.h
我看到__APPLE__
被定义。我需要在配置行(或其他地方)更改以使我的编译源代码gcc具有正确定义的__APPLE__
?
我正在编译avr的mac,因为正在为avr编译windows。
我检查'__APPLE__'它没有定义,'AVR-CPP -dM version.h'没有列出它可以是'cpp -dM version.h'。所以,在我的gcc版本中,有些东西没有被定义。 – Justin808 2012-03-03 00:35:30