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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 821681382C5 for ; Sat, 28 Nov 2020 19:37:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D1ACAE0801; Sat, 28 Nov 2020 19:37:05 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BC92BE0801 for ; Sat, 28 Nov 2020 19:37:05 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A8501341572 for ; Sat, 28 Nov 2020 19:37:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 286133FB for ; Sat, 28 Nov 2020 19:37:03 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1606592168.c3a69ee41aa0dd40342e05c7e275f82f31744ae1.grobian@gentoo> Subject: [gentoo-commits] proj/portage:prefix commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/misc-functions.sh X-VCS-Directories: bin/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: c3a69ee41aa0dd40342e05c7e275f82f31744ae1 X-VCS-Branch: prefix Date: Sat, 28 Nov 2020 19:37:03 +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: 8bf5e696-962f-4d3b-adc0-be316bdf3c49 X-Archives-Hash: e3610f3babbcd4100d479f0404bbc324 commit: c3a69ee41aa0dd40342e05c7e275f82f31744ae1 Author: Fabian Groffen gentoo org> AuthorDate: Sat Nov 28 19:36:08 2020 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sat Nov 28 19:36:08 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=c3a69ee4 bin/misc-functions: resolve libraries from macOS SDK if configured Bug: https://bugs.gentoo.org/757240 Signed-off-by: Fabian Groffen gentoo.org> bin/misc-functions.sh | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index d01a8edb1..8f62cb7f1 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -360,9 +360,27 @@ install_qa_check_macho() { elif [[ ${lib} == ${S}* ]] ; then eqawarn "QA Notice: install_name references \${S}: ${lib} in ${obj}" [[ -z ${ignore} ]] && touch "${T}"/.install_name_check_failed - elif ! install_name_is_relative ${lib} && [[ ! -e ${lib} && ! -e ${D}${lib} ]] ; then - eqawarn "QA Notice: invalid reference to ${lib} in ${obj}" - [[ -z ${ignore} ]] && touch "${T}"/.install_name_check_failed + elif ! install_name_is_relative ${lib} ; then + local isok=no + if [[ -e ${lib} || -e ${D}${lib} ]] ; then + isok=yes # yay, we're ok + elif [[ -e "${EROOT}"/MacOSX.sdk ]] ; then + # trigger SDK mode, at least since Big Sur (11.0) + # there are no libraries in /usr/lib any more, but + # there are references too it (some library cache is + # in place), yet we can validate it sort of is sane + # by looking at the SDK metacaches, TAPI-files, .tbd + # text versions of libraries, so just look there + local tbd=${lib%.*}.tbd + if [[ -e ${EROOT}/MacOSX.sdk/${tbd} ]] ; then + isok=yes # it's in the SDK, so ok + fi + fi + if [[ ${isok} == no ]] ; then + eqawarn "QA Notice: invalid reference to ${lib} in ${obj}" + [[ -z ${ignore} ]] && \ + touch "${T}"/.install_name_check_failed + fi fi done