Commit dea82cdb by Rainer Orth Committed by Rainer Orth

Cleanup Solaris linker version checks

	* acinclude.m4 (gcc_AC_INITFINI_ARRAY): Don't require
	gcc_SUN_LD_VERSION.
	(gcc_GAS_CHECK_FEATURE): Remove.
	* configure.ac (ld_vers) <*-*-solaris2*>: Move comments from
	gcc_AC_INITFINI_ARRAY here.  Update for Solaris 11.4 changes.
	* configure: Regenerate.

From-SVN: r254340
parent 5b5905bb
2017-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* acinclude.m4 (gcc_AC_INITFINI_ARRAY): Don't require
gcc_SUN_LD_VERSION.
(gcc_GAS_CHECK_FEATURE): Remove.
* configure.ac (ld_vers) <*-*-solaris2*>: Move comments from
gcc_AC_INITFINI_ARRAY here. Update for Solaris 11.4 changes.
* configure: Regenerate.
2017-11-02 Claudiu Zissulescu <claziss@synopsys.com> 2017-11-02 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (hwloop_optimize): Account for empty * config/arc/arc.c (hwloop_optimize): Account for empty
...@@ -277,8 +277,7 @@ fi ...@@ -277,8 +277,7 @@ fi
fi]) fi])
AC_DEFUN([gcc_AC_INITFINI_ARRAY], AC_DEFUN([gcc_AC_INITFINI_ARRAY],
[AC_REQUIRE([gcc_SUN_LD_VERSION])dnl [AC_ARG_ENABLE(initfini-array,
AC_ARG_ENABLE(initfini-array,
[ --enable-initfini-array use .init_array/.fini_array sections], [ --enable-initfini-array use .init_array/.fini_array sections],
[], [ [], [
AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support, AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support,
...@@ -556,43 +555,6 @@ if test $[$2] != yes; then ...@@ -556,43 +555,6 @@ if test $[$2] != yes; then
$8 $8
fi])]) fi])])
dnl gcc_SUN_LD_VERSION
dnl
dnl Determines Sun linker version numbers, setting gcc_cv_sun_ld_vers to
dnl the complete version number and gcc_cv_sun_ld_vers_{major, minor} to
dnl the corresponding fields.
dnl
dnl ld and ld.so.1 are guaranteed to be updated in lockstep, so ld version
dnl numbers can be used in ld.so.1 feature checks even if a different
dnl linker is configured.
dnl
AC_DEFUN([gcc_SUN_LD_VERSION],
[changequote(,)dnl
if test "x${build}" = "x${target}" && test "x${build}" = "x${host}"; then
case "${target}" in
*-*-solaris2*)
#
# Solaris 2 ld -V output looks like this for a regular version:
#
# ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1699
#
# but test versions add stuff at the end:
#
# ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1701:onnv-ab196087-6931056-03/25/10
#
gcc_cv_sun_ld_ver=`/usr/ccs/bin/ld -V 2>&1`
if echo "$gcc_cv_sun_ld_ver" | grep 'Solaris Link Editors' > /dev/null; then
gcc_cv_sun_ld_vers=`echo $gcc_cv_sun_ld_ver | sed -n \
-e 's,^.*: 5\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\1,p'`
gcc_cv_sun_ld_vers_major=`expr "$gcc_cv_sun_ld_vers" : '\([0-9]*\)'`
gcc_cv_sun_ld_vers_minor=`expr "$gcc_cv_sun_ld_vers" : '[0-9]*\.\([0-9]*\)'`
fi
;;
esac
fi
changequote([,])dnl
])
dnl GCC_TARGET_TEMPLATE(KEY) dnl GCC_TARGET_TEMPLATE(KEY)
dnl ------------------------ dnl ------------------------
dnl Define KEY as a valid configure key on the target machine. dnl Define KEY as a valid configure key on the target machine.
......
...@@ -22785,15 +22785,25 @@ if test $in_tree_ld != yes ; then ...@@ -22785,15 +22785,25 @@ if test $in_tree_ld != yes ; then
else else
case "${target}" in case "${target}" in
*-*-solaris2*) *-*-solaris2*)
# See acinclude.m4 (gcc_SUN_LD_VERSION) for the version number # Solaris 2 ld -V output looks like this for a regular version:
# format.
# #
# Don't reuse gcc_gv_sun_ld_vers_* in case a linker other than # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1699
# /usr/ccs/bin/ld has been configured. #
# but test versions add stuff at the end:
#
# ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1701:onnv-ab196087-6931056-03/25/10
#
# In Solaris 11.4, this was changed to
#
# ld: Solaris ELF Utilities: 11.4-1.3123
#
# ld and ld.so.1 are guaranteed to be updated in lockstep, so ld version
# numbers can be used in ld.so.1 feature checks even if a different
# linker is configured.
ld_ver=`$gcc_cv_ld -V 2>&1` ld_ver=`$gcc_cv_ld -V 2>&1`
if echo "$ld_ver" | grep 'Solaris Link Editors' > /dev/null; then if echo "$ld_ver" | $EGREP 'Solaris Link Editors|Solaris ELF Utilities' > /dev/null; then
ld_vers=`echo $ld_ver | sed -n \ ld_vers=`echo $ld_ver | sed -n \
-e 's,^.*: 5\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\1,p'` -e 's,^.*: \(5\|1[0-9]\)\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\2,p'`
ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
fi fi
...@@ -22917,29 +22927,6 @@ fi ...@@ -22917,29 +22927,6 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_ro_rw_mix" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_ro_rw_mix" >&5
$as_echo "$gcc_cv_ld_ro_rw_mix" >&6; } $as_echo "$gcc_cv_ld_ro_rw_mix" >&6; }
if test "x${build}" = "x${target}" && test "x${build}" = "x${host}"; then
case "${target}" in
*-*-solaris2*)
#
# Solaris 2 ld -V output looks like this for a regular version:
#
# ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1699
#
# but test versions add stuff at the end:
#
# ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1701:onnv-ab196087-6931056-03/25/10
#
gcc_cv_sun_ld_ver=`/usr/ccs/bin/ld -V 2>&1`
if echo "$gcc_cv_sun_ld_ver" | grep 'Solaris Link Editors' > /dev/null; then
gcc_cv_sun_ld_vers=`echo $gcc_cv_sun_ld_ver | sed -n \
-e 's,^.*: 5\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\1,p'`
gcc_cv_sun_ld_vers_major=`expr "$gcc_cv_sun_ld_vers" : '\([0-9]*\)'`
gcc_cv_sun_ld_vers_minor=`expr "$gcc_cv_sun_ld_vers" : '[0-9]*\.\([0-9]*\)'`
fi
;;
esac
fi
# Check whether --enable-initfini-array was given. # Check whether --enable-initfini-array was given.
if test "${enable_initfini_array+set}" = set; then : if test "${enable_initfini_array+set}" = set; then :
enableval=$enable_initfini_array; enableval=$enable_initfini_array;
......
...@@ -2587,15 +2587,25 @@ if test $in_tree_ld != yes ; then ...@@ -2587,15 +2587,25 @@ if test $in_tree_ld != yes ; then
else else
case "${target}" in case "${target}" in
*-*-solaris2*) *-*-solaris2*)
# See acinclude.m4 (gcc_SUN_LD_VERSION) for the version number # Solaris 2 ld -V output looks like this for a regular version:
# format.
# #
# Don't reuse gcc_gv_sun_ld_vers_* in case a linker other than # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1699
# /usr/ccs/bin/ld has been configured. #
# but test versions add stuff at the end:
#
# ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1701:onnv-ab196087-6931056-03/25/10
#
# In Solaris 11.4, this was changed to
#
# ld: Solaris ELF Utilities: 11.4-1.3123
#
# ld and ld.so.1 are guaranteed to be updated in lockstep, so ld version
# numbers can be used in ld.so.1 feature checks even if a different
# linker is configured.
ld_ver=`$gcc_cv_ld -V 2>&1` ld_ver=`$gcc_cv_ld -V 2>&1`
if echo "$ld_ver" | grep 'Solaris Link Editors' > /dev/null; then if echo "$ld_ver" | $EGREP 'Solaris Link Editors|Solaris ELF Utilities' > /dev/null; then
ld_vers=`echo $ld_ver | sed -n \ ld_vers=`echo $ld_ver | sed -n \
-e 's,^.*: 5\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\1,p'` -e 's,^.*: \(5\|1[0-9]\)\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\2,p'`
ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment