본문 바로가기

C++/Android

[android_error] <command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]

반응형

<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: *** 끝나지 않은 작업을 기다리고 있습니다....

 


---
수정 ---------

EDIT build/core/combo/HOST_linux-x86.mk:   

-HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0   

+HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0

이렇게 편집 해주시면 해결되네요.

반응형