From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A236C158089 for ; Sat, 23 Sep 2023 12:56:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C8F222BC01B; Sat, 23 Sep 2023 12:56:13 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B06F92BC01B for ; Sat, 23 Sep 2023 12:56:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E9A9933D3CD for ; Sat, 23 Sep 2023 12:56:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1D507F25 for ; Sat, 23 Sep 2023 12:56:11 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1695473769.d57c266058fcfd2bc3f535a832ab86efde3fb0ab.sam@gentoo> Subject: [gentoo-commits] proj/crossdev:master commit in: wrappers/ X-VCS-Repository: proj/crossdev X-VCS-Files: wrappers/cross-pkg-config X-VCS-Directories: wrappers/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: d57c266058fcfd2bc3f535a832ab86efde3fb0ab X-VCS-Branch: master Date: Sat, 23 Sep 2023 12:56:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e422f97c-b751-4492-a4bb-2b6aa900c69c X-Archives-Hash: 882f8ccf13db8071345d57cc7ffe0b51 commit: d57c266058fcfd2bc3f535a832ab86efde3fb0ab Author: James Le Cuirot gentoo org> AuthorDate: Wed Sep 20 07:59:29 2023 +0000 Commit: Sam James gentoo org> CommitDate: Sat Sep 23 12:56:09 2023 +0000 URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=d57c2660 cross-pkg-config: Properly set PKG_CONFIG_SYSTEM_*_PATH variables Perhaps this was a difference between pkg-config and pkgconf, but we have not set PKG_CONFIG_SYSTEM_LIBRARY_PATH correctly since we began setting it in 2014. It should include the SYSROOT. We also never set PKG_CONFIG_SYSTEM_INCLUDE_PATH at all. These variables tell pkg-config not to emit paths that the toolchain would search in anyway. This helps to reduce the noise appearing in newly-installed .pc files. This change does assume that if you have set SYSROOT differently to the toolchain's default, then you have also added the --sysroot argument to your compiler flags. Neither Portage nor Gentoo currently do this for you. cross-boss does, but it's not an officially supported solution. The change could therefore potentially break things, but it's likely you'll run into other problems if you don't add --sysroot anyway. Signed-off-by: James Le Cuirot gentoo.org> Closes: https://github.com/gentoo/crossdev/pull/13 Signed-off-by: Sam James gentoo.org> wrappers/cross-pkg-config | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wrappers/cross-pkg-config b/wrappers/cross-pkg-config index 4e4da92..ba4d3ac 100755 --- a/wrappers/cross-pkg-config +++ b/wrappers/cross-pkg-config @@ -118,7 +118,9 @@ if [ -z "${libdir}" ] ; then libdir=${libdir##*/} fi : ${libdir:=lib} -export PKG_CONFIG_SYSTEM_LIBRARY_PATH="${PREFIX}/usr/${libdir}:${PREFIX}/${libdir}" +export \ + PKG_CONFIG_SYSTEM_LIBRARY_PATH="${PKG_CONFIG_ESYSROOT_DIR}/usr/${libdir}:${PKG_CONFIG_ESYSROOT_DIR}/${libdir}" \ + PKG_CONFIG_SYSTEM_INCLUDE_PATH="${PKG_CONFIG_ESYSROOT_DIR}/usr/include" # # Set the pkg-config search paths to our staging directory.