mesa: dri: Add shared glapi to LIBADD on Android
authorNicolas Boichat <drinkcat@chromium.org>
Thu, 28 Apr 2016 10:41:39 +0000 (18:41 +0800)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 23 May 2016 12:25:51 +0000 (13:25 +0100)
commit0cbc90c57cfc6099b529c5caeb58f385735ba75f
tree5aab2b7690b0af4e555be4c938c3ee004484b2bc
parent27d713a004da1918d1c5699b077734eceb0ebd75
mesa: dri: Add shared glapi to LIBADD on Android

/system/vendor/lib/dri/*_dri.so actually depend on libglapi: without
this, loading the so file fails with:
cannot locate symbol "__emutls_v._glapi_tls_Context"

On non-Android (non-bionic) platform, EGL uses the following
workflow, which works fine:
  dlopen("libglapi.so", RTLD_LAZY | RTLD_GLOBAL);
  dlopen("dri/<driver>_dri.so", RTLD_NOW | RTLD_GLOBAL);

However, bionic does not respect the RTLD_GLOBAL flag, and the dri
library cannot find symbols in libglapi.so, so we need to link
to libglapi.so explicitly. Android.mk already does this.

Signed-off-by: Nicolas Boichat <drinkcat@google.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
[Emil Velikov: s/explicitely/explicitly/]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
src/mesa/drivers/dri/Makefile.am