All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avinesh Kumar via ltp <ltp@lists.linux.it>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] build: Build libltp before 'make modules'
Date: Wed, 25 Nov 2026 09:47:45 +0100	[thread overview]
Message-ID: <20261125084746.122593-1-avinesh.kumar@suse.com> (raw)

From: Avinesh Kumar <avinesh.kumar@suse.com>

Since 3cb6144e0834, libltp.a is only built on demand when make is
started inside testcases/. 'make modules' runs each module directory in
a sub-make, so on a clean tree the userspace binaries there (acpi,
uaccess, fw_load, init_module, ...) fail to link with
"cannot find -lltp".

Make 'modules' depend on lib-all, as 'test' already does, so libltp.a is
built once before any module directory is entered.

Fixes: 3cb6144e0834 ("build: Build shared libraries once when make runs in testcases/")
Signed-off-by: Avinesh Kumar <avinesh.kumar@suse.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 0abb5c6b4f67..e2c8bf37bf29 100644
--- a/Makefile
+++ b/Makefile
@@ -222,7 +222,7 @@ MODULE_DIRS :=  $(shell \
 
 
 .PHONY: modules modules-clean modules-install
-modules:
+modules: lib-all
 	@$(foreach dir,$(MODULE_DIRS),\
 		echo "Build $(dir)";\
 		$(MAKE) -C $(dir) || exit $$?; \
-- 
2.56.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

             reply	other threads:[~2026-11-25  8:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25  8:47 Avinesh Kumar via ltp [this message]
2026-11-25  9:08 ` [LTP] [PATCH] build: Build libltp before 'make modules' Li Wang

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=20261125084746.122593-1-avinesh.kumar@suse.com \
    --to=ltp@lists.linux.it \
    --cc=avinesh.kumar@suse.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.