Hi!

On Mon, 12 Mar 2012 18:44:24 +0100, Rainer Orth <r...@cebitec.uni-bielefeld.de> 
wrote:
> 2012-03-11  Rainer Orth  <r...@cebitec.uni-bielefeld.de>

>       gcc:
>       * config.gcc (enable_obsolete): Remove *-*-solaris2.8*.
>       (*-*-solaris2.[0-8], *-*-solaris2.[0-8].*): Mark unsupported.
>       (i[34567]86-*-solaris2*, x86_64-*-solaris2.1[0-9]*): Remove
>       Solaris 8 support.
>       * configure.ac (gcc_cv_ld_hidden): Remove *-*-solaris2.8*.
>       (ld_tls_support): Remove Solaris 8 references.
>       (lwp_dir, lwp_spec): Remove support for alternate thread library.
>       * acinclude.m4 (gcc_cv_initfini_array): Remove *-*-solaris2.*
>       tests.
>       * configure: Regenerate.
>       * config.in: Regenerate.

> --- a/gcc/acinclude.m4
> +++ b/gcc/acinclude.m4
> @@ -461,23 +461,7 @@ changequote([,])dnl
>  #  error The C library not known to support .init_array/.fini_array
>  # endif
>  #endif
> -])],[
> -    case "${target}" in
> -      *-*-solaris2.8*)
> -     # .init_array/.fini_array support was introduced in Solaris 8
> -     # patches 109147-08 (sparc) and 109148-08 (x86).  Since ld.so.1 and
> -     # ld are guaranteed to be updated in lockstep, we can check ld -V
> -     # instead.  Unfortunately, proper ld version numbers were only
> -     # introduced in rev. -14, so we check for that.
> -     if test "$gcc_cv_sun_ld_vers_minor" -lt 272; then
> -       gcc_cv_initfini_array=no
> -     fi
> -      ;;
> -      *-*-solaris2.9* | *-*-solaris2.1[[0-9]]*)
> -        # .init_array/.fini_array support is present since Solaris 9 FCS.
> -        ;;
> -    esac
> -], [gcc_cv_initfini_array=no]);;
> +])],, [gcc_cv_initfini_array=no]);;
>      esac
>    else
>      AC_MSG_CHECKING(cross compile... guessing)

It seems to me that gcc_cv_sun_ld_ver* isn't used anywhere anymore, so
what about applying the following cleanup (completely untested):

gcc/
        * acinclude.m4 (gcc_AC_INITFINI_ARRAY): Don't require
        gcc_SUN_LD_VERSION.
        (gcc_SUN_LD_VERSION): Remove, preserving some comments...
        * configure.ac: ... here.

diff --git a/gcc/acinclude.m4 b/gcc/acinclude.m4
index c24464b..6410f2c 100644
--- a/gcc/acinclude.m4
+++ b/gcc/acinclude.m4
@@ -278,8 +278,7 @@ fi
 fi])
 
 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],
        [], [
 AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support,
@@ -488,43 +487,6 @@ if test $[$2] = yes; then
   $7
 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 ------------------------
 dnl Define KEY as a valid configure key on the target machine.
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 7891fcc..4ea2f9c 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -2290,11 +2290,21 @@ if test $in_tree_ld != yes ; then
   else
     case "${target}" in
       *-*-solaris2*)
-       # See acinclude.m4 (gcc_SUN_LD_VERSION) for the version number
-       # format.
+       # Determines Sun linker version numbers, setting gcc_cv_sun_ld_vers to
+       # the complete version number and gcc_cv_sun_ld_vers_{major, minor} to
+       # the corresponding fields.
        #
-       # Don't reuse gcc_gv_sun_ld_vers_* in case a linker other than
-       # /usr/ccs/bin/ld has been configured.
+       # 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.
+       #
+       # 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
        ld_ver=`$gcc_cv_ld -V 2>&1`
        if echo "$ld_ver" | grep 'Solaris Link Editors' > /dev/null; then
          ld_vers=`echo $ld_ver | sed -n \


Grüße,
 Thomas

Attachment: pgpUEZkTR81Ov.pgp
Description: PGP signature

Reply via email to