mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Antonio Terceiro <antonio.terceiro@linaro.org>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Mark Brown <broonie@kernel.org>, Shuah Khan <shuah@kernel.org>
Cc: alsa-devel@alsa-project.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] kselftest: alsa: handle cross compilation
Date: Mon, 16 May 2022 13:58:56 -0300	[thread overview]
Message-ID: <20220516165856.401452-1-antonio.terceiro@linaro.org> (raw)

Calling just `pkg-config` is adequate for native builds, but finding the
foreign libraries with pkg-config needs pkg-config to be called via its
architecture-specific wrapper. This works in Debian, where there is a
corresponding *-pkg-config wrapper script for each enabled foreign
architecture, just like there are *-gcc, *-ld.

Signed-off-by: Antonio Terceiro <antonio.terceiro@linaro.org>
---
 tools/testing/selftests/alsa/Makefile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/alsa/Makefile b/tools/testing/selftests/alsa/Makefile
index f64d9090426d..f5675b3c929d 100644
--- a/tools/testing/selftests/alsa/Makefile
+++ b/tools/testing/selftests/alsa/Makefile
@@ -1,8 +1,10 @@
 # SPDX-License-Identifier: GPL-2.0
 #
 
-CFLAGS += $(shell pkg-config --cflags alsa)
-LDLIBS += $(shell pkg-config --libs alsa)
+PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config
+
+CFLAGS += $(shell $(PKG_CONFIG) --cflags alsa)
+LDLIBS += $(shell $(PKG_CONFIG) --libs alsa)
 
 TEST_GEN_PROGS := mixer-test
 
-- 
2.35.1


             reply	other threads:[~2022-05-16 16:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16 16:58 Antonio Terceiro [this message]
2022-05-16 17:52 ` Mark Brown

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=20220516165856.401452-1-antonio.terceiro@linaro.org \
    --to=antonio.terceiro@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=shuah@kernel.org \
    --cc=tiwai@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 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®