From a1f5ed5e8f866cd904e439b3792ac7505895f7f3 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Sat, 21 Sep 2024 22:35:27 +0100 Subject: cross-pkg-config: Don't unset PKG_CONFIG_ALLOW_SYSTEM_CFLAGS/LIBS These variables control whether pkg-config returns flags to search directories that the toolchain would search by default anyway. Rust's pkg-config-rs enables them by default, and some crates expect flags to always be returned, even if they are technically unnecessary. Unsetting these variables in the wrapper therefore breaks some crates. Having seen how this works in detail, it would be fruitless to ask upstream to change it. These lines were originally added at a time when we expected other non-Gentoo-based distributions to use crossdev. That didn't happen. Gentoo itself doesn't set these variables anywhere that I can see. Even if they were set, they are unlikely to break anything in practise now that our cross builds are better behaved than they used to be. Bug: https://bugs.gentoo.org/939334 Signed-off-by: James Le Cuirot --- wrappers/cross-pkg-config | 2 -- 1 file changed, 2 deletions(-) diff --git a/wrappers/cross-pkg-config b/wrappers/cross-pkg-config index eb4047f..9bff474 100755 --- a/wrappers/cross-pkg-config +++ b/wrappers/cross-pkg-config @@ -103,8 +103,6 @@ export PKG_CONFIG_FDO_SYSROOT_RULES=1 # Time to pull a captain planet on them. # unset PKG_CONFIG_PATH -unset PKG_CONFIG_ALLOW_SYSTEM_CFLAGS -unset PKG_CONFIG_ALLOW_SYSTEM_LIBS # # Try and figure out the appropriate libdir for this target. -- cgit v1.2.3-65-gdbad