From: "Mike Gilbert" <floppym@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/crossdev:master commit in: wrappers/
Date: Wed, 29 Jan 2025 17:42:27 +0000 (UTC) [thread overview]
Message-ID: <1738084274.15280e942a3f6490c62b2978e0b951f9cbb9066d.floppym@gentoo> (raw)
commit: 15280e942a3f6490c62b2978e0b951f9cbb9066d
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 28 17:09:02 2025 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Jan 28 17:11:14 2025 +0000
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=15280e94
cross-pkg-config: call ${CBUILD}-pkg-config when available
This avoids calling plain pkg-config in environments where that binary
has been blacklisted.
Bug: https://bugs.gentoo.org/948948
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
wrappers/cross-pkg-config | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/wrappers/cross-pkg-config b/wrappers/cross-pkg-config
index 9bff474..0b417b6 100755
--- a/wrappers/cross-pkg-config
+++ b/wrappers/cross-pkg-config
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright 2008-2022 Gentoo Authors
+# Copyright 2008-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
#
@@ -20,8 +20,13 @@ error() {
exit 1
}
+REAL_PKG_CONFIG="${CBUILD}${CBUILD:+-}pkg-config"
+if ! command -v "${REAL_PKG_CONFIG}" >/dev/null; then
+ REAL_PKG_CONFIG=pkg-config
+fi
+
# abort infinite loop due to misconfiguration
-[ "${0##*/}" = "pkg-config" ] && error "aborting infinite loop! (make sure to delete uClinux-dist/tools/pkg-config)"
+[ "${0##*/}" = "${REAL_PKG_CONFIG}" ] && error "aborting infinite loop! (make sure to delete uClinux-dist/tools/pkg-config)"
#
# Allow very basic checks. This is not very sophisticated, but should get the
@@ -30,7 +35,7 @@ error() {
case $1 in
--about|--help|--version)
- exec pkg-config "$@"
+ exec "${REAL_PKG_CONFIG}" "$@"
;;
esac
@@ -132,7 +137,7 @@ PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR}${PKG_CONFIG_LIBDIR:+:}${PKG_CONFIG_ESYSR
# Sanity check the output to catch common errors that do not
# cause failures until much later on.
#
-output=$(pkg-config "$@")
+output=$("${REAL_PKG_CONFIG}" "$@")
ret=$?
# We turn the output into a newline separate string of options, then use grep
@@ -145,7 +150,7 @@ bad_lines=$(
)
if [ -n "${bad_lines}" ] ; then
warn "### falling down so here is a dump state ######"
- pkg-config --debug "$@" 1>&2
+ "${REAL_PKG_CONFIG}" --debug "$@" 1>&2
warn "### end of dump ###############################"
warn "### suspicious compile flags dumped here ######"
printf "%s\n" "${bad_lines}"
next reply other threads:[~2025-01-29 17:42 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-29 17:42 Mike Gilbert [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-05-24 17:12 [gentoo-commits] proj/crossdev:master commit in: wrappers/ Mike Gilbert
2024-11-30 2:08 Sam James
2024-09-22 8:35 James Le Cuirot
2024-05-04 11:58 Sam James
2024-01-08 14:28 Sam James
2023-10-15 4:23 Matt Turner
2023-09-23 12:56 Sam James
2023-06-16 20:21 Mike Gilbert
2022-12-27 16:06 Sam James
2022-08-18 21:57 Sam James
2022-08-18 21:57 Sam James
2022-01-13 8:20 Mike Frysinger
2022-01-13 8:20 Mike Frysinger
2021-11-26 19:02 Mike Frysinger
2021-10-27 8:55 Mike Frysinger
2021-06-21 21:23 Sergei Trofimovich
2021-01-17 8:09 Sergei Trofimovich
2019-08-30 7:32 Sergei Trofimovich
2019-07-21 13:41 James Le Cuirot
2019-07-12 7:24 Sergei Trofimovich
2019-03-18 22:54 Sergei Trofimovich
2019-03-11 22:13 Sergei Trofimovich
2018-10-20 20:08 Sergei Trofimovich
2018-04-05 6:56 Sergei Trofimovich
2018-03-24 15:13 Sergei Trofimovich
2018-03-10 13:07 Sergei Trofimovich
2017-12-30 22:37 Sergei Trofimovich
2017-12-30 17:45 Sergei Trofimovich
2016-01-16 8:22 Mike Frysinger
2015-07-23 3:47 Mike Frysinger
2014-10-31 1:56 Mike Frysinger
2014-10-31 1:56 Mike Frysinger
2014-10-31 0:52 Mike Frysinger
2014-09-18 16:52 Mike Frysinger
2014-09-17 21:41 Mike Frysinger
2014-07-29 6:07 ` Mike Frysinger
2014-09-17 21:41 Mike Frysinger
2014-09-17 21:41 Mike Frysinger
2014-07-29 6:07 ` Mike Frysinger
2014-03-27 6:43 Mike Frysinger
2014-01-18 19:37 Mike Frysinger
2013-12-23 3:06 Mike Frysinger
2013-01-28 22:51 Mike Frysinger
2012-02-27 23:13 Mike Frysinger
2011-10-18 17:36 Mike Frysinger
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=1738084274.15280e942a3f6490c62b2978e0b951f9cbb9066d.floppym@gentoo \
--to=floppym@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/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