public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
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/
Date: Sat, 13 Jan 2024 14:29:12 +0000 (UTC)	[thread overview]
Message-ID: <1705155770.fbcb941fc6fe8c31ceb219dc56127e62906ae520.grobian@gentoo> (raw)

commit:     fbcb941fc6fe8c31ceb219dc56127e62906ae520
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 13 14:22:50 2024 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sat Jan 13 14:22:50 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=fbcb941f

sys-devel/binutils-config: make ld arguments depending on OS release

This is somewhat shady, because we'd need the target ld's version, but
it's better to use the current platform version rather than the
requested platform version since the latter has nothing to do with which
linker is being used.

Not bumping the version, since existing installs don't have this issue,
and only new installs on Sanoma suffer from this, which never managed to
succeed, so basically don't exist yet.

Bug: https://bugs.gentoo.org/916291
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 sys-devel/binutils-config/files/ldwrapper.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sys-devel/binutils-config/files/ldwrapper.c b/sys-devel/binutils-config/files/ldwrapper.c
index a1639ca5aa..df29b04c96 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -208,6 +208,7 @@ main(int argc, char *argv[])
 	char ctarget[128];
 	char *darwin_dt = getenv("MACOSX_DEPLOYMENT_TARGET");
 	int darwin_dt_ver = 0;
+	int darwin_ld_trg_ver = 0;
 	char is_cross = 0;
 	char is_darwin = 0;
 	char darwin_use_rpath = 1;
@@ -222,6 +223,9 @@ main(int argc, char *argv[])
 #ifdef DARWIN_LD_DEFAULT_TARGET
 	if (darwin_dt == NULL)
 		darwin_dt = DARWIN_LD_DEFAULT_TARGET;
+	darwin_ld_trg_ver = (int)strtol(DARWIN_LD_DEFAULT_TARGET, &p, 10) * 100;
+	if (*p == '.')
+		darwin_ld_trg_ver += (int)strtol(p + 1, &p, 10);
 #endif
 
 	/* two ways to determine CTARGET from argv[0]:
@@ -403,7 +407,7 @@ main(int argc, char *argv[])
 #ifdef DARWIN_LD_SYSLIBROOT
 		/* bug #910277: transform into platform_version arg for newer
 		 * targets */
-		if (darwin_dt_ver >= 1200) {
+		if (darwin_ld_trg_ver >= 1200) {
 			newargv[j++] = "-platform_version";
 			newargv[j++] = "macos";
 			newargv[j++] = darwin_dt;


             reply	other threads:[~2024-01-13 14:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-13 14:29 Fabian Groffen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-09-26 19:38 [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/ Fabian Groffen
2020-11-27 13:57 Fabian Groffen
2020-11-27 13:39 Fabian Groffen
2018-01-31  9:50 Fabian Groffen
2017-12-29 14:56 Fabian Groffen
2017-12-27  9:05 Fabian Groffen
2017-12-25 19:47 Fabian Groffen
2017-11-29 15:21 Fabian Groffen
2017-11-25 18:33 Fabian Groffen
2016-05-15 16:44 Fabian Groffen
2016-05-13 12:14 Fabian Groffen
2016-05-13 12:14 Fabian Groffen
2016-05-13 12:14 Fabian Groffen
2016-04-18  8:07 Michael Haubenwallner
2016-02-15 14:30 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=1705155770.fbcb941fc6fe8c31ceb219dc56127e62906ae520.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