Я хочу кросс-компилировать ядро для powerpc.Я попытался сделать это на x86_64 Ubuntu 10.04 и i386 Debian Lenny, и у меня точно такая же проблема.Я следую инструкциям на http://wiki.debian.org/BuildingCrossCompilers,, и когда я пытаюсь собрать binutils, давая следующую команду:
fakeroot debian/rules binary-cross
, я получаю такой результат:
[snip]
make[3]: Entering directory `/home/anthony/cross-toolchain/binutils-2.20.1/builddir-powerpc-linux-gnu/libiberty'
if [ x"-fpic" != x ]; then \
gcc -c -DHAVE_CONFIG_H -g -O2 -Wno-format-security -I. -I../../libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic -fpic ../../libiberty/regex.c -o pic/regex.o; \
else true; fi
In file included from /usr/include/stdlib.h:320,
from ../../libiberty/regex.c:128:
/usr/include/sys/types.h:100: error: two or more data types in declaration specifiers
make[3]: *** [regex.o] Error 1
[snip]
(Этоэто потому, что types.h пытается typedef pid_t, который, однако, был #defined для int. Если я разобью эту проблему с помощью #undef pid_t внутри types.h, я получу похожую проблему в другом месте с intptr_t, и так далеена.)