From 51f42669b2db7c37cd413d195df07638e0048ef1 Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Fri, 23 Oct 2015 23:20:31 -0400 Subject: [PATCH] [profiler] Create a static version of libmono-profiler-log which doesn't link against eglib, to prevent duplicate symbols errors when its linked with the runtime. Fixes part of #29745. --- mono/profiler/Makefile.am | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mono/profiler/Makefile.am b/mono/profiler/Makefile.am index d67a97264ac..e467bb16676 100644 --- a/mono/profiler/Makefile.am +++ b/mono/profiler/Makefile.am @@ -19,7 +19,7 @@ if HAVE_VTUNE vtune_lib = libmono-profiler-vtune.la endif -lib_LTLIBRARIES = libmono-profiler-aot.la libmono-profiler-iomap.la libmono-profiler-log.la $(vtune_lib) +lib_LTLIBRARIES = libmono-profiler-aot.la libmono-profiler-iomap.la libmono-profiler-log.la libmono-profiler-log-static.la $(vtune_lib) if PLATFORM_DARWIN libmono_profiler_log_la_LDFLAGS = -Wl,-undefined -Wl,suppress -Wl,-flat_namespace @@ -68,6 +68,14 @@ libmono_profiler_vtune_la_CFLAGS = $(VTUNE_CFLAGS) libmono_profiler_vtune_la_LIBADD = $(VTUNE_LIBS) $(LIBMONO) $(GLIB_LIBS) $(LIBICONV) endif +# The log profile uses eglib functions, so it needs to be linked against +# libeglib in shared mode, but not in static mode, since that would +# leads to duplicate symbols when it is linked into an app which +# also uses eglib (e.g. the runtime). Automake doesn't support this +# functionality, so create a separate static version of the library. +libmono_profiler_log_static_la_SOURCES = proflog.c +libmono_profiler_log_static_la_LDFLAGS = -static + mprof_report_SOURCES = decode.c mprof_report_LDADD = $(Z_LIBS) $(GLIB_LIBS) $(LIBICONV) -- 2.25.1