如何在三星源编译期间处理make错误

时间:2014-10-22 08:41:49

标签: android makefile

当我尝试为Samsung Source发布make时出现以下错误:

@ubuntu:~/androidkernel$ sudo make
CHK     include/linux/version.h
CHK     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CC      kernel/bounds.s
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 ‘-mno-thumb-interwork’
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2

我做了一些在线搜索,发现这可能是由于gcc工具链和其他文件之间存在差异。我不确定我是否走在正确的道路上。我需要帮助来弄清楚如何解决上述错误。

2 个答案:

答案 0 :(得分:1)

如果您已下载源,请执行以下操作

make ARCH=arm TOOLCHAIN=/pathtosource/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin

答案 1 :(得分:0)

http://forum.xda-developers.com/showthread.php?t=1516051

它是问题/解决方案的完整描述。你的问题特别出现在“工具链”部分:

5) Download Arm Toolchain 

This toolchain will allow you to cross compile for your phone. There are several versions to choose. I currently use the 2010q1 version here: https://sourcery.mentor.com/sgpp/lit...ux-gnu.tar.bz2

Or choose another version if you like (version 2009q3 seems to be popular): https://sourcery.mentor.com/sgpp/lit...bscription3053

工具链的另一个来源是Android NDK(搜索arm eabi目录):

https://developer.android.com/tools/sdk/ndk/index.html

(它必须编译C,因此应包括所有gcc交叉工具链以生成ARM二进制文件)。

如果你想要介绍,也许试试这个:

https://www.youtube.com/watch?v=9PoENQiuYE4