Ubuntu 12.04 error: "_FORTIFY_SOURCE" redefined [-Werror]

来源:互联网 发布:淘宝指数在哪里 编辑:程序博客网 时间:2024/05/20 11:27
http://blog.sina.com.cn/s/blog_643e838601015ngx.htmlfrom external/mesa3d/src/glsl/loop_analysis.h:29,<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror] <built-in>:0:0: note: this is the location of the previous definition cc1plus: all warnings being treated as errorsmake: *** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o] Error 1

解决方法:

修改源码目录下/build/core/combo/HOST_linux-x86.mk文件:

将以下语句

HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0

修改为

HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0


ATTENTION:
There is a SPACE between the -U_FORTIFY_SOURCE and -D_FORTIFY_SOURCE
0 0
原创粉丝点击