From 218381d92755fa080bbb5635c0c4ed6d5296b79c Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Sun, 30 Jan 2011 05:09:06 +0800 Subject: egl_dri2: Export glapi symbols for DRI drivers. When an app loads libEGL.so dynamically with RTLD_LOCAL, loading DRI drivers would fail because of missing glapi symbols. This commit makes egl_dri2 load libglapi.so with RTLD_GLOBAL to export glapi symbols for future symbol resolutions. The same trick can be found in GLX. However, egl_dri2 can only do so when --enable-shared-glapi is given. Because, otherwise, both libGL.so and libglapi.so define glapi symbols and egl_dri2 cannot tell which library to load. --- src/egl/drivers/dri2/Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/egl/drivers/dri2/Makefile') diff --git a/src/egl/drivers/dri2/Makefile b/src/egl/drivers/dri2/Makefile index 553ee8771f8..bd3d7029337 100644 --- a/src/egl/drivers/dri2/Makefile +++ b/src/egl/drivers/dri2/Makefile @@ -20,4 +20,8 @@ EGL_LIBS = $(XCB_DRI2_LIBS) $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIB) EGL_CFLAGS = -D_EGL_MAIN=_eglBuiltInDriverDRI2 EGL_BUILTIN = true +ifeq ($(SHARED_GLAPI),1) +EGL_CFLAGS += -DHAVE_SHARED_GLAPI +endif + include ../Makefile.template -- cgit v1.2.3