linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add --sysroot when building dlfilters on cross build environments
@ 2021-08-30 21:12 Arnaldo Carvalho de Melo
  2021-08-31  6:04 ` Adrian Hunter
  0 siblings, 1 reply; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-08-30 21:12 UTC (permalink / raw)
  To: Adrian Hunter
  Cc: Jiri Olsa, Namhyung Kim, Ian Rogers, Linux Kernel Mailing List

Hi Adrian,

	I had to add this cset to fix the build/link on cross build
environments with a sysroot, like Android, EXTRA_CFLAGS is where it will
get the needed --sysroot=/opt/android-ndk-r12b//platforms/android-24/arch-arm, please ack.

- Arnaldo

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 24623599113df215..e04313c4d8409a94 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -785,10 +785,10 @@ endif
 
 $(OUTPUT)dlfilters/%.o: dlfilters/%.c include/perf/perf_dlfilter.h
 	$(Q)$(MKDIR) -p $(OUTPUT)dlfilters
-	$(QUIET_CC)$(CC) -c -Iinclude -o $@ -fpic $<
+	$(QUIET_CC)$(CC) -c -Iinclude $(EXTRA_CFLAGS) -o $@ -fpic $<
 
 $(OUTPUT)dlfilters/%.so: $(OUTPUT)dlfilters/%.o
-	$(QUIET_LINK)$(CC) -shared -o $@ $<
+	$(QUIET_LINK)$(CC) $(EXTRA_CFLAGS) -shared -o $@ $<
 
 ifndef NO_JVMTI
 LIBJVMTI_IN := $(OUTPUT)jvmti/jvmti-in.o

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

* Re: [PATCH] Add --sysroot when building dlfilters on cross build environments
  2021-08-30 21:12 [PATCH] Add --sysroot when building dlfilters on cross build environments Arnaldo Carvalho de Melo
@ 2021-08-31  6:04 ` Adrian Hunter
  0 siblings, 0 replies; 2+ messages in thread
From: Adrian Hunter @ 2021-08-31  6:04 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Jiri Olsa, Namhyung Kim, Ian Rogers, Linux Kernel Mailing List

On 31/08/21 12:12 am, Arnaldo Carvalho de Melo wrote:
> Hi Adrian,
> 
> 	I had to add this cset to fix the build/link on cross build
> environments with a sysroot, like Android, EXTRA_CFLAGS is where it will
> get the needed --sysroot=/opt/android-ndk-r12b//platforms/android-24/arch-arm, please ack.
> 
> - Arnaldo
> 
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index 24623599113df215..e04313c4d8409a94 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -785,10 +785,10 @@ endif
>  
>  $(OUTPUT)dlfilters/%.o: dlfilters/%.c include/perf/perf_dlfilter.h
>  	$(Q)$(MKDIR) -p $(OUTPUT)dlfilters
> -	$(QUIET_CC)$(CC) -c -Iinclude -o $@ -fpic $<
> +	$(QUIET_CC)$(CC) -c -Iinclude $(EXTRA_CFLAGS) -o $@ -fpic $<
>  
>  $(OUTPUT)dlfilters/%.so: $(OUTPUT)dlfilters/%.o
> -	$(QUIET_LINK)$(CC) -shared -o $@ $<
> +	$(QUIET_LINK)$(CC) $(EXTRA_CFLAGS) -shared -o $@ $<
>  
>  ifndef NO_JVMTI
>  LIBJVMTI_IN := $(OUTPUT)jvmti/jvmti-in.o
> 

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

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

end of thread, other threads:[~2021-08-31  6:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-30 21:12 [PATCH] Add --sysroot when building dlfilters on cross build environments Arnaldo Carvalho de Melo
2021-08-31  6:04 ` Adrian Hunter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).