与 distcc 交叉编译时出错

与 distcc 交叉编译时出错

我目前正在尝试使用交叉编译器(针对 Raspberry Pi 2 的 ARM 处理器)和 distcc 构建 Raspbian 内核,基于发布在树莓派网站。我有两台电脑,我的笔记本电脑和一台旧的游戏设备,我已将其用作编译节点。两者都运行Ubuntu Linux 15.04 x86-64,独立运行时可以完成Raspberry Pi的Linux内核编译。当然,这没有什么乐趣,所以我正在开发一个项目,通过 distcc 同时使用两台计算机。我已经成功编写了一个简单的“Hello, world!”两个节点之间的程序。然而,进入内核代码后,我开始遇到重大错误。命令(以及随后的错误)如下:

user@user-ThinkPad-T420:~/linux$ make clean
  CLEAN   .tmp_versions
user@user-ThinkPad-T420:~/linux$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/bin2c
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
user@user-ThinkPad-T420:~/linux$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- CC=distcc -j12 zImage modules dtbs
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/pnmtologo
  HOSTCC  scripts/conmakehash
  HOSTCC  scripts/recordmcount
  HOSTCC  scripts/genksyms/genksyms.o
  CC      scripts/mod/empty.o
cc: error: unrecognized argument in option ‘-mabi=aapcs-linux’
cc: note: valid arguments to ‘-mabi=’ are: ms sysv
cc: error: unrecognized command line option ‘-mlittle-endian’
cc: error: unrecognized command line option ‘-mapcs’
cc: error: unrecognized command line option ‘-mno-sched-prolog’
cc: error: unrecognized command line option ‘-mno-thumb-interwork’
cc: error: unrecognized command line option ‘-mfpu=vfp’
distcc[27109] ERROR: compile scripts/mod/empty.c on compiler failed
distcc[27109] (dcc_build_somewhere) Warning: remote compilation of 'scripts/mod/empty.c' failed, retrying locally
distcc[27109] Warning: failed to distribute scripts/mod/empty.c to compiler, running locally instead
  HOSTCC  scripts/dtc/flattree.o
cc: error: unrecognized argument in option ‘-mabi=aapcs-linux’
cc: note: valid arguments to ‘-mabi=’ are: ms sysv
cc: error: unrecognized command line option ‘-mlittle-endian’
cc: error: unrecognized command line option ‘-mapcs’
cc: error: unrecognized command line option ‘-mno-sched-prolog’
cc: error: unrecognized command line option ‘-mno-thumb-interwork’
cc: error: unrecognized command line option ‘-mfpu=vfp’
distcc[27109] ERROR: compile scripts/mod/empty.c on localhost failed
scripts/Makefile.build:258: recipe for target 'scripts/mod/empty.o' failed
make[2]: *** [scripts/mod/empty.o] Error 1
scripts/Makefile.build:403: recipe for target 'scripts/mod' failed
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
  HOSTCC  scripts/dtc/fstree.o
  HOSTCC  scripts/genksyms/parse.tab.o
  HOSTCC  scripts/dtc/data.o
  HOSTCC  scripts/genksyms/lex.lex.o
  HOSTCC  scripts/dtc/livetree.o
  HOSTLD  scripts/genksyms/genksyms
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/util.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTLD  scripts/dtc/dtc
make[1]: 'include/generated/mach-types.h' is up to date.
  CC      kernel/bounds.s
distcc[27382] (dcc_build_somewhere) Warning: failed to distribute, running locally instead
cc: error: unrecognized argument in option ‘-mabi=aapcs-linux’
cc: note: valid arguments to ‘-mabi=’ are: ms sysv
cc: error: unrecognized command line option ‘-mlittle-endian’
cc: error: unrecognized command line option ‘-mapcs’
cc: error: unrecognized command line option ‘-mno-sched-prolog’
cc: error: unrecognized command line option ‘-mno-thumb-interwork’
cc: error: unrecognized command line option ‘-mfpu=vfp’
distcc[27382] ERROR: compile kernel/bounds.c on localhost failed
Kbuild:43: recipe for target 'kernel/bounds.s' failed
make[1]: *** [kernel/bounds.s] Error 1
Makefile:990: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
make: *** Waiting for unfinished jobs....
Makefile:555: recipe for target 'scripts' failed
make: *** [scripts] Error 2

使用 distcc,我似乎遇到了很多与无法识别的命令选项相关的错误。鉴于我的主要make命令:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- CC=distcc -j12 zImage modules dtbs

是否有什么事情立即被认为是错误的?我对交叉编译的理解是否超出了我的能力同时分布式编译?

相关内容