From ad3e7e97780c406fca5afa56239b2a6b71cf6277 Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Sun, 20 Oct 2019 18:43:08 -0700 Subject: [PATCH] Makefile: Link to the system logging library on Android Android replaces syslog calls with calls to the Android system logging library, liblog. Link to liblog when compiling for Android to fix the following undefined reference errors: aarch64-linux-android-ld: log.o: in function `android_polyfill_vsyslog': /usr/include/syslog.h:185: undefined reference to `__android_log_print' aarch64-linux-android-ld: /usr/include/syslog.h:182: undefined reference to `__android_log_vprint' Signed-off-by: Danny Lin --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7c21ef83..7aab6abd 100644 --- a/Makefile +++ b/Makefile @@ -170,7 +170,7 @@ endif ifeq ($(CONFIG_TARGET_OS), Android) SOURCE += diskutil.c fifo.c blktrace.c cgroup.c trim.c profiles/tiobench.c \ oslib/linux-dev-lookup.c - LIBS += -ldl + LIBS += -ldl -llog LDFLAGS += -rdynamic endif ifeq ($(CONFIG_TARGET_OS), SunOS) -- 2.25.1