mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kselftest: alsa: handle cross compilation
@ 2022-05-16 16:58 Antonio Terceiro
  2022-05-16 17:52 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Antonio Terceiro @ 2022-05-16 16:58 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Mark Brown, Shuah Khan
  Cc: alsa-devel, linux-kselftest, linux-kernel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] kselftest: alsa: handle cross compilation
  2022-05-16 16:58 [PATCH] kselftest: alsa: handle cross compilation Antonio Terceiro
@ 2022-05-16 17:52 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2022-05-16 17:52 UTC (permalink / raw)
  To: Antonio Terceiro
  Cc: Jaroslav Kysela, Takashi Iwai, Shuah Khan, alsa-devel,
	linux-kselftest, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 522 bytes --]

On Mon, May 16, 2022 at 01:58:56PM -0300, Antonio Terceiro wrote:
> 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.

Why does this only apply to the ALSA selftests?  There's a bunch of
kselftests that use unadorned pkg-config calls.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-16 17:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-16 16:58 [PATCH] kselftest: alsa: handle cross compilation Antonio Terceiro
2022-05-16 17:52 ` Mark Brown

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®