OSDN Git Service

gallium/dri: Add shared glapi to LIBADD on Android
authorTomasz Figa <tfiga@chromium.org>
Wed, 13 Jul 2016 03:29:45 +0000 (11:29 +0800)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 21 Jul 2016 13:01:15 +0000 (14:01 +0100)
commitabaf0e98177354164364b43eb775f879ab21a9eb
tree6e171b0db61274228f2166a5339c330fcfd5f42d
parent485c6d231e0af4e90804ac5e0da40b7bd97ac78e
gallium/dri: Add shared glapi to LIBADD on Android

An earlier patch fixed the problem for classic drivers, however Gallium
was still left broken. This patch applies the same workaround to
Gallium, when compiled for Android. Following is a quote from the
original patch:

0cbc90c57cfc 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.

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit 70a28afb296de3e89248ad2a2bc0611e7afb762b)
src/gallium/targets/dri/Makefile.am