[Mesa-dev] [PATCH] intel: common: Fix link failure with standalone Android build

Tomasz Figa tfiga at chromium.org
Wed Jul 5 14:54:18 UTC 2017


Some reshuffle in the Makefiles under src/intel resulted in Android
libraries being no longer linked with code using
src/intel/common/gen_debug.h that contains references to functions
exported by those libraries (namely ALOGW macro, which is currently
resolved into a call to __android_log_print() from cutils).

Fix the build by taking into account ANDROID_CFLAGS and ANDROID_LIBS for
affected module on Android NDK builds.

Signed-off-by: Tomasz Figa <tfiga at chromium.org>
---
 src/intel/Makefile.common.am | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/intel/Makefile.common.am b/src/intel/Makefile.common.am
index a772b5fcd1..1c1c2eed30 100644
--- a/src/intel/Makefile.common.am
+++ b/src/intel/Makefile.common.am
@@ -23,3 +23,8 @@ noinst_LTLIBRARIES += common/libintel_common.la
 
 common_libintel_common_la_CFLAGS = $(AM_CFLAGS) $(LIBDRM_CFLAGS)
 common_libintel_common_la_SOURCES = $(COMMON_FILES) $(DECODER_FILES)
+
+if HAVE_PLATFORM_ANDROID
+common_libintel_common_la_CFLAGS += $(ANDROID_CFLAGS)
+common_libintel_common_la_LIBADD = $(ANDROID_LIBS)
+endif
-- 
2.13.2.725.g09c95d1e9-goog



More information about the mesa-dev mailing list