Skip to contentSkip to conversation

tests: use correct pkg-config when cross compiling

PATCH Applied Alyssa Ross 2 participants 2 messages Jan 23, 2024 – Jan 25, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests: use correct pkg-config when cross compiling

By convention, the PKG_CONFIG environment variable is used to tell build systems which pkg-config executable should be used. This is often used when cross compiling, where it might be set to something like "aarch64-unknown-linux-gnu-pkg-config".

---
 tests/run_tests.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/run_tests.sh +1 -1
index bb2ec95..3225a12 100755
@@ -32,7 +32,7 @@ if [ -n "$NO_YAML" ]; then
         no_yaml=false
     fi
 else
-    if pkg-config --atleast-version 0.2.3 yaml-0.1; then
+    if ${PKG_CONFIG:-pkg-config} --atleast-version 0.2.3 yaml-0.1; then
         no_yaml=false
     else
         no_yaml=true

base-commit: 95c74d71f0904235d44892627322f60a18c9a28c

Signature · 1 line
2.43.0
Applied
#1 lore raw
Quoted 6 lines · Alyssa Ross

By convention, the PKG_CONFIG environment variable is used to tell build systems which pkg-config executable should be used. This is often used when cross compiling, where it might be set to something like "aarch64-unknown-linux-gnu-pkg-config".

Applied, thanks.

Quoted 19 lines
---
 tests/run_tests.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/run_tests.sh +1 -1
index bb2ec95..3225a12 100755
@@ -32,7 +32,7 @@ if [ -n "$NO_YAML" ]; then
         no_yaml=false
     fi
 else
-    if pkg-config --atleast-version 0.2.3 yaml-0.1; then
+    if ${PKG_CONFIG:-pkg-config} --atleast-version 0.2.3 yaml-0.1; then
         no_yaml=false
     else
         no_yaml=true

base-commit: 95c74d71f0904235d44892627322f60a18c9a28c

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson