Skip to content

Commit 7f56a8e

Browse files
committed
configure, Darwin: Recognise new naming for Xcode ld.
The latest editions of XCode have altered the identify reported by 'ld -v' (again). This means that GCC configure no longer detects the version. Fixed by adding the new name to the set checked. gcc/ChangeLog: * configure: Regenerate. * configure.ac: Recognise PROJECT:ld-mmmm.nn.aa as an identifier for Darwin's static linker. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
1 parent 9cf6b52 commit 7f56a8e

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

gcc/configure

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3948,7 +3948,7 @@ if test x"${DEFAULT_LINKER+set}" = x"set"; then
39483948
as_fn_error $? "cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" "$LINENO" 5
39493949
elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
39503950
gnu_ld_flag=yes
3951-
elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep ld64- > /dev/null; then
3951+
elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep 'PROJECT:ld\(64\)*-' > /dev/null; then
39523952
ld64_flag=yes
39533953
fi
39543954

@@ -32730,8 +32730,9 @@ $as_echo "$gcc_cv_ld64_major" >&6; }
3273032730
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker version" >&5
3273132731
$as_echo_n "checking linker version... " >&6; }
3273232732
if test x"${gcc_cv_ld64_version}" = x; then
32733-
gcc_cv_ld64_version=`$gcc_cv_ld -v 2>&1 | $EGREP 'ld64|dyld' \
32734-
| sed -e 's/.*ld64-//' -e 's/.*dyld-//'| awk '{print $1}'`
32733+
gcc_cv_ld64_version=`$gcc_cv_ld -v 2>&1 | $EGREP 'ld64|dyld|PROJECT:ld' \
32734+
| sed -e 's/.*ld64-//' -e 's/.*dyld-//' -e 's/.*PROJECT:ld-//' \
32735+
| awk '{print $1}'`
3273532736
fi
3273632737
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld64_version" >&5
3273732738
$as_echo "$gcc_cv_ld64_version" >&6; }

gcc/configure.ac

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ if test x"${DEFAULT_LINKER+set}" = x"set"; then
358358
AC_MSG_ERROR([cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER])
359359
elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
360360
gnu_ld_flag=yes
361-
elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep ld64- > /dev/null; then
361+
elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep 'PROJECT:ld\(64\)*-' > /dev/null; then
362362
ld64_flag=yes
363363
fi
364364
AC_DEFINE_UNQUOTED(DEFAULT_LINKER,"$DEFAULT_LINKER",
@@ -6418,8 +6418,9 @@ if test x"$ld64_flag" = x"yes"; then
64186418
# If the version was not specified, try to find it.
64196419
AC_MSG_CHECKING(linker version)
64206420
if test x"${gcc_cv_ld64_version}" = x; then
6421-
gcc_cv_ld64_version=`$gcc_cv_ld -v 2>&1 | $EGREP 'ld64|dyld' \
6422-
| sed -e 's/.*ld64-//' -e 's/.*dyld-//'| awk '{print $1}'`
6421+
gcc_cv_ld64_version=`$gcc_cv_ld -v 2>&1 | $EGREP 'ld64|dyld|PROJECT:ld' \
6422+
| sed -e 's/.*ld64-//' -e 's/.*dyld-//' -e 's/.*PROJECT:ld-//' \
6423+
| awk '{print $1}'`
64236424
fi
64246425
AC_MSG_RESULT($gcc_cv_ld64_version)
64256426

0 commit comments

Comments
 (0)