evas-wayland-egl: Fix segmentation fault on dynamic loaded gl related functions.

Summary:
@fix
Segfault in wayland_egl engine is casused by illegal library linking.
Fix this by linking to GLESv2 and EGL libraries.

Test Plan: N/A

Reviewers: devilhorns, raster, cedric, Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1332
This commit is contained in:
Mun Gwan-gyeong 2014-08-15 09:17:25 -04:00 committed by Chris Michael
parent e2b543e0ab
commit ac4074c4fa
3 changed files with 7 additions and 11 deletions

View File

@ -575,6 +575,7 @@ if test "x${have_dep}" = "xyes" ; then
PKG_CHECK_MODULES([WAYLAND_EGL], [${requirement}])
evas_engine_[]$1[]_cflags="${WAYLAND_EGL_CFLAGS}"
evas_engine_[]$1[]_libs="${WAYLAND_EGL_LIBS}"
evas_engine_gl_common_libs="$evas_engine_[]$1[]_libdirs -lGLESv2 -lm -lEGL"
fi
fi

View File

@ -883,6 +883,9 @@ modules_evas_engines_gl_generic_module_la_LIBTOOLFLAGS = --tag=disable-static
if BUILD_ENGINE_GL_X11
modules_evas_engines_gl_common_libevas_engine_gl_common_la_CPPFLAGS += @evas_engine_gl_xlib_cflags@ @evas_engine_gl_xcb_cflags@
endif
if BUILD_ENGINE_WAYLAND_EGL
modules_evas_engines_gl_common_libevas_engine_gl_common_la_CPPFLAGS += @evas_engine_wayland_egl_cflags@
endif
modules_evas_engines_gl_common_libevas_engine_gl_common_la_LIBADD = @USE_EVAS_LIBS@
modules_evas_engines_gl_common_libevas_engine_gl_common_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_engines_gl_common_libevas_engine_gl_common_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
@ -1149,9 +1152,7 @@ modules/evas/engines/wayland_egl/evas_wl_main.c \
modules/evas/engines/wayland_egl/evas_engine.h
if EVAS_STATIC_BUILD_WAYLAND_EGL
lib_evas_libevas_la_SOURCES += $(WAYLAND_EGL_SOURCES)
lib_evas_libevas_la_CPPFLAGS += \
-I$(top_srcdir)/src/modules/evas/engines/gl_common \
@evas_engine_wayland_egl_cflags@
lib_evas_libevas_la_CPPFLAGS += @evas_engine_wayland_egl_cflags@
lib_evas_libevas_la_LIBADD += @evas_engine_wayland_egl_libs@
else
enginewaylandeglpkgdir = $(libdir)/evas/modules/engines/wayland_egl/$(MODULE_ARCH)
@ -1160,16 +1161,13 @@ modules_evas_engines_wayland_egl_module_la_SOURCES = $(WAYLAND_EGL_SOURCES)
modules_evas_engines_wayland_egl_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/lib/evas/include \
-I$(top_srcdir)/src/lib/evas/cserve2 \
-I$(top_srcdir)/src/modules/evas/engines/gl_common \
-I$(top_srcdir)/src/modules/evas/engines/wayland_egl \
@EVAS_CFLAGS@ \
@evas_engine_wayland_egl_cflags@
modules_evas_engines_wayland_egl_module_la_LIBADD = \
@USE_EVAS_LIBS@ \
modules/evas/engines/gl_common/libevas_engine_gl_common.la \
@evas_engine_wayland_egl_libs@
modules_evas_engines_wayland_egl_module_la_DEPENDENCIES = \
@USE_EVAS_INTERNAL_LIBS@ \
modules/evas/engines/gl_common/libevas_engine_gl_common.la
modules_evas_engines_wayland_egl_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_engines_wayland_egl_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_engines_wayland_egl_module_la_LIBTOOLFLAGS = --tag=disable-static
endif

View File

@ -1043,9 +1043,6 @@ module_open(Evas_Module *em)
/* check for valid module */
if (!em) return 0;
/* try to init evas_gl_common */
if (!evas_gl_common_module_open()) return 0;
/* get whatever engine module we inherit from */
if (!_evas_module_engine_inherit(&pfunc, "gl_generic")) return 0;