linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Bristot de Oliveira <bristot@kernel.org>
To: "Ahmed S. Darwish" <a.darwish@linutronix.de>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>, Tom Zanussi <zanussi@kernel.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Clark Williams <williams@redhat.com>,
	John Kacur <jkacur@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	linux-rt-users@vger.kernel.org,
	linux-trace-devel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V3 06/19] rtla: Real-Time Linux Analysis tool
Date: Tue, 19 Oct 2021 10:06:36 +0200	[thread overview]
Message-ID: <b093fc67-a251-fad3-e6f6-19c5d85253dc@kernel.org> (raw)
In-Reply-To: <YW3LUhMOVWTvQlKh@lx-t490>

On 10/18/21 21:30, Ahmed S. Darwish wrote:
> On Mon, Oct 18, 2021, Daniel Bristot de Oliveira wrote:
>> --- /dev/null
>> +++ b/tools/tracing/rtla/Makefile
>> @@ -0,0 +1,59 @@
>> +CC	:=	gcc
> 
> Some $(CROSS_COMPILE) for the poor souls who will integrate this into
> embedded distributions?
> 
>> +
>> +TRACEFS_HEADERS		:= $$(pkg-config --cflags libtracefs)
>> +
> 
> ditto. This uses the host's pkg-config unconditionally.

mind trying this (on top of the current one)?

Thanks!

diff --git a/tools/tracing/rtla/Makefile b/tools/tracing/rtla/Makefile
index 9a914391e507..8c2b7f8c7f20 100644
--- a/tools/tracing/rtla/Makefile
+++ b/tools/tracing/rtla/Makefile
@@ -1,14 +1,30 @@
 NAME	:=	rtla
 VERSION	:=	0.1
 
+# Makefiles suck: This macro sets a default value of $(2) for the
+# variable named by $(1), unless the variable has been set by
+# environment or command line. This is necessary for CC and AR
+# because make sets default values, so the simpler ?= approach
+# won't work as expected.
+define allow-override
+  $(if $(or $(findstring environment,$(origin $(1))),\
+            $(findstring command line,$(origin $(1)))),,\
+    $(eval $(1) = $(2)))
+endef
+
+# Allow setting CC and AR, or setting CROSS_COMPILE as a prefix.
+$(call allow-override,CC,$(CROSS_COMPILE)gcc)
+$(call allow-override,AR,$(CROSS_COMPILE)ar)
+$(call allow-override,PKG_CONFIG,pkg-config)
+$(call allow-override,LD_SO_CONF_PATH,/etc/ld.so.conf.d/)
+$(call allow-override,LDCONFIG,ldconfig)
+
 INSTALL	=	install
-CC	:=	gcc
 FOPTS	:=	-flto=auto -ffat-lto-objects -fexceptions -fstack-protector-strong \
-		-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
-MOPTS	:=	-m64 -mtune=generic
+		-fasynchronous-unwind-tables -fstack-clash-protection
 WOPTS	:= 	-Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -Wno-maybe-uninitialized
 
-TRACEFS_HEADERS		:= $$(pkg-config --cflags libtracefs)
+TRACEFS_HEADERS	:= $$($(PKG_CONFIG) --cflags libtracefs)
 
 CFLAGS	:=	-O -g -DVERSION=\"$(VERSION)\" $(FOPTS) $(MOPTS) $(WOPTS) $(TRACEFS_HEADERS)
 LDFLAGS	:=	-ggdb


  reply	other threads:[~2021-10-19  8:53 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 16:48 [PATCH V3 00/19] RTLA: An interface for osnoise/timerlat tracers Daniel Bristot de Oliveira
2021-10-18 16:48 ` [PATCH V3 01/19] trace/osnoise: Do not follow tracing_cpumask Daniel Bristot de Oliveira
2021-10-18 16:48 ` [PATCH V3 02/19] trace/osnoise: Split workload start from the tracer start Daniel Bristot de Oliveira
2021-10-18 16:48 ` [PATCH V3 03/19] trace/osnoise: Use start/stop_per_cpu_kthreads() on osnoise_cpus_write() Daniel Bristot de Oliveira
2021-10-18 16:48 ` [PATCH V3 04/19] trace/osnoise: Support a list of trace_array *tr Daniel Bristot de Oliveira
2021-10-18 16:48 ` [PATCH V3 05/19] trace/osnoise: Allow multiple instances of the same tracer Daniel Bristot de Oliveira
2021-10-18 16:48 ` [PATCH V3 06/19] rtla: Real-Time Linux Analysis tool Daniel Bristot de Oliveira
2021-10-18 19:30   ` Ahmed S. Darwish
2021-10-19  8:06     ` Daniel Bristot de Oliveira [this message]
2021-10-18 16:48 ` [PATCH V3 07/19] rtla: Helper functions for rtla Daniel Bristot de Oliveira
2021-10-18 16:48 ` [PATCH V3 08/19] rtla: Add osnoise tool Daniel Bristot de Oliveira
2021-10-18 16:48 ` [PATCH V3 09/19] rtla/osnoise: Add osnoise top mode Daniel Bristot de Oliveira
2021-10-18 16:48 ` [PATCH V3 10/19] rtla/osnoise: Add the hist mode Daniel Bristot de Oliveira
2021-10-18 16:48 ` [PATCH V3 11/19] rtla: Add timerlat tool and timelart top mode Daniel Bristot de Oliveira
2021-10-18 16:48 ` [PATCH V3 12/19] rtla/timerlat: Add timerlat hist mode Daniel Bristot de Oliveira
2021-10-18 16:48 ` [PATCH V3 13/19] rtla: Add Documentation Daniel Bristot de Oliveira
2021-10-18 17:43   ` Jonathan Corbet
2021-10-19 12:56     ` Daniel Bristot de Oliveira
2021-10-19 13:21       ` Steven Rostedt
2021-10-19 14:07         ` Daniel Bristot de Oliveira
2021-10-19 14:45           ` Steven Rostedt
2021-10-19 15:08             ` Daniel Bristot de Oliveira
2021-10-19 15:25               ` Steven Rostedt
2021-10-19 15:43                 ` Daniel Bristot de Oliveira
2021-10-19 15:28           ` Jonathan Corbet
2021-10-19 15:36             ` Steven Rostedt
2021-10-19 15:41               ` Daniel Bristot de Oliveira
2021-10-19 19:18                 ` Jonathan Corbet
2021-10-18 16:48 ` [PATCH V3 14/19] rtla: Add rtla osnoise man page Daniel Bristot de Oliveira
2021-10-18 16:48 ` [PATCH V3 15/19] rtla: Add rtla osnoise top documentation Daniel Bristot de Oliveira
2021-10-18 16:48 ` [PATCH V3 16/19] rtla: Add rtla osnoise hist documentation Daniel Bristot de Oliveira
2021-10-18 16:48 ` [PATCH V3 17/19] rtla: Add rtla timerlat documentation Daniel Bristot de Oliveira
2021-10-18 16:48 ` [PATCH V3 18/19] rtla: Add rtla timerlat top documentation Daniel Bristot de Oliveira
2021-10-18 16:48 ` [PATCH V3 19/19] rtla: Add rtla timerlat hist documentation Daniel Bristot de Oliveira

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b093fc67-a251-fad3-e6f6-19c5d85253dc@kernel.org \
    --to=bristot@kernel.org \
    --cc=a.darwish@linutronix.de \
    --cc=bigeasy@linutronix.de \
    --cc=jkacur@redhat.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=williams@redhat.com \
    --cc=zanussi@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).