Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761141AbbKTU57 (ORCPT ); Fri, 20 Nov 2015 15:57:59 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:58229 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761123AbbKTU54 (ORCPT ); Fri, 20 Nov 2015 15:57:56 -0500 From: Josef Bacik To: , , Subject: [PATCH 08/11] trace-cmd: add trace-stat and -ldl to libtracecmd Date: Fri, 20 Nov 2015 15:57:30 -0500 Message-ID: <1448053053-24188-9-git-send-email-jbacik@fb.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1448053053-24188-1-git-send-email-jbacik@fb.com> References: <1448053053-24188-1-git-send-email-jbacik@fb.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.168.52.123] X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2015-11-20_12:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2218 Lines: 60 We do dlopen of plugins for libtracecmd, just add -ldl so we can link it externally without complaints. We also need get_file_contents from trace-stat, so just add that as well. Signed-off-by: Josef Bacik --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index d812f77..5884592 100644 --- a/Makefile +++ b/Makefile @@ -292,6 +292,10 @@ do_compile_shared_library = \ ($(print_shared_lib_compile) \ $(CC) --shared $^ -o $@) +do_compile_libtracecmd = \ + ($(print_shared_lib_compile) \ + $(CC) --shared -ldl $^ -o $@) + do_compile_plugin_obj = \ ($(print_plugin_obj_compile) \ $(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $<) @@ -323,8 +327,7 @@ $(obj)/%.o: $(src)/%.c TRACE_GUI_OBJS = trace-filter.o trace-compat.o trace-filter-hash.o trace-dialog.o \ trace-xml.o TRACE_CMD_OBJS = trace-cmd.o trace-record.o trace-read.o trace-split.o trace-listen.o \ - trace-stack.o trace-hist.o trace-mem.o trace-snapshot.o trace-stat.o \ - trace-profile.o + trace-stack.o trace-hist.o trace-mem.o trace-snapshot.o trace-profile.o TRACE_VIEW_OBJS = trace-view.o trace-view-store.o TRACE_GRAPH_OBJS = trace-graph.o trace-plot.o trace-plot-cpu.o trace-plot-task.o TRACE_VIEW_MAIN_OBJS = trace-view-main.o $(TRACE_VIEW_OBJS) $(TRACE_GUI_OBJS) @@ -337,7 +340,7 @@ TCMD_LIB_OBJS = $(PEVENT_LIB_OBJS) trace-util.o trace-input.o trace-ftrace.o \ trace-output.o trace-record.o trace-recorder.o \ trace-restore.o trace-usage.o trace-blk-hack.o \ kbuffer-parse.o event-plugin.o trace-hooks.o \ - trace-stream.o trace-hash.o + trace-stream.o trace-hash.o trace-stat.o PLUGIN_OBJS = PLUGIN_OBJS += plugin_jbd2.o @@ -414,7 +417,7 @@ $(TCMD_LIB_OBJS): %.o: $(src)/%.c $(Q)$(do_fpic_compile) libtracecmd.so: $(TCMD_LIB_OBJS) - $(Q)$(do_compile_shared_library) + $(Q)$(do_compile_libtracecmd) libtracecmd.a: $(TCMD_LIB_OBJS) $(Q)$(do_build_static_lib) -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/