Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp246004pxb; Tue, 19 Oct 2021 01:55:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLJIJEfqkArrKKct3xglq3ihXKKIB9BN1g/Moy98Q2VvMJz3RSO14qFKi375Vz+InbT3zY X-Received: by 2002:a17:90b:78d:: with SMTP id l13mr5115613pjz.37.1634633736791; Tue, 19 Oct 2021 01:55:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634633736; cv=none; d=google.com; s=arc-20160816; b=AEsr89+nrKFRBZjPWeR6QBQD+M70O4ls7HgJBWNy/AR8c9uw+iCFeV6ciIfMScdsXi /RTqWzJzaqGSh4EvzqJtsTD951lBH6j/sQRlzM3dWJdjRC/Z39dmV+6VSAyIubvCIIcY p8PWOJDcOXBtzqhGGjHftCEkpVU36MdMf/gyRcPsKvq2oA1yDs/qREp6eFepHCRMQ1tL DFKiBDp6xiA6T4QtM2uIrPOylJ4Tk+RCXWiWiEzaVajnQmLav56YnDLJzArtANnx8apV xnMRLyT79VOai7Lez1xQcH3ggVXYVuKw2//TFe6SmD9yEzz9ozSMP+j3eeGlO7r1YV5W Wpkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=GJIZ7sqpa6kr3kysrzcBOeC1DhSAJ+NrSgLQ991nPyo=; b=WT+7d1kHBpwxNz6ybN2RfXIAOtZ+m/fYFcZSbxHPnL0dL+LAzYwwqBSFpGRLm1j13u mDCcVR23S9XnL8CP85SB9jpajXUhCmWlFimFIJnpukWYkxj4rZx1+MD/vIFf+p/zKtNi YJxEQf5SaKtbuzTMUiUjHXIDQZdZ9GolJ8Y/uaaPsfHd91zYMi9MSPCKvijslKJpWXcO vq7jkpElx6/8LRQGm/PrwifwW2OqSEZFbHSdD+NPLjVqhi4b6CKsfwV0rwwzn1fOL3tF hzSnK88x8zVCVpmxUzLH+tLF7wxfKd86Ts60t3YTFYMwNRzGgshQgtKn8n0rOmM3LrBO xDQQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d2si16392435plg.186.2021.10.19.01.55.21; Tue, 19 Oct 2021 01:55:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234814AbhJSIzx (ORCPT + 99 others); Tue, 19 Oct 2021 04:55:53 -0400 Received: from gateway20.websitewelcome.com ([192.185.59.4]:19144 "EHLO gateway20.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229930AbhJSIzw (ORCPT ); Tue, 19 Oct 2021 04:55:52 -0400 X-Greylist: delayed 1499 seconds by postgrey-1.27 at vger.kernel.org; Tue, 19 Oct 2021 04:55:52 EDT Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway20.websitewelcome.com (Postfix) with ESMTP id EA172400D190F for ; Tue, 19 Oct 2021 03:06:41 -0500 (CDT) Received: from gator4132.hostgator.com ([192.185.4.144]) by cmsmtp with SMTP id ck8vm4sbsIWzGck8vmEaM4; Tue, 19 Oct 2021 03:06:41 -0500 X-Authority-Reason: nr=8 Received: from host-79-18-63-114.retail.telecomitalia.it ([79.18.63.114]:58572 helo=[10.0.0.35]) by gator4132.hostgator.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1mck8u-000jRJ-HQ; Tue, 19 Oct 2021 03:06:40 -0500 Message-ID: Date: Tue, 19 Oct 2021 10:06:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [PATCH V3 06/19] rtla: Real-Time Linux Analysis tool Content-Language: en-US To: "Ahmed S. Darwish" Cc: Steven Rostedt , Ingo Molnar , Tom Zanussi , Masami Hiramatsu , Juri Lelli , Clark Williams , John Kacur , Peter Zijlstra , Thomas Gleixner , Sebastian Andrzej Siewior , linux-rt-users@vger.kernel.org, linux-trace-devel@vger.kernel.org, linux-kernel@vger.kernel.org References: <65fbb9b508a2c1803bacfe255c1d568eb8f4ba4f.1634574261.git.bristot@kernel.org> From: Daniel Bristot de Oliveira In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4132.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - kernel.org X-BWhitelist: no X-Source-IP: 79.18.63.114 X-Source-L: No X-Exim-ID: 1mck8u-000jRJ-HQ X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: host-79-18-63-114.retail.telecomitalia.it ([10.0.0.35]) [79.18.63.114]:58572 X-Source-Auth: kernel@bristot.me X-Email-Count: 1 X-Source-Cap: YnJpc3RvdG1lO2JyaXN0b3RtZTtnYXRvcjQxMzIuaG9zdGdhdG9yLmNvbQ== X-Local-Domain: no Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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