lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250720085905.192652-1-suchitkarunakaran@gmail.com>
Date: Sun, 20 Jul 2025 14:29:05 +0530
From: Suchit Karunakaran <suchitkarunakaran@...il.com>
To: peterz@...radead.org,
	mingo@...hat.com,
	acme@...nel.org,
	namhyung@...nel.org,
	mark.rutland@....com,
	alexander.shishkin@...ux.intel.com,
	jolsa@...nel.org,
	irogers@...gle.com,
	adrian.hunter@...el.com,
	kan.liang@...ux.intel.com,
	linux-perf-users@...r.kernel.org
Cc: sesse@...gle.com,
	charlie@...osinc.com,
	linux-kernel@...r.kernel.org,
	linux-kernel-mentees@...ts.linux.dev,
	skhan@...uxfoundation.org,
	Suchit Karunakaran <suchitkarunakaran@...il.com>
Subject: [PATCH] perf tests: Fix lib path detection for non-x86 architectures

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@...il.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
-- 
2.50.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ