[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250228-b4-fix_perf_symbolic_link-v1-1-3ad734838929@rivosinc.com>
Date: Fri, 28 Feb 2025 13:48:32 -0800
From: Charlie Jenkins <charlie@...osinc.com>
To: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Namhyung Kim <namhyung@...nel.org>, Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>, Andi Kleen <ak@...ux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
Charlie Jenkins <charlie@...osinc.com>
Subject: [PATCH] perf tools: Fix perf object dir symbolic link
The -n flag is needed as an argument to ln to avoid recursively setting
the symbolic link when OUTPUT is the same as $(srctree)/tools/perf.
Without this flag, the perf binary at $(srctree)/tools/perf/perf will
become overwritten with a symbolic link to the parent directory.
Additionally, remove the forward slash after $(OUTPUT) since $(OUTPUT)
implicitly includes a forward slash.
Signed-off-by: Charlie Jenkins <charlie@...osinc.com>
Fixes: 890a1961c812 ("perf tools: Create source symlink in perf object dir")
---
tools/perf/Makefile.perf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 55d6ce9ea52fb2a57b8632cc6d0ddc501e29cbfc..0b6f9de6f222da1181402aa33e41ec3b05f9189e 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -158,7 +158,7 @@ ifneq ($(OUTPUT),)
VPATH += $(OUTPUT)
export VPATH
# create symlink to the original source
-SOURCE := $(shell ln -sf $(srctree)/tools/perf $(OUTPUT)/source)
+SOURCE := $(shell ln -sfn $(srctree)/tools/perf $(OUTPUT)source)
endif
# Beautify output
---
base-commit: 0ad2507d5d93f39619fc42372c347d6006b64319
change-id: 20250228-b4-fix_perf_symbolic_link-8cc373a195ac
--
- Charlie
Powered by blists - more mailing lists