From: "Ricardo B. Marliere" <rbmarliere@gmail.com>
To: broonie@kernel.org, skhan@linuxfoundation.org
Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
"Ricardo B. Marliere" <rbmarliere@gmail.com>
Subject: [PATCH] selftests: alsa: make LDLIBS consistent
Date: Tue, 22 Aug 2023 10:15:45 -0300 [thread overview]
Message-ID: <20230822131544.38152-1-rbmarliere@gmail.com> (raw)
In kselftest_deps.sh script, the level 3 parser is broken for the alsa
subsystem Makefile.
Output before patch:
$ ./kselftest_deps.sh gcc alsa
========================================================
Kselftest Dependency Check for [./kselftest_deps.sh gcc alsa] results...
========================================================
Checked tests defining LDLIBS dependencies
--------------------------------------------------------
Total tests with Dependencies:
6 Pass: 2 Fail: 4
--------------------------------------------------------
PASS: alsa/Makefile dependency check passed -lasound
PASS: alsa/Makefile dependency check passed -lpthread
--------------------------------------------------------
Targets passed build dependency check on system:
alsa
--------------------------------------------------------
FAIL: alsa/Makefile dependency check: $(shell
FAIL: alsa/Makefile dependency check: pkg-config
FAIL: alsa/Makefile dependency check: --libs
FAIL: alsa/Makefile dependency check: alsa)
--------------------------------------------------------
Targets failed build dependency check on system:
alsa
--------------------------------------------------------
Missing libraries system
$(shell alsa) --libs pkg-config
--------------------------------------------------------
========================================================
Output after patch:
$ ./kselftest_deps.sh gcc alsa
========================================================
Kselftest Dependency Check for [./kselftest_deps.sh gcc alsa] results...
========================================================
Checked tests defining LDLIBS dependencies
--------------------------------------------------------
Total tests with Dependencies:
2 Pass: 2 Fail: 0
--------------------------------------------------------
PASS: alsa/Makefile dependency check passed -lasound
PASS: alsa/Makefile dependency check passed -lpthread
--------------------------------------------------------
Targets passed build dependency check on system:
alsa
--------------------------------------------------------
========================================================
Signed-off-by: Ricardo B. Marliere <rbmarliere@gmail.com>
---
tools/testing/selftests/alsa/Makefile | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests/alsa/Makefile b/tools/testing/selftests/alsa/Makefile
index 5af9ba8a4645..b5670049c4e5 100644
--- a/tools/testing/selftests/alsa/Makefile
+++ b/tools/testing/selftests/alsa/Makefile
@@ -2,13 +2,13 @@
#
CFLAGS += $(shell pkg-config --cflags alsa)
-LDLIBS += $(shell pkg-config --libs alsa)
-ifeq ($(LDLIBS),)
-LDLIBS += -lasound
+VAR_LDLIBS += $(shell pkg-config --libs alsa)
+ifeq ($(VAR_LDLIBS),)
+VAR_LDLIBS += -lasound
endif
CFLAGS += -L$(OUTPUT) -Wl,-rpath=./
-LDLIBS+=-lpthread
+VAR_LDLIBS+=-lpthread
OVERRIDE_TARGETS = 1
@@ -21,7 +21,7 @@ TEST_FILES := conf.d pcm-test.conf
include ../lib.mk
$(OUTPUT)/libatest.so: conf.c alsa-local.h
- $(CC) $(CFLAGS) -shared -fPIC $< $(LDLIBS) -o $@
+ $(CC) $(CFLAGS) -shared -fPIC $< $(VAR_LDLIBS) -o $@
$(OUTPUT)/%: %.c $(TEST_GEN_PROGS_EXTENDED) alsa-local.h
- $(CC) $(CFLAGS) $< $(LDLIBS) -latest -o $@
+ $(CC) $(CFLAGS) $< $(VAR_LDLIBS) -latest -o $@
--
2.40.1
next reply other threads:[~2023-08-22 13:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-22 13:15 Ricardo B. Marliere [this message]
2023-08-22 14:05 ` Mark Brown
2023-08-22 21:19 ` Ricardo Marliere
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=20230822131544.38152-1-rbmarliere@gmail.com \
--to=rbmarliere@gmail.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=skhan@linuxfoundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®