public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Iain D Sandoe <iains@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-11359] build: Allow for Xcode 15 ld -v output Date: Wed, 24 Apr 2024 18:40:11 +0000 (GMT) [thread overview] Message-ID: <20240424184011.EC741385840D@sourceware.org> (raw) https://gcc.gnu.org/g:6e01c09e6bb841a31165e3a793628c847a0652c0 commit r11-11359-g6e01c09e6bb841a31165e3a793628c847a0652c0 Author: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> Date: Thu Aug 17 10:14:49 2023 +0200 build: Allow for Xcode 15 ld -v output Since Xcode 15 beta 6, ld -v output differs from previous versions: * macOS 13/Xcode 14: @(#)PROGRAM:ld PROJECT:ld64-857.1 * macOS 14/Xcode 15: @(#)PROGRAM:ld PROJECT:dyld-1015.1 configure cannot handle the new form, so LD64_VERSION isn't set. This patch fixes this. The autoconf manual states that sed doesn't portably support alternation, so I'm using two separate expressions to extract the version number. Tested on x86_64-apple-darwin23.0.0. 2023-08-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> gcc: * configure.ac (gcc_cv_ld64_version): Allow for dyld in ld -v output. * configure: Regenerate. (cherry picked from commit 0beac9209f0ae230b34ad31e76e7b0b633a5fb21) Diff: --- gcc/configure | 3 ++- gcc/configure.ac | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/configure b/gcc/configure index 0b9c7451231..bf0bd5f428d 100755 --- a/gcc/configure +++ b/gcc/configure @@ -30733,7 +30733,8 @@ $as_echo "$gcc_cv_ld64_major" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker version" >&5 $as_echo_n "checking linker version... " >&6; } if test x"${gcc_cv_ld64_version}" = x; then - gcc_cv_ld64_version=`$gcc_cv_ld -v 2>&1 | grep ld64 | sed s/.*ld64-// | awk '{print $1}'` + gcc_cv_ld64_version=`$gcc_cv_ld -v 2>&1 | $EGREP 'ld64|dyld' \ + | sed -e 's/.*ld64-//' -e 's/.*dyld-//'| awk '{print $1}'` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld64_version" >&5 $as_echo "$gcc_cv_ld64_version" >&6; } diff --git a/gcc/configure.ac b/gcc/configure.ac index 2bf0e8a12b7..d52104fbd41 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -6383,7 +6383,8 @@ if test x"$ld64_flag" = x"yes"; then # If the version was not specified, try to find it. AC_MSG_CHECKING(linker version) if test x"${gcc_cv_ld64_version}" = x; then - gcc_cv_ld64_version=`$gcc_cv_ld -v 2>&1 | grep ld64 | sed s/.*ld64-// | awk '{print $1}'` + gcc_cv_ld64_version=`$gcc_cv_ld -v 2>&1 | $EGREP 'ld64|dyld' \ + | sed -e 's/.*ld64-//' -e 's/.*dyld-//'| awk '{print $1}'` fi AC_MSG_RESULT($gcc_cv_ld64_version)
reply other threads:[~2024-04-24 18:40 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240424184011.EC741385840D@sourceware.org \ --to=iains@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).