编译4412突然出现报错:
CC drivers/media/video/samsung/mali_ics/common/mali_kernel_core.o
arm-none-linux-gnueabi-gcc: directory: No such file or directory
arm-none-linux-gnueabi-gcc: directory": No such file or directory
<command-line>:0: warning: missing terminating " character
drivers/media/video/samsung/mali_ics/common/mali_kernel_core.c: In function 'mali_kernel_constructor':
drivers/media/video/samsung/mali_ics/common/mali_kernel_core.c:172: error: missing terminating " character
drivers/media/video/samsung/mali_ics/common/mali_kernel_core.c:172: error: expected expression before ')' token
新解压的代码,看mali_kernel_core.c:172行也没有错误,找了半天才发现问题出在makefile
在Makefile里自动生成了SVN版本:
SVN_REV:=$(shell ((svnversion | grep -qv exported && echo -n 'Revision: ' && svnversion) || git svn info | sed -e 's/$$$$/M/' | grep '^Revision: ' || echo ${MALI_RELEASE_NAME}) 2>/dev/null | sed -e 's/^Revision: //')
由于我解压的代码不在SVN控制下,这里的SVN_REV取值为“SVN_REV="Unversioned directory"”,含有的空格导致编译解析出错,解决办法:
将转义出现的空格
SVN_REV:=$(shell ((svnversion | grep -qv exported && echo -n 'Revision: ' && svnversion) || git svn info | sed -e 's/$$$$/M/' | grep '^Revision: ' || echo ${MALI_RELEASE_NAME}) 2>/dev/null | sed -e 's/^Revision: //')
或者不使用SVN版本号,将SVN_REV定义为空也行