From: Namhyung Kim <namhyung@kernel.org>
To: Suchit Karunakaran <suchitkarunakaran@gmail.com>
Cc: peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
mark.rutland@arm.com, alexander.shishkin@linux.intel.com,
jolsa@kernel.org, irogers@google.com, adrian.hunter@intel.com,
kan.liang@linux.intel.com, linux-perf-users@vger.kernel.org,
sesse@google.com, charlie@rivosinc.com,
linux-kernel@vger.kernel.org,
linux-kernel-mentees@lists.linux.dev, skhan@linuxfoundation.org
Subject: Re: [PATCH] perf tests: Fix lib path detection for non-x86 architectures
Date: Sun, 20 Jul 2025 20:33:12 -0700 [thread overview]
Message-ID: <aH20-KEurjw5qJq0@google.com> (raw)
In-Reply-To: <20250720085905.192652-1-suchitkarunakaran@gmail.com>
On Sun, Jul 20, 2025 at 02:29:05PM +0530, Suchit Karunakaran wrote:
> The existing Makefile logic for determining library paths was
> hardcoded for x86 architectures, causing incorrect behavior
> on other platforms. This patch implements a portable solution
> using system bit detection.
>
> Signed-off-by: Suchit Karunakaran <suchitkarunakaran@gmail.com>
> ---
> tools/perf/tests/make | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/tools/perf/tests/make b/tools/perf/tests/make
> index 0ee94caf9ec1..565522408f99 100644
> --- a/tools/perf/tests/make
> +++ b/tools/perf/tests/make
> @@ -53,9 +53,12 @@ endif
>
> include $(srctree)/tools/scripts/Makefile.arch
>
> -# FIXME looks like x86 is the only arch running tests ;-)
> -# we need some IS_(32/64) flag to make this generic
> -ifeq ($(ARCH)$(IS_64_BIT), x861)
> +BITS := $(shell getconf LONG_BIT)
> +IS_64_BIT ?= 1
> +ifeq ($(BITS), 32)
> +IS_64_BIT = 0
> +endif
> +ifeq ($(IS_64_BIT), 1)
> lib = lib64
> else
> lib = lib
A dummy question: Does all other architectures have lib64 vs lib
separation?
Thanks,
Namhyung
> --
> 2.50.1
>
next prev parent reply other threads:[~2025-07-21 3:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-20 8:59 [PATCH] perf tests: Fix lib path detection for non-x86 architectures Suchit Karunakaran
2025-07-21 3:33 ` Namhyung Kim [this message]
2025-07-21 5:40 ` Suchit K
2025-07-23 1:13 ` Namhyung Kim
2025-07-23 4:30 ` Suchit K
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=aH20-KEurjw5qJq0@google.com \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=charlie@rivosinc.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=sesse@google.com \
--cc=skhan@linuxfoundation.org \
--cc=suchitkarunakaran@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.