From: "Fabian Groffen" <grobian@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/, sys-devel/binutils-config/
Date: Fri, 27 Nov 2020 13:39:15 +0000 (UTC) [thread overview]
Message-ID: <1606484339.4b52e188057a6b59d3e48983f351bf44ae080081.grobian@gentoo> (raw)
commit: 4b52e188057a6b59d3e48983f351bf44ae080081
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 27 13:29:28 2020 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> 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 <grobian <AT> 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 <path> */
+ 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";
}
next reply other threads:[~2020-11-27 13:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-27 13:39 Fabian Groffen [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-04-06 14:36 [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/, sys-devel/binutils-config/ Fabian Groffen
2024-01-21 9:46 Fabian Groffen
2020-12-22 21:30 Fabian Groffen
2019-10-13 18:12 Fabian Groffen
2018-04-07 19:43 Fabian Groffen
2017-11-25 18:33 Fabian Groffen
2016-02-14 14:56 Fabian Groffen
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=1606484339.4b52e188057a6b59d3e48983f351bf44ae080081.grobian@gentoo \
--to=grobian@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