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 812EB1382C5 for ; Fri, 27 Nov 2020 13:39:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DD61AE07A5; Fri, 27 Nov 2020 13:39:17 +0000 (UTC) Received: from smtp.gentoo.org (dev.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 B347BE07A5 for ; Fri, 27 Nov 2020 13:39:17 +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 B359634127D for ; Fri, 27 Nov 2020 13:39:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6584A46B for ; Fri, 27 Nov 2020 13:39:15 +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: <1606484339.4b52e188057a6b59d3e48983f351bf44ae080081.grobian@gentoo> Subject: [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/, sys-devel/binutils-config/ X-VCS-Repository: repo/proj/prefix X-VCS-Files: sys-devel/binutils-config/binutils-config-5.1-r2.ebuild sys-devel/binutils-config/binutils-config-5.1-r3.ebuild sys-devel/binutils-config/files/ldwrapper.c X-VCS-Directories: sys-devel/binutils-config/ sys-devel/binutils-config/files/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 4b52e188057a6b59d3e48983f351bf44ae080081 X-VCS-Branch: master Date: Fri, 27 Nov 2020 13:39:15 +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: cd9314f5-e548-4d60-a969-3e1c76d4de47 X-Archives-Hash: ec96716cf4aeea5fc912d92d554ce609 commit: 4b52e188057a6b59d3e48983f351bf44ae080081 Author: Fabian Groffen gentoo org> AuthorDate: Fri Nov 27 13:29:28 2020 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Fri Nov 27 13:38:59 2020 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=4b52e188 sys-devel/binutils-config-5.1-r3: revbump for libsysroot support Big Sur (11.0) needs libsysroot support from the linker, so allow activating it. Package-Manager: Portage-3.0.8-prefix, Repoman-3.0.2 Signed-off-by: Fabian Groffen gentoo.org> ...-config-5.1-r2.ebuild => binutils-config-5.1-r3.ebuild} | 10 +++++++++- sys-devel/binutils-config/files/ldwrapper.c | 14 ++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/sys-devel/binutils-config/binutils-config-5.1-r2.ebuild b/sys-devel/binutils-config/binutils-config-5.1-r3.ebuild similarity index 84% rename from sys-devel/binutils-config/binutils-config-5.1-r2.ebuild rename to sys-devel/binutils-config/binutils-config-5.1-r3.ebuild index d104bf4fb7..fd26184271 100644 --- a/sys-devel/binutils-config/binutils-config-5.1-r2.ebuild +++ b/sys-devel/binutils-config/binutils-config-5.1-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -39,6 +39,13 @@ src_configure() { src_compile() { use prefix-guest || return + local extraargs=( ) + if [[ ${CHOST} == *-darwin* && ${CHOST##*-darwin} -ge 20 ]] ; then + # macOS Big Sur has an empty /usr/lib, so the linker really has + # to look into the SDK, for which it needs to be told where it + # is (symlinked right into our EPREFIX root as MacOSX.sdk) + extraargs+=( -DDARWIN_LD_SYSLIBROOT=1 ) + fi local args=( $(tc-getCC) ${CPPFLAGS} @@ -46,6 +53,7 @@ src_compile() { -o ldwrapper ${PN}-ldwrapper-${WRAPPER_REV}.c -DEPREFIX=\"${EPREFIX}\" -DCHOST=\"${CHOST}\" + "${extraargs[@]}" ${LDFLAGS} ) echo ${args[*]} diff --git a/sys-devel/binutils-config/files/ldwrapper.c b/sys-devel/binutils-config/files/ldwrapper.c index 216747da5c..75575f31f6 100644 --- a/sys-devel/binutils-config/files/ldwrapper.c +++ b/sys-devel/binutils-config/files/ldwrapper.c @@ -20,8 +20,9 @@ * ldwrapper: Prefix helper to inject -L and -R flags to the invocation * of ld. * - * On Darwin it adds -search_path_first to make sure the given paths are - * searched before the default search path. + * On Darwin it adds -search_paths_first to make sure the given paths are + * searched before the default search path, and sets -syslibroot + * starting from Big Sur 11.0. * On AIX it ensures -bsvr4 is the last argument. * The wrapper will inject -L entries for: * - EPREFIX/usr/CHOST/lib/gcc (when gcc) @@ -339,6 +340,11 @@ main(int argc, char *argv[]) /* add the 2 prefix paths (-L) and -search_paths_first */ newargc += 2 + 1; + +#ifdef DARWIN_LD_SYSLIBROOT + /* add -syslibroot */ + newargc += 2; +#endif } else { /* add the 4 paths we want (-L + -R) */ newargc += 8; @@ -380,6 +386,10 @@ main(int argc, char *argv[]) if (!is_cross && is_darwin) { /* inject this first to make the intention clear */ +#ifdef DARWIN_LD_SYSLIBROOT + newargv[j++] = "-syslibroot"; + newargv[j++] = EPREFIX "/MacOSX.sdk" +#endif newargv[j++] = "-search_paths_first"; }