https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79823
Bug ID: 79823 Summary: Address Sanitize compile,got undefined reference to '__asan' errors Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: zhoujun48 at huawei dot com Target Milestone: --- Address Sanitize,Complie C++ code,GCC 4.9.0(gcc\linux-x86\aarch64\aarch64-linux-android-4.9-kasan), CFLAGS= -lasan -fsanitize=address, but get this error: system/sepolicy/tools/fc_sort/fc_sort.c:49: error: undefined reference to '__asan_report_load8' system/sepolicy/tools/fc_sort/fc_sort.c:50: error: undefined reference to '__asan_report_load8' system/sepolicy/tools/fc_sort/fc_sort.c:51: error: undefined reference to '__asan_report_load8' system/sepolicy/tools/fc_sort/fc_sort.c:91: error: undefined reference to '__asan_report_load1' I have already used -lasan, how to judge to asan lib exist in this gcc tool chain? who can help me solve this problem thank u