[PATCH RESEND i-g-t v4 14/31] tools/intel_stepping: link with minimal sub-libraries

Sebastian Brzezinka <[email protected]> Wed, 29 Jul 2026 13:03:31 +0200
Newsgroups org.freedesktop.lists.igt-dev
Message-ID <6dbd884db7b20357709c2c5ecc07a7bbb6b223b1.1785152675.git.sebastian.brzezinka@intel.com>
intel_stepping only needs the chipset tables and the small tool stub
support used by those helpers, not the full libigt.so stack.

Switch to linking against lib_igt_chipset, lib_igt_tools_stub and
libpciaccess.

ldd before: 35  (ldd | wc -l)
ldd after:   4  (ldd | wc -l)

Signed-off-by: Sebastian Brzezinka <[email protected]>
Acked-by: Ashutosh Dixit <[email protected]>
Reviewed-by: Krzysztof Niemiec <[email protected]>
Reviewed-by: Krzysztof Karas <[email protected]>
---
 tools/meson.build | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools/meson.build b/tools/meson.build
index 01400f53e..8eb346321 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -36,7 +36,6 @@ tools_progs = [
 	'intel_pm_rpm',
 	'intel_reg_checker',
 	'intel_residency',
-	'intel_stepping',
 	'intel_tiling_detect',
 	'intel_vbt_decode',
 	'intel_watermark',
@@ -70,6 +69,12 @@ executable('intel_gpu_frequency', 'intel_gpu_frequency.c',
 	   install_rpath : bindir_rpathdir,
 	   install : true)
 
+executable('intel_stepping', 'intel_stepping.c',
+	   dependencies : [lib_igt_chipset, lib_igt_tools_stub, lib_igt_drm_stub,
+	                    pciaccess, libdrm],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
-- 
2.53.0