aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2023-08-17 10:14:49 +0200
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2023-08-17 10:14:49 +0200
commit0beac9209f0ae230b34ad31e76e7b0b633a5fb21 (patch)
treed01cd348e634c631bace61070d7501eaa1f8fe88
parent51d702f3baf73aa4016b9798045d13318074ca1e (diff)
downloadgcc-0beac9209f0ae230b34ad31e76e7b0b633a5fb21.zip
gcc-0beac9209f0ae230b34ad31e76e7b0b633a5fb21.tar.gz
gcc-0beac9209f0ae230b34ad31e76e7b0b633a5fb21.tar.bz2
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.
-rwxr-xr-xgcc/configure3
-rw-r--r--gcc/configure.ac3
2 files changed, 4 insertions, 2 deletions
diff --git a/gcc/configure b/gcc/configure
index db5812d..07e8a64 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -30552,7 +30552,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 46e58a2..62c31d8 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -6246,7 +6246,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)