From 8ce53b64dad3d74241c4780b208beeab34cee8d8 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Sun, 30 Dec 2012 13:30:13 +0000 Subject: [PATCH] efl: fix valgrind build. weird enough to build with memcheck.h you just need valgrind's CFLAGS, not its libraries as they are not supposed to be used like that, throwing many bgPlain_ errors (vgPlain_tl_pre_clo_init, vgPlain_free...) from libcoregrind-x86-linux.a SVN revision: 81901 --- configure.ac | 13 +++++-------- src/Makefile_Eina.am | 7 ++++--- src/Makefile_Evas.am | 1 + 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 06f52a7..aa8582d 100644 --- a/configure.ac +++ b/configure.ac @@ -849,7 +849,7 @@ case "${build_profile}" in dev) with_max_log_level="" have_stringshare_usage="no" - want_valgrind="no" # TODO: "yes" is not working: relocation R_X86_64_32S against `vgPlain_interim_stack' can not be used when making a shared object; recompile with -fPIC + want_valgrind="yes" want_debug_malloc="no" want_debug_threads="no" want_default_mempool="no" @@ -858,7 +858,7 @@ case "${build_profile}" in debug) with_max_log_level="" have_stringshare_usage="yes" - want_valgrind="no" # TODO: "yes" is not working: relocation R_X86_64_32S against `vgPlain_interim_stack' can not be used when making a shared object; recompile with -fPIC + want_valgrind="yes" want_debug_malloc="yes" want_debug_threads="yes" want_default_mempool="yes" @@ -899,11 +899,11 @@ requirements_pc_eina="${requirements_pc_eina} ${platform_pc}" ## Options # Valgrind - -EFL_OPTIONAL_DEPEND_PKG([eina], [${want_valgrind}], - [VALGRIND], [valgrind >= 2.4.0]) if test "x${have_valgrind}" = "xno"; then AC_DEFINE([NVALGRIND], [1], [Valgrind support disabled]) +else + PKG_CHECK_MODULES([VALGRIND], [valgrind >= 2.4.0]) + AC_DEFINE([HAVE_VALGRIND], [1], [Valgrind support enabled]) fi AC_DEFINE_IF([EINA_DEBUG_MALLOC], @@ -1502,9 +1502,6 @@ requirements_pc_evas="eo >= ${PACKAGE_VERSION} eet >= ${PACKAGE_VERSION} eina >= EFL_DEPEND_PKG([evas], [FREETYPE], [freetype2 >= 9.3.0]) ## optional dependencies -# Valgrind -EFL_OPTIONAL_DEPEND_PKG([evas], [${want_valgrind}], - [VALGRIND], [valgrind >= 2.4.0]) # FontConfig EFL_OPTIONAL_DEPEND_PKG([evas], [${want_fontconfig}], diff --git a/src/Makefile_Eina.am b/src/Makefile_Eina.am index 931876e..ad17bae 100644 --- a/src/Makefile_Eina.am +++ b/src/Makefile_Eina.am @@ -161,7 +161,7 @@ chained_pool_module_la_CPPFLAGS = \ -I$(top_srcdir)/src/lib/eina \ -I$(top_builddir)/src/lib/eina \ -DEFL_EINA_BUILD -chained_pool_module_la_CFLAGS = @EINA_CFLAGS@ @EFL_PTHREAD_CFLAGS@ +chained_pool_module_la_CFLAGS = @EINA_CFLAGS@ @EFL_PTHREAD_CFLAGS@ @VALGRIND_CFLAGS@ chained_pool_module_la_SOURCES = modules/eina/mp/chained_pool/eina_chained_mempool.c chained_pool_module_la_LIBADD = lib/eina/libeina.la @EINA_LIBS@ chained_pool_module_la_LDFLAGS = -no-undefined -module -avoid-version @EFL_PTHREAD_LIBS@ @@ -178,7 +178,7 @@ one_big_module_la_CPPFLAGS = \ -I$(top_srcdir)/src/lib/eina \ -I$(top_builddir)/src/lib/eina \ -DEFL_EINA_BUILD -one_big_module_la_CFLAGS = @EINA_CFLAGS@ @EFL_PTHREAD_CFLAGS@ +one_big_module_la_CFLAGS = @EINA_CFLAGS@ @EFL_PTHREAD_CFLAGS@ @VALGRIND_CFLAGS@ one_big_module_la_SOURCES = modules/eina/mp/chained_pool/eina_chained_mempool.c one_big_module_la_LIBADD = lib/eina/libeina.la @EINA_LIBS@ one_big_module_la_LDFLAGS = -no-undefined -module -avoid-version @EFL_PTHREAD_LIBS@ @@ -195,7 +195,7 @@ pass_through_module_la_CPPFLAGS = \ -I$(top_srcdir)/src/lib/eina \ -I$(top_builddir)/src/lib/eina \ -DEFL_EINA_BUILD -pass_through_module_la_CFLAGS = @EINA_CFLAGS@ +pass_through_module_la_CFLAGS = @EINA_CFLAGS@ @VALGRIND_CFLAGS@ pass_through_module_la_SOURCES = modules/eina/mp/chained_pool/eina_chained_mempool.c pass_through_module_la_LIBADD = lib/eina/libeina.la @EINA_LIBS@ pass_through_module_la_LDFLAGS = -no-undefined -module -avoid-version @@ -213,6 +213,7 @@ lib_eina_libeina_la_CPPFLAGS = \ @EFL_COV_CFLAGS@ \ @EFL_PTHREAD_CFLAGS@ \ @EINA_CFLAGS@ \ +@VALGRIND_CFLAGS@ \ @USE_EVIL_CFLAGS@ lib_eina_libeina_la_LIBADD = @EINA_LIBS@ @EFL_COV_LIBS@ @USE_EVIL_LIBS@ @DL_LIBS@ -lm diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am index 37db7fb..8d8441c 100644 --- a/src/Makefile_Evas.am +++ b/src/Makefile_Evas.am @@ -207,6 +207,7 @@ lib_evas_libevas_la_CPPFLAGS = \ @EFL_CFLAGS@ \ @EFL_COV_CFLAGS@ \ @EVAS_CFLAGS@ \ +@VALGRIND_CFLAGS@ \ @ALTIVEC_CFLAGS@ \ @USE_EVIL_CFLAGS@ -- 2.7.4