public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Tomas Glozar <tglozar@redhat.com>, John Kacur <jkacur@redhat.com>,
	Luis Goncalves <lgoncalv@redhat.com>,
	Gabriele Monaco <gmonaco@redhat.com>
Subject: [for-next][PATCH 09/10] tools/rv: Keep user LDFLAGS in build
Date: Thu, 06 Mar 2025 13:18:10 -0500	[thread overview]
Message-ID: <20250306181826.773344269@goodmis.org> (raw)
In-Reply-To: 20250306181801.485766945@goodmis.org

From: Tomas Glozar <tglozar@redhat.com>

rv, unlike rtla and perf, drops LDFLAGS supplied by the user and honors
only EXTRA_LDFLAGS. This is inconsistent with both perf and rtla and
can lead to all kinds of unexpected behavior.

For example, on Fedora and RHEL, it causes rv to be build without
PIE, unlike the aforementioned perf and rtla:

$ file /usr/bin/{rv,rtla,perf}
/usr/bin/rv:   ELF 64-bit LSB executable, ...
/usr/bin/rtla: ELF 64-bit LSB pie executable, ...
/usr/bin/perf: ELF 64-bit LSB pie executable, ...

Keep both LDFLAGS and EXTRA_LDFLAGS for the build.

Cc: John Kacur <jkacur@redhat.com>
Cc: Luis Goncalves <lgoncalv@redhat.com>
Cc: Gabriele Monaco <gmonaco@redhat.com>
Link: https://lore.kernel.org/20250304142228.767658-1-tglozar@redhat.com
Fixes: 012e4e77df73 ("tools/verification: Use tools/build makefiles on rv")
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 tools/verification/rv/Makefile.rv | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/verification/rv/Makefile.rv b/tools/verification/rv/Makefile.rv
index 161baa29eb86..2497fb96c83d 100644
--- a/tools/verification/rv/Makefile.rv
+++ b/tools/verification/rv/Makefile.rv
@@ -27,7 +27,7 @@ endif
 
 INCLUDE		:= -Iinclude/
 CFLAGS		:= -g -DVERSION=\"$(VERSION)\" $(FOPTS) $(WOPTS) $(EXTRA_CFLAGS) $(INCLUDE)
-LDFLAGS		:= -ggdb $(EXTRA_LDFLAGS)
+LDFLAGS		:= -ggdb $(LDFLAGS) $(EXTRA_LDFLAGS)
 
 INSTALL		:= install
 MKDIR		:= mkdir
-- 
2.47.2



  parent reply	other threads:[~2025-03-06 18:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-06 18:18 [for-next][PATCH 00/10] tools/tracing: Updates for v6.15 Steven Rostedt
2025-03-06 18:18 ` [for-next][PATCH 01/10] rtla/timerlat: Unify params struct Steven Rostedt
2025-03-06 18:18 ` [for-next][PATCH 02/10] tools/build: Add bpftool-skeletons feature test Steven Rostedt
2025-03-06 18:18 ` [for-next][PATCH 03/10] rtla: Add optional dependency on BPF tooling Steven Rostedt
2025-03-06 18:18 ` [for-next][PATCH 04/10] rtla/timerlat: Add BPF skeleton to collect samples Steven Rostedt
2025-03-06 18:18 ` [for-next][PATCH 05/10] rtla/timerlat_hist: Use BPF " Steven Rostedt
2025-03-06 18:18 ` [for-next][PATCH 06/10] rtla/timerlat_top: Move divisor to update Steven Rostedt
2025-03-06 18:18 ` [for-next][PATCH 07/10] rtla/timerlat_top: Use BPF to collect samples Steven Rostedt
2025-03-06 18:18 ` [for-next][PATCH 08/10] rtla/timerlat: Test BPF mode Steven Rostedt
2025-03-06 18:18 ` Steven Rostedt [this message]
2025-03-06 18:18 ` [for-next][PATCH 10/10] rtla: Refactor save_trace_to_file Steven Rostedt

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=20250306181826.773344269@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=gmonaco@redhat.com \
    --cc=jkacur@redhat.com \
    --cc=lgoncalv@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglozar@redhat.com \
    /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