summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMun Gwan-gyeong <elongbug@gmail.com>2014-08-15 09:17:25 -0400
committerChris Michael <cp.michael@samsung.com>2014-08-15 09:24:20 -0400
commitac4074c4fa951240d4bfd1ee8f5ccbce913e6203 (patch)
tree6f03786187b0cbaaa3e361b5e16bb3e1ec36cd8a
parente2b543e0ab19d7abba57411ca5c75d4e53a5c3ff (diff)
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
-rw-r--r--m4/evas_check_engine.m41
-rw-r--r--src/Makefile_Evas.am14
-rw-r--r--src/modules/evas/engines/wayland_egl/evas_engine.c3
3 files changed, 7 insertions, 11 deletions
diff --git a/m4/evas_check_engine.m4 b/m4/evas_check_engine.m4
index dd7030e5cf..6c8ed81d8c 100644
--- a/m4/evas_check_engine.m4
+++ b/m4/evas_check_engine.m4
@@ -575,6 +575,7 @@ if test "x${have_dep}" = "xyes" ; then
575 PKG_CHECK_MODULES([WAYLAND_EGL], [${requirement}]) 575 PKG_CHECK_MODULES([WAYLAND_EGL], [${requirement}])
576 evas_engine_[]$1[]_cflags="${WAYLAND_EGL_CFLAGS}" 576 evas_engine_[]$1[]_cflags="${WAYLAND_EGL_CFLAGS}"
577 evas_engine_[]$1[]_libs="${WAYLAND_EGL_LIBS}" 577 evas_engine_[]$1[]_libs="${WAYLAND_EGL_LIBS}"
578 evas_engine_gl_common_libs="$evas_engine_[]$1[]_libdirs -lGLESv2 -lm -lEGL"
578 fi 579 fi
579fi 580fi
580 581
diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index 78d9be722d..ceb5f6c9d2 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -883,6 +883,9 @@ modules_evas_engines_gl_generic_module_la_LIBTOOLFLAGS = --tag=disable-static
883if BUILD_ENGINE_GL_X11 883if BUILD_ENGINE_GL_X11
884modules_evas_engines_gl_common_libevas_engine_gl_common_la_CPPFLAGS += @evas_engine_gl_xlib_cflags@ @evas_engine_gl_xcb_cflags@ 884modules_evas_engines_gl_common_libevas_engine_gl_common_la_CPPFLAGS += @evas_engine_gl_xlib_cflags@ @evas_engine_gl_xcb_cflags@
885endif 885endif
886if BUILD_ENGINE_WAYLAND_EGL
887modules_evas_engines_gl_common_libevas_engine_gl_common_la_CPPFLAGS += @evas_engine_wayland_egl_cflags@
888endif
886modules_evas_engines_gl_common_libevas_engine_gl_common_la_LIBADD = @USE_EVAS_LIBS@ 889modules_evas_engines_gl_common_libevas_engine_gl_common_la_LIBADD = @USE_EVAS_LIBS@
887modules_evas_engines_gl_common_libevas_engine_gl_common_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@ 890modules_evas_engines_gl_common_libevas_engine_gl_common_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
888modules_evas_engines_gl_common_libevas_engine_gl_common_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@ 891modules_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 \
1149modules/evas/engines/wayland_egl/evas_engine.h 1152modules/evas/engines/wayland_egl/evas_engine.h
1150if EVAS_STATIC_BUILD_WAYLAND_EGL 1153if EVAS_STATIC_BUILD_WAYLAND_EGL
1151lib_evas_libevas_la_SOURCES += $(WAYLAND_EGL_SOURCES) 1154lib_evas_libevas_la_SOURCES += $(WAYLAND_EGL_SOURCES)
1152lib_evas_libevas_la_CPPFLAGS += \ 1155lib_evas_libevas_la_CPPFLAGS += @evas_engine_wayland_egl_cflags@
1153-I$(top_srcdir)/src/modules/evas/engines/gl_common \
1154@evas_engine_wayland_egl_cflags@
1155lib_evas_libevas_la_LIBADD += @evas_engine_wayland_egl_libs@ 1156lib_evas_libevas_la_LIBADD += @evas_engine_wayland_egl_libs@
1156else 1157else
1157enginewaylandeglpkgdir = $(libdir)/evas/modules/engines/wayland_egl/$(MODULE_ARCH) 1158enginewaylandeglpkgdir = $(libdir)/evas/modules/engines/wayland_egl/$(MODULE_ARCH)
@@ -1160,16 +1161,13 @@ modules_evas_engines_wayland_egl_module_la_SOURCES = $(WAYLAND_EGL_SOURCES)
1160modules_evas_engines_wayland_egl_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \ 1161modules_evas_engines_wayland_egl_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
1161-I$(top_srcdir)/src/lib/evas/include \ 1162-I$(top_srcdir)/src/lib/evas/include \
1162-I$(top_srcdir)/src/lib/evas/cserve2 \ 1163-I$(top_srcdir)/src/lib/evas/cserve2 \
1163-I$(top_srcdir)/src/modules/evas/engines/gl_common \ 1164-I$(top_srcdir)/src/modules/evas/engines/wayland_egl \
1164@EVAS_CFLAGS@ \ 1165@EVAS_CFLAGS@ \
1165@evas_engine_wayland_egl_cflags@ 1166@evas_engine_wayland_egl_cflags@
1166modules_evas_engines_wayland_egl_module_la_LIBADD = \ 1167modules_evas_engines_wayland_egl_module_la_LIBADD = \
1167@USE_EVAS_LIBS@ \ 1168@USE_EVAS_LIBS@ \
1168modules/evas/engines/gl_common/libevas_engine_gl_common.la \
1169@evas_engine_wayland_egl_libs@ 1169@evas_engine_wayland_egl_libs@
1170modules_evas_engines_wayland_egl_module_la_DEPENDENCIES = \ 1170modules_evas_engines_wayland_egl_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
1171@USE_EVAS_INTERNAL_LIBS@ \
1172modules/evas/engines/gl_common/libevas_engine_gl_common.la
1173modules_evas_engines_wayland_egl_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@ 1171modules_evas_engines_wayland_egl_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
1174modules_evas_engines_wayland_egl_module_la_LIBTOOLFLAGS = --tag=disable-static 1172modules_evas_engines_wayland_egl_module_la_LIBTOOLFLAGS = --tag=disable-static
1175endif 1173endif
diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c b/src/modules/evas/engines/wayland_egl/evas_engine.c
index 0a133ba19f..bd5b72e50e 100644
--- a/src/modules/evas/engines/wayland_egl/evas_engine.c
+++ b/src/modules/evas/engines/wayland_egl/evas_engine.c
@@ -1043,9 +1043,6 @@ module_open(Evas_Module *em)
1043 /* check for valid module */ 1043 /* check for valid module */
1044 if (!em) return 0; 1044 if (!em) return 0;
1045 1045
1046 /* try to init evas_gl_common */
1047 if (!evas_gl_common_module_open()) return 0;
1048
1049 /* get whatever engine module we inherit from */ 1046 /* get whatever engine module we inherit from */
1050 if (!_evas_module_engine_inherit(&pfunc, "gl_generic")) return 0; 1047 if (!_evas_module_engine_inherit(&pfunc, "gl_generic")) return 0;
1051 1048