All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf jvmti: Link in tools/lib/ctype.o
@ 2019-10-14 15:48 Jiri Olsa
  2019-10-14 16:19 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Olsa @ 2019-10-14 15:48 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin,
	Peter Zijlstra, Michael Petlan, Andi Kleen

The libperf-jvmti.so links already with tools/lib/string.o
to use strlcpy. However the string.o depends on ctype.o
so we need to link it in as well.

Fixes: 79743bc927f6 ("perf jvmti: Link against tools/lib/string.o to have weak strlcpy()")
Link: http://lkml.kernel.org/n/tip-zitavtnkcu2guqwfgtp7n7bg@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/jvmti/Build | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/perf/jvmti/Build b/tools/perf/jvmti/Build
index 1e148bbdf820..7de7f90bf3fb 100644
--- a/tools/perf/jvmti/Build
+++ b/tools/perf/jvmti/Build
@@ -3,6 +3,7 @@ jvmti-y += jvmti_agent.o
 
 # For strlcpy
 jvmti-y += libstring.o
+jvmti-y += libctype.o
 
 CFLAGS_jvmti         = -fPIC -DPIC -I$(JDIR)/include -I$(JDIR)/include/linux
 CFLAGS_REMOVE_jvmti  = -Wmissing-declarations
@@ -15,3 +16,7 @@ CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PE
 $(OUTPUT)jvmti/libstring.o: ../lib/string.c FORCE
 	$(call rule_mkdir)
 	$(call if_changed_dep,cc_o_c)
+
+$(OUTPUT)jvmti/libctype.o: ../lib/ctype.c FORCE
+	$(call rule_mkdir)
+	$(call if_changed_dep,cc_o_c)
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] perf jvmti: Link in tools/lib/ctype.o
  2019-10-14 15:48 [PATCH] perf jvmti: Link in tools/lib/ctype.o Jiri Olsa
@ 2019-10-14 16:19 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-10-14 16:19 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Thomas Richter, lkml, Ingo Molnar, Namhyung Kim,
	Alexander Shishkin, Peter Zijlstra, Michael Petlan, Andi Kleen

Em Mon, Oct 14, 2019 at 05:48:56PM +0200, Jiri Olsa escreveu:
> The libperf-jvmti.so links already with tools/lib/string.o
> to use strlcpy. However the string.o depends on ctype.o
> so we need to link it in as well.
> 
> Fixes: 79743bc927f6 ("perf jvmti: Link against tools/lib/string.o to have weak strlcpy()")
> Link: http://lkml.kernel.org/n/tip-zitavtnkcu2guqwfgtp7n7bg@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>

I applied one already for this, contributed by Thomas.

Thanks,

- Arnaldo
> ---
>  tools/perf/jvmti/Build | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/tools/perf/jvmti/Build b/tools/perf/jvmti/Build
> index 1e148bbdf820..7de7f90bf3fb 100644
> --- a/tools/perf/jvmti/Build
> +++ b/tools/perf/jvmti/Build
> @@ -3,6 +3,7 @@ jvmti-y += jvmti_agent.o
>  
>  # For strlcpy
>  jvmti-y += libstring.o
> +jvmti-y += libctype.o
>  
>  CFLAGS_jvmti         = -fPIC -DPIC -I$(JDIR)/include -I$(JDIR)/include/linux
>  CFLAGS_REMOVE_jvmti  = -Wmissing-declarations
> @@ -15,3 +16,7 @@ CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PE
>  $(OUTPUT)jvmti/libstring.o: ../lib/string.c FORCE
>  	$(call rule_mkdir)
>  	$(call if_changed_dep,cc_o_c)
> +
> +$(OUTPUT)jvmti/libctype.o: ../lib/ctype.c FORCE
> +	$(call rule_mkdir)
> +	$(call if_changed_dep,cc_o_c)
> -- 
> 2.21.0

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-14 16:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-14 15:48 [PATCH] perf jvmti: Link in tools/lib/ctype.o Jiri Olsa
2019-10-14 16:19 ` Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.