_FORTIFY_SOURCE redefined Error

개발노트/Android 2012. 3. 7. 11:49 Posted by B Style
Ubuntu 11.10 amd64
ICS

 <command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
<built-in>:0:0: note: this is the location of the previous definition
host C: mkyaffs2image <= external/yaffs2/yaffs2/yaffs_tagsvalidity.c
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
<built-in>:0:0: note: this is the location of the previous definition
In file included from external/yaffs2/yaffs2/yaffs_tagsvalidity.c:17:0:
external/yaffs2/yaffs2/yaffs_tagsvalidity.h:23:6: warning: redundant redeclaration of ‘yaffs_InitialiseTags’ [-Wredundant-decls]
external/yaffs2/yaffs2/yaffs_guts.h:888:6: note: previous declaration of ‘yaffs_InitialiseTags’ was here
host C++: obbtool <= frameworks/base/tools/obbtool/Main.cpp
<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 errors


make: *** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o] 오류 1
make: *** 끝나지 않은 작업을 기다리고 있습니다....


/build/core/combo/HOST_linux-x86.mk 파일을 수정해주면 해결된다.
==================================================================================================
-         HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
+         HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
==================================================================================================
위와 같이 수정