Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1473092
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] perf tools: Fix static building |
| Date | 2016-08-31 09:30 +0200 |
| Message-ID | <sc88a-7Pb-35@gated-at.bofh.it> (permalink) |
| References | <s91my-Qk-41@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Aug 22, 2016 at 08:33:42PM +0300, Alexey Brodkin wrote:
> With commit e3d09ec8126f ("tools lib traceevent: Export dynamic symbols
> used by traceevent plugins") we started to add "--dynamic-list" in
> LDFLAGS. One side-effect of that was inability to build really
> statically-linked perf.
>
> I.e. even if "LDFLAGS=-static" were passed on perf building command-line
> it had no effect and perf was built dynamically.
>
> This change disables setup of "--dynamic-list" if LDFLAGS contains
> "-static" option.
>
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: Vineet Gupta <vgupta@synopsys.com>
> Cc: Wang Nan <wangnan0@huawei.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: He Kuang <hekuang@huawei.com>
> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Zefan Li <lizefan@huawei.com>
> Cc: pi3orama@163.com
> ---
> tools/perf/Makefile.perf | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index 2d908750..e9acc7c 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -236,7 +236,9 @@ LIBTRACEEVENT = $(TE_PATH)libtraceevent.a
> export LIBTRACEEVENT
>
> LIBTRACEEVENT_DYNAMIC_LIST = $(TE_PATH)libtraceevent-dynamic-list
> +ifeq ($(filter -static,$(LDFLAGS)),)
> LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS = -Xlinker --dynamic-list=$(LIBTRACEEVENT_DYNAMIC_LIST)
> +endif
hum, e3d09ec8126f changelog mentioned python feature adding this by default
but not sure python could be added within static build
jirka
>
> LIBAPI = $(API_PATH)libapi.a
> export LIBAPI
> --
> 2.7.4
>
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH] perf tools: Fix static building Jiri Olsa <jolsa@redhat.com> - 2016-08-31 09:30 +0200
csiph-web