diff mbox series

[COMMITTED] Remove obsolete Solaris 11.3 support

Message ID yddmsp8patz.fsf@CeBiTec.Uni-Bielefeld.DE
State New
Headers show
Series [COMMITTED] Remove obsolete Solaris 11.3 support | expand

Commit Message

Rainer Orth May 2, 2024, 2:06 p.m. UTC
Support for Solaris 11.3 had already been obsoleted in GCC 13.  However,
since the only Solaris system in the cfarm was running 11.3, I've kept
it in tree until now when both Solaris 11.4/SPARC and x86 systems have
been added.

This patch actually removes the Solaris 11.3 support.  Apart from
several minor simplifications, there are two more widespread changes:

* In Solaris 11.4, libsocket and libnsl were folded into libc, so
  there's no longer a need to link them explictly.

* Since Solaris 11.4, Solaris includes all crts needed by gcc (like
  crt1.o and gcrt1.o) with the base system.  All workarounds to provide
  fallbacks can thus go.

There is some additional potential for cleanup which I haven't included
in this patch for various reasons.  I'm Cc'ing the respective
maintainers for guidance instead:

* libgo configure.ac and Makefile.am can now expect HAVE_STAT_TIMESPEC
  to be true and libgo_cv_lib_setcontext_clobbers_tls doesn't apply any
  longer.  Any change would have to go upstream first and I don't know
  about Ian's policy for keeping older versions supported.

* libphobos (libdruntime/gcc/sections/elf.d) has a workaround for the
  lack of struct dl_phdr_info.dlpi_tls_modid.  This was actually added
  in Solaris 11.4 SRU 10 only, so one may or may not want to keep it.

* The same applies to libsanitizer (with a couple of additional
  cleanups).  This would have to go upstream anyway (maybe made
  uncontroversial since LLVM itself never supported Solaris 11.3 itself,
  only allowing some code in to accomodate GCC).

* libstdc++ acinclude.m4 has support for detecting
  glibcxx_cv_math11_{fp,int}_overload.  In Solaris 11.4, those should
  always be true, so one may want to simplify the code accordingly.

Bootstrapped without regressions on i386-pc-solaris2.11 and
sparc-sun-solaris2.11 (as/ld, gas/ld, and gas/gld) as well as Solaris
11.3/x86 to ascertain that version is actually rejected.

Will commit shortly.

	Rainer

Comments

Ian Lance Taylor May 2, 2024, 9:45 p.m. UTC | #1
On Thu, May 2, 2024 at 7:06 AM Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
>
> * libgo configure.ac and Makefile.am can now expect HAVE_STAT_TIMESPEC
>   to be true and libgo_cv_lib_setcontext_clobbers_tls doesn't apply any
>   longer.  Any change would have to go upstream first and I don't know
>   about Ian's policy for keeping older versions supported.

There's no reason for libgo to support a version that GCC itself
doesn't support.  If you send me a patch I can apply it.  Thanks.

Ian
diff mbox series

Patch

# HG changeset patch
# Parent  b4a42d2294706a4f32dd6c82bac8717bf0644696
Remove obsolete Solaris 11.3 support

diff --git a/c++tools/Makefile.in b/c++tools/Makefile.in
--- a/c++tools/Makefile.in
+++ b/c++tools/Makefile.in
@@ -35,7 +35,6 @@  CXXOPTS := $(CXXFLAGS) $(PICFLAG) -fno-e
 LDFLAGS := @LDFLAGS@
 exeext := @EXEEXT@
 LIBIBERTY := ../libiberty/libiberty.a
-NETLIBS := @NETLIBS@
 VERSION.O := ../gcc/version.o
 
 all::
@@ -99,7 +98,7 @@  MAPPER.O := server.o resolver.o
 CODYLIB = ../libcody/libcody.a
 CXXINC += -I$(srcdir)/../libcody -I$(srcdir)/../include -I$(srcdir)/../gcc -I. -I../gcc
 g++-mapper-server$(exeext): $(MAPPER.O) $(CODYLIB)
-	+$(CXX) $(LDFLAGS) $(PICFLAG) $(LD_PICFLAG) -o $@ $^ $(LIBIBERTY) $(NETLIBS)
+	+$(CXX) $(LDFLAGS) $(PICFLAG) $(LD_PICFLAG) -o $@ $^ $(LIBIBERTY)
 
 # copy to gcc dir so tests there can run
 all::../gcc/g++-mapper-server$(exeext)
diff --git a/c++tools/configure.ac b/c++tools/configure.ac
--- a/c++tools/configure.ac
+++ b/c++tools/configure.ac
@@ -22,7 +22,6 @@ 
 # By default g++ uses an in-process mapper.
 
 sinclude(../config/acx.m4)
-sinclude(../config/ax_lib_socket_nsl.m4)
 
 AC_INIT(c++tools)
 
@@ -264,15 +263,6 @@  fi
 # Determine what GCC version number to use in filesystem paths.
 GCC_BASE_VER
 
-# Solaris needs libsocket and libnsl for socket functions before 11.4.
-# libcody uses those.
-save_LIBS="$LIBS"
-LIBS=
-AX_LIB_SOCKET_NSL
-NETLIBS="$LIBS"
-LIBS="$save_LIBS"
-AC_SUBST(NETLIBS)
-
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_FILES([Makefile])
 
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -447,7 +447,6 @@  CPPINC = -I$(srcdir)/../libcpp/include
 
 CODYLIB = ../libcody/libcody.a
 CODYINC = -I$(srcdir)/../libcody
-NETLIBS = @NETLIBS@
 
 # Where to find decNumber
 enable_decimal_float = @enable_decimal_float@
diff --git a/gcc/aclocal.m4 b/gcc/aclocal.m4
--- a/gcc/aclocal.m4
+++ b/gcc/aclocal.m4
@@ -68,7 +68,6 @@  m4_include([../ltsugar.m4])
 m4_include([../ltversion.m4])
 m4_include([../lt~obsolete.m4])
 m4_include([../config/acx.m4])
-m4_include([../config/ax_lib_socket_nsl.m4])
 m4_include([../config/cet.m4])
 m4_include([../config/codeset.m4])
 m4_include([../config/depstand.m4])
diff --git a/gcc/config.gcc b/gcc/config.gcc
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -271,9 +271,8 @@  case ${target}:`uname -v` in
 esac
 
 # Obsolete configurations.
-case ${target}${target_min} in
-    *-*-solaris2.11.[0-3]*		\
-   | ia64*-*-*				\
+case ${target} in
+     ia64*-*-*				\
    | nios2*-*-*				\
  )
     if test "x$enable_obsolete" != xyes; then
@@ -288,7 +287,7 @@  esac
 # Unsupported targets list.  Do not put an entry in this list unless
 # it would otherwise be caught by a more permissive pattern.  The list
 # should be in alphabetical order.
-case ${target} in
+case ${target}${target_min} in
  # Avoid special cases that are not obsolete
    arm*-*-*eabi*			\
  )
@@ -325,6 +324,7 @@  case ${target} in
  | *-*-solaris2.[0-9]			\
  | *-*-solaris2.[0-9].*			\
  | *-*-solaris2.10*			\
+ | *-*-solaris2.11.[0-3]*		\
  | *-*-sysv*				\
  | vax-*-vms*				\
  )
@@ -1046,12 +1046,8 @@  case ${target} in
   sol2_tm_file_head="elfos.h ${cpu_type}/sysv4.h"
   sol2_tm_file_tail="${cpu_type}/sol2.h sol2.h"
   sol2_tm_file="${sol2_tm_file_head} ${sol2_tm_file_tail}"
-  case ${target} in
-    *-*-solaris2.1[1-9]*)
-      # __cxa_atexit was introduced in Solaris 11.4.
-      default_use_cxa_atexit=yes
-      ;;
-  esac
+  # __cxa_atexit was introduced in Solaris 11.4.
+  default_use_cxa_atexit=yes
   use_gcc_stdint=wrap
   if test x$gnu_ld = xyes; then
     tm_file="usegld.h ${tm_file}"
diff --git a/gcc/config.in b/gcc/config.in
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -2561,12 +2561,6 @@ 
 #endif
 
 
-/* Define 0/1 if your linker supports hidden thunks in linkonce sections. */
-#ifndef USED_FOR_TARGET
-#undef USE_HIDDEN_LINKONCE
-#endif
-
-
 /* Define to 1 if the 'long long' type is wider than 'long' but still
    efficiently supported by the host hardware. */
 #ifndef USED_FOR_TARGET
diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc
--- a/gcc/config/i386/i386.cc
+++ b/gcc/config/i386/i386.cc
@@ -5976,12 +5976,10 @@  ix86_setup_frame_addresses (void)
   cfun->machine->accesses_prev_frame = 1;
 }
 
-#ifndef USE_HIDDEN_LINKONCE
-# if defined(HAVE_GAS_HIDDEN) && (SUPPORTS_ONE_ONLY - 0)
-#  define USE_HIDDEN_LINKONCE 1
-# else
-#  define USE_HIDDEN_LINKONCE 0
-# endif
+#if defined(HAVE_GAS_HIDDEN) && (SUPPORTS_ONE_ONLY - 0)
+# define USE_HIDDEN_LINKONCE 1
+#else
+# define USE_HIDDEN_LINKONCE 0
 #endif
 
 /* Label count for call and return thunks.  It is used to make unique
diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h
--- a/gcc/config/sol2.h
+++ b/gcc/config/sol2.h
@@ -204,7 +204,7 @@  along with GCC; see the file COPYING3.  
      %{ansi|std=c*|std=iso9899\\:199409:values-Xc.o%s; :values-Xa.o%s} \
      %{std=c90|std=gnu90:values-xpg4.o%s; :values-xpg6.o%s}}}"
 
-#if defined(HAVE_LD_PIE) && defined(HAVE_SOLARIS_CRTS)
+#if defined(HAVE_LD_PIE)
 #define STARTFILE_CRTBEGIN_SPEC "%{static:crtbegin.o%s; \
 				   shared|" PIE_SPEC ":crtbeginS.o%s; \
 				   :crtbegin.o%s}"
@@ -265,7 +265,6 @@  along with GCC; see the file COPYING3.  
 
 /* We don't use the standard svr4 STARTFILE_SPEC because it's wrong for us.  */
 #undef STARTFILE_SPEC
-#ifdef HAVE_SOLARIS_CRTS
 /* Since Solaris 11.4, the OS delivers crt1.o, crti.o, and crtn.o, with a hook
    for compiler-dependent stuff like profile handling.  */
 #define STARTFILE_SPEC "%{!shared:%{!symbolic: \
@@ -275,16 +274,8 @@  along with GCC; see the file COPYING3.  
 			      :crtp.o%s}}} \
 			crti.o%s %(startfile_arch) %(startfile_crtbegin) \
 			%(startfile_vtv)"
-#else
-#define STARTFILE_SPEC "%{!shared:%{!symbolic: \
-			  %{p:mcrt1.o%s; \
-                            pg:gcrt1.o%s gmon.o%s; \
-                              :crt1.o%s}}} \
-			crti.o%s %(startfile_arch) %(startfile_crtbegin) \
-			%(startfile_vtv)"
-#endif
 
-#if defined(HAVE_LD_PIE) && defined(HAVE_SOLARIS_CRTS)
+#if defined(HAVE_LD_PIE)
 #define ENDFILE_CRTEND_SPEC "%{static:crtend.o%s; \
 			       shared|" PIE_SPEC ":crtendS.o%s; \
 			       :crtend.o%s}"
@@ -430,7 +421,7 @@  along with GCC; see the file COPYING3.  
 #endif /* HAVE_LD_EH_FRAME && TARGET_DL_ITERATE_PHDR */
 #endif
 
-#if defined(HAVE_LD_PIE) && defined(HAVE_SOLARIS_CRTS)
+#if defined(HAVE_LD_PIE)
 #ifdef USE_GLD
 /* Assert -z text by default to match Solaris ld.  */
 #define LD_PIE_SPEC "-pie %{!mimpure-text:-z text}"
diff --git a/gcc/configure b/gcc/configure
--- a/gcc/configure
+++ b/gcc/configure
@@ -809,7 +809,6 @@  ZSTD_LIB
 ZSTD_INCLUDE
 DL_LIB
 LDEXP_LIB
-NETLIBS
 EXTRA_GCC_LIBS
 GNAT_LIBEXC
 COLLECT2_LIBS
@@ -10285,170 +10284,6 @@  EXTRA_GCC_LIBS="$LIBS"
 LIBS="$save_LIBS"
 
 
-# Solaris needs libsocket and libnsl for socket functions before 11.4.
-# C++ needs those for libcody.
-save_LIBS="$LIBS"
-LIBS=
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
-$as_echo_n "checking for library containing gethostbyname... " >&6; }
-if ${ac_cv_search_gethostbyname+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyname ();
-int
-main ()
-{
-return gethostbyname ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' nsl; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_search_gethostbyname=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_gethostbyname+:} false; then :
-  break
-fi
-done
-if ${ac_cv_search_gethostbyname+:} false; then :
-
-else
-  ac_cv_search_gethostbyname=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
-$as_echo "$ac_cv_search_gethostbyname" >&6; }
-ac_res=$ac_cv_search_gethostbyname
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
-$as_echo_n "checking for library containing socket... " >&6; }
-if ${ac_cv_search_socket+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char socket ();
-int
-main ()
-{
-return socket ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' socket; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_search_socket=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_socket+:} false; then :
-  break
-fi
-done
-if ${ac_cv_search_socket+:} false; then :
-
-else
-  ac_cv_search_socket=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
-$as_echo "$ac_cv_search_socket" >&6; }
-ac_res=$ac_cv_search_socket
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-else
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
-$as_echo_n "checking for socket in -lsocket... " >&6; }
-if ${ac_cv_lib_socket_socket+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket -lnsl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char socket ();
-int
-main ()
-{
-return socket ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_lib_socket_socket=yes
-else
-  ac_cv_lib_socket_socket=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
-$as_echo "$ac_cv_lib_socket_socket" >&6; }
-if test "x$ac_cv_lib_socket_socket" = xyes; then :
-  LIBS="-lsocket -lnsl $LIBS"
-fi
-
-fi
-
-
-NETLIBS="$LIBS"
-LIBS="$save_LIBS"
-
-
 # Some systems put ldexp and frexp in libm instead of libc; assume
 # they're both in the same place.  jcf-dump needs them.
 save_LIBS="$LIBS"
@@ -21575,7 +21410,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 21578 "configure"
+#line 21413 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -21681,7 +21516,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 21684 "configure"
+#line 21519 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -27175,16 +27010,6 @@  cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-case "$target" in
-  # SHF_MERGE support is broken in Solaris ld up to Solaris 11.3/SPARC for
-  # alignment > 1.
-  sparc*-*-solaris2.11*)
-    if test x"$gnu_ld" = xno \
-       && test "$ld_vers_major" -lt 2 && test "$ld_vers_minor" -lt 3159; then
-      gcc_cv_aligned_shf_merge=no
-    fi
-    ;;
-esac
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_ALIGNED_SHF_MERGE `if test $gcc_cv_aligned_shf_merge = yes; then echo 1; else echo 0; fi`
@@ -27372,35 +27197,6 @@  cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-# Restrict this test to Solaris/x86: other targets define this statically.
-case "${target}" in
-  i?86-*-solaris2* | x86_64-*-solaris2*)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking support for hidden thunks in linkonce sections" >&5
-$as_echo_n "checking support for hidden thunks in linkonce sections... " >&6; }
-    if test $in_tree_ld = yes || echo "$ld_ver" | grep GNU > /dev/null; then
-      hidden_linkonce=yes
-    else
-      case "${target}" in
-	# Full support for hidden thunks in linkonce sections only appeared in
-	# Solaris 11/OpenSolaris.
-        *-*-solaris2.1[1-9]*)
-	  hidden_linkonce=yes
-	  ;;
-	*)
-	  hidden_linkonce=no
-	  ;;
-      esac
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hidden_linkonce" >&5
-$as_echo "$hidden_linkonce" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define USE_HIDDEN_LINKONCE `if test $hidden_linkonce = yes; then echo 1; else echo 0; fi`
-_ACEOF
-
-  ;;
-esac
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for line table is_stmt support" >&5
 $as_echo_n "checking assembler for line table is_stmt support... " >&6; }
 if ${gcc_cv_as_is_stmt+:} false; then :
diff --git a/gcc/configure.ac b/gcc/configure.ac
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1434,15 +1434,6 @@  EXTRA_GCC_LIBS="$LIBS"
 LIBS="$save_LIBS"
 AC_SUBST(EXTRA_GCC_LIBS)
 
-# Solaris needs libsocket and libnsl for socket functions before 11.4.
-# C++ needs those for libcody.
-save_LIBS="$LIBS"
-LIBS=
-AX_LIB_SOCKET_NSL
-NETLIBS="$LIBS"
-LIBS="$save_LIBS"
-AC_SUBST(NETLIBS)
-
 # Some systems put ldexp and frexp in libm instead of libc; assume
 # they're both in the same place.  jcf-dump needs them.
 save_LIBS="$LIBS"
@@ -3617,16 +3608,6 @@  AC_DEFINE_UNQUOTED(HAVE_GAS_SHF_MERGE,
   [`if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`],
 [Define 0/1 if your assembler supports marking sections with SHF_MERGE flag.])
 
-case "$target" in
-  # SHF_MERGE support is broken in Solaris ld up to Solaris 11.3/SPARC for
-  # alignment > 1.
-  sparc*-*-solaris2.11*)
-    if test x"$gnu_ld" = xno \
-       && test "$ld_vers_major" -lt 2 && test "$ld_vers_minor" -lt 3159; then
-      gcc_cv_aligned_shf_merge=no
-    fi
-    ;;
-esac
 AC_DEFINE_UNQUOTED(HAVE_ALIGNED_SHF_MERGE,
   [`if test $gcc_cv_aligned_shf_merge = yes; then echo 1; else echo 0; fi`],
 [Define 0/1 if your assembler and linker support the SHF_MERGE flag with section alignment > 1.])
@@ -3740,31 +3721,6 @@  AC_DEFINE_UNQUOTED(HAVE_COMDAT_GROUP,
     || test $gcc_cv_as_comdat_group_group = yes; then echo 1; else echo 0; fi`],
 [Define 0/1 if your assembler and linker support COMDAT groups.])
 
-# Restrict this test to Solaris/x86: other targets define this statically.
-case "${target}" in
-  i?86-*-solaris2* | x86_64-*-solaris2*)
-    AC_MSG_CHECKING(support for hidden thunks in linkonce sections)
-    if test $in_tree_ld = yes || echo "$ld_ver" | grep GNU > /dev/null; then
-      hidden_linkonce=yes
-    else
-      case "${target}" in
-	# Full support for hidden thunks in linkonce sections only appeared in
-	# Solaris 11/OpenSolaris.
-        *-*-solaris2.1[[1-9]]*)
-	  hidden_linkonce=yes
-	  ;;
-	*)
-	  hidden_linkonce=no
-	  ;;
-      esac
-    fi
-    AC_MSG_RESULT($hidden_linkonce)
-    AC_DEFINE_UNQUOTED(USE_HIDDEN_LINKONCE,
-      [`if test $hidden_linkonce = yes; then echo 1; else echo 0; fi`],
-    [Define 0/1 if your linker supports hidden thunks in linkonce sections.])
-  ;;
-esac
-
 gcc_GAS_CHECK_FEATURE([line table is_stmt support],
  gcc_cv_as_is_stmt,,
 [	.text
diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
--- a/gcc/cp/Make-lang.in
+++ b/gcc/cp/Make-lang.in
@@ -143,7 +143,7 @@  cc1plus-checksum.cc : build/genchecksum$
 cc1plus$(exeext): $(CXX_OBJS) cc1plus-checksum.o $(BACKEND) $(CODYLIB) $(LIBDEPS) $(c++.prev)
 	@$(call LINK_PROGRESS,$(INDEX.c++),start)
 	+$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
-	      $(CXX_OBJS) cc1plus-checksum.o $(BACKEND) $(CODYLIB) $(NETLIBS) \
+	      $(CXX_OBJS) cc1plus-checksum.o $(BACKEND) $(CODYLIB) \
 		$(LIBS) $(BACKENDLIBS)
 	@$(call LINK_PROGRESS,$(INDEX.c++),end)
 
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -4290,7 +4290,7 @@  found on @uref{https://www.bitwizard.nl/
 @end html
 @anchor{ix86-x-solaris2}
 @heading i?86-*-solaris2*
-Use this for Solaris 11.3 or later on x86 and x86-64 systems.  Starting
+Use this for Solaris 11.4 on x86 and x86-64 systems.  Starting
 with GCC 4.7, there is also a 64-bit @samp{amd64-*-solaris2*} or
 @samp{x86_64-*-solaris2*} configuration that corresponds to
 @samp{sparcv9-sun-solaris2*}.
@@ -4898,15 +4898,12 @@  supported as cross-compilation target on
 @end html
 @anchor{x-x-solaris2}
 @heading *-*-solaris2*
-Support for Solaris 11.3 and earlier has been obsoleted in GCC 13, but
-can still be enabled by configuring with @option{--enable-obsolete}.
+Support for Solaris 11.3 and earlier has been removed in GCC 15.
 Support for Solaris 10 has been removed in GCC 10.  Support for Solaris
 9 has been removed in GCC 5.  Support for Solaris 8 has been removed in
 GCC 4.8.  Support for Solaris 7 has been removed in GCC 4.6.
 
-Solaris 11.3 provides GCC 4.5.2, 4.7.3, and 4.8.2 as
-@command{/usr/gcc/4.5/bin/gcc} or similar.  Solaris 11.4
-provides one or more of GCC 5, 7, 9, 10, 11, and 12.
+Solaris 11.4 provides one or more of GCC 5, 7, 9, 10, 11, 12, and 13.
 
 You need to install the @code{system/header}, @code{system/linker}, and
 @code{developer/assembler} packages.
@@ -4925,18 +4922,18 @@  of the build.
 We recommend the use of the Solaris assembler or the GNU assembler, in
 conjunction with the Solaris linker.
 
-The GNU @command{as} versions included in Solaris 11.3, from GNU
-binutils 2.23.1 or newer (in @file{/usr/bin/gas} and
+The GNU @command{as} versions included in Solaris 11.4, from GNU
+binutils 2.30.1 or newer (in @file{/usr/bin/gas} and
 @file{/usr/gnu/bin/as}), are known to work.  The version from GNU
-binutils 2.40 is known to work as well.  Recent versions of the Solaris
+binutils 2.42 is known to work as well.  Recent versions of the Solaris
 assembler in @file{/usr/bin/as} work almost as well, though.  To use GNU
 @command{as}, configure with the options @option{--with-gnu-as
 --with-as=@//usr/@/gnu/@/bin/@/as}.
 
 For linking, the Solaris linker is preferred.  If you want to use the
-GNU linker instead, the version in Solaris 11.3, from GNU binutils
-2.23.1 or newer (in @file{/usr/gnu/bin/ld} and @file{/usr/bin/gld}),
-works, as does the version from GNU binutils 2.40.  However, it
+GNU linker instead, the version in Solaris 11.4, from GNU binutils
+2.30.1 or newer (in @file{/usr/gnu/bin/ld} and @file{/usr/bin/gld}),
+works, as does the version from GNU binutils 2.42.  However, it
 generally lacks platform specific features, so better stay with Solaris
 @command{ld}.  To use the LTO linker plugin
 (@option{-fuse-linker-plugin}) with GNU @command{ld}, GNU binutils
@@ -4960,7 +4957,7 @@  will be disabled if no appropriate versi
 work.
 
 In order to build the GNU Ada compiler, GNAT, a working GNAT is needed.
-Since Solaris 11.4 SRU 39, GNAT 11 or 12 is bundled in the
+Since Solaris 11.4 SRU 39, GNAT 11, 12 or 13 is bundled in the
 @code{developer/gcc/gcc-gnat} package.
 
 In order to build the GNU D compiler, GDC, a working @samp{libphobos} is
@@ -4970,20 +4967,8 @@  configuring with @option{--enable-libpho
 required on x86, while GDC 9.3.0 is known to work on SPARC.
 
 The versions of the GNU Multiple Precision Library (GMP), the MPFR
-library and the MPC library bundled with Solaris 11.3 and later are
-usually recent enough to match GCC's requirements.  There are two
-caveats:
-
-@itemize @bullet
-@item
-While the version of the GMP library in Solaris 11.3 works with GCC, you
-need to configure with @option{--with-gmp-include=/usr/include/gmp}.
-
-@item
-The version of the MPFR libary included in Solaris 11.3 is too old; you
-need to provide a more recent one.
-
-@end itemize
+library and the MPC library bundled with Solaris 11.4 are
+recent enough to match GCC's requirements.
 
 @html
 <hr />
diff --git a/gcc/objcp/Make-lang.in b/gcc/objcp/Make-lang.in
--- a/gcc/objcp/Make-lang.in
+++ b/gcc/objcp/Make-lang.in
@@ -80,7 +80,7 @@  cc1objplus$(exeext): $(OBJCXX_OBJS) cc1o
 	@$(call LINK_PROGRESS,$(INDEX.obj-c++),start)
 	+$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
 		$(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) \
-		  $(CODYLIB) $(NETLIBS) $(LIBS) $(BACKENDLIBS)
+		  $(CODYLIB) $(LIBS) $(BACKENDLIBS)
 	@$(call LINK_PROGRESS,$(INDEX.obj-c++),end)
 
 # Objective C++ language specific files.
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -1415,17 +1415,11 @@  proc check_effective_target_pie { } {
 	 || [istarget *-*-freebsd*]
 	 || [istarget *-*-linux*]
 	 || [istarget arm*-*-uclinuxfdpiceabi]
+	 || [istarget *-*-solaris2*]
 	 || [istarget *-*-gnu*]
 	 || [istarget *-*-amdhsa]} {
 	return 1;
     }
-    if { [istarget *-*-solaris2.1\[1-9\]*] } {
-	# Full PIE support was added in Solaris 11.3, but gcc errors out
-	# if missing, so check for that.
-	return [check_no_compiler_messages pie executable {
-	    int main (void) { return 0; }
-	} "-pie -fpie"]
-    }
     return 0
 }
 
diff --git a/libgcc/config.host b/libgcc/config.host
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -345,24 +345,11 @@  case ${host} in
   # Add cpu-specific t-sol2 after t-slibgcc-* so it can augment SHLIB_MAPFILES.
   tmake_file="$tmake_file $cpu_type/t-sol2"
   extra_parts="gmon.o crtbegin.o crtend.o"
-  if test "${libgcc_cv_solaris_crts}" = yes; then
-    # Solaris 11.4 provides crt1.o, crti.o, and crtn.o as part of the
-    # base system.  crtp.o and crtpg.o implement the compiler-dependent parts.
-    extra_parts="$extra_parts crtp.o crtpg.o"
-    # If the Solaris CRTs are present, both ld and gld will have PIE support.
-    extra_parts="$extra_parts crtbeginS.o crtendS.o"
-  else
-    case ${host} in
-      i?86-*-solaris2* | x86_64-*-solaris2*)
-        # Solaris 10+/x86 provides crt1.o, crti.o, crtn.o, and gcrt1.o as
-        # part of the base system.
-        ;;
-      sparc*-*-solaris2*)
-        # Solaris 10+/SPARC lacks crt1.o and gcrt1.o.
-        extra_parts="$extra_parts crt1.o gcrt1.o"
-        ;;
-    esac
-  fi
+  # Solaris 11.4 provides crt1.o, crti.o, and crtn.o as part of the
+  # base system.  crtp.o and crtpg.o implement the compiler-dependent parts.
+  extra_parts="$extra_parts crtp.o crtpg.o"
+  # If the Solaris CRTs are present, both ld and gld will have PIE support.
+  extra_parts="$extra_parts crtbeginS.o crtendS.o"
   if test x$enable_vtable_verify = xyes; then
     extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
   fi
diff --git a/libgcc/config.in b/libgcc/config.in
--- a/libgcc/config.in
+++ b/libgcc/config.in
@@ -34,9 +34,6 @@ 
 /* Define to 1 if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H
 
-/* Define if the system-provided CRTs are present on Solaris. */
-#undef HAVE_SOLARIS_CRTS
-
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
diff --git a/libgcc/config/i386/sol2-c1.S b/libgcc/config/i386/sol2-c1.S
deleted file mode 100644
--- a/libgcc/config/i386/sol2-c1.S
+++ /dev/null
@@ -1,173 +0,0 @@ 
-/* crt1.s for Solaris 2, x86
-
-   Copyright (C) 1993-2024 Free Software Foundation, Inc.
-   Written By Fred Fish, Nov 1992
-
-This file is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 3, or (at your option) any
-later version.
-
-This file is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-
-/* This file takes control of the process from the kernel, as specified
-   in section 3 of the System V Application Binary Interface, Intel386
-   Processor Supplement.  It has been constructed from information obtained
-   from the ABI, information obtained from single stepping existing
-   Solaris executables through their startup code with gdb, and from
-   information obtained by single stepping executables on other i386 SVR4
-   implementations.  This file is the first thing linked into any
-   executable.  */
-
-#ifndef GCRT1
-	.ident	"GNU C crt1.s"
-#define CLEANUP	_cleanup
-#else
-/* This is a modified crt1.s by J.W.Hawtin <oolon@ankh.org> 15/8/96, 
-   to allow program profiling, by calling monstartup on entry and _mcleanup 
-   on exit.  */
-	.ident	"GNU C gcrt1.s"
-#define CLEANUP _mcleanup
-#endif
-	.weak	_cleanup
-	.weak	_DYNAMIC
-	.text
-
-/* Start creating the initial frame by pushing a NULL value for the return
-   address of the initial frame, and mark the end of the stack frame chain
-   (the innermost stack frame) with a NULL value, per page 3-32 of the ABI.
-   Initialize the first stack frame pointer in %ebp (the contents of which
-   are unspecified at process initialization).  */
-
-	.globl	_start
-_start:
-	pushl	$0x0
-	pushl	$0x0
-	movl	%esp,%ebp
-
-/* As specified per page 3-32 of the ABI, %edx contains a function 
-   pointer that should be registered with atexit(), for proper
-   shared object termination.  Just push it onto the stack for now
-   to preserve it.  We want to register _cleanup() first.  */
-
-	pushl	%edx
-
-/* Check to see if there is an _cleanup() function linked in, and if
-   so, register it with atexit() as the last thing to be run by
-   atexit().  */
-
-	movl	$CLEANUP,%eax
-	testl	%eax,%eax
-	je	.L1
-	pushl	$CLEANUP
-	call	atexit
-	addl	$0x4,%esp
-.L1:
-
-/* Now check to see if we have an _DYNAMIC table, and if so then
-   we need to register the function pointer previously in %edx, but
-   now conveniently saved on the stack as the argument to pass to
-   atexit().  */
-
-	movl	$_DYNAMIC,%eax
-	testl	%eax,%eax
-	je	.L2
-	call	atexit
-.L2:
-
-/* Register _fini() with atexit().  We will take care of calling _init()
-   directly.  */
-
-	pushl	$_fini
-	call	atexit
-
-#ifdef GCRT1
-/* Start profiling.  */
-
-        pushl %ebp
-        movl %esp,%ebp
-        pushl $_etext
-        pushl $_start
-        call monstartup
-        addl $8,%esp
-	popl %ebp
-#endif
-
-/* Compute the address of the environment vector on the stack and load
-   it into the global variable _environ.  Currently argc is at 8 off
-   the frame pointer.  Fetch the argument count into %eax, scale by the
-   size of each arg (4 bytes) and compute the address of the environment
-   vector which is 16 bytes (the two zero words we pushed, plus argc,
-   plus the null word terminating the arg vector) further up the stack,
-   off the frame pointer (whew!).  */
-
-	movl	8(%ebp),%eax
-	leal	16(%ebp,%eax,4),%edx
-	movl	%edx,_environ
-
-/* Push the environment vector pointer, the argument vector pointer,
-   and the argument count on to the stack to set up the arguments
-   for _init(), _fpstart(), and main().  Note that the environment
-   vector pointer and the arg count were previously loaded into
-   %edx and %eax respectively.  The only new value we need to compute
-   is the argument vector pointer, which is at a fixed address off
-   the initial frame pointer.  */
-
-/* Make sure the stack is properly aligned.  */
-	andl $0xfffffff0,%esp
-	subl $4,%esp
-
-	pushl	%edx
-	leal	12(%ebp),%edx
-	pushl	%edx
-	pushl	%eax
-
-/* Call _init(argc, argv, environ), _fpstart(argc, argv, environ), and
-   main(argc, argv, environ).  */
-
-	call	_init
-	call	__fpstart
-	call	main
-
-/* Pop the argc, argv, and environ arguments off the stack, push the
-   value returned from main(), and call exit().  */
-
-	addl	$12,%esp
-	pushl	%eax
-	call	exit
-
-/* An inline equivalent of _exit, as specified in Figure 3-26 of the ABI.  */
-
-	pushl	$0x0
-	movl	$0x1,%eax
-	lcall	$7,$0
-
-/* If all else fails, just try a halt!  */
-
-	hlt
-	.type	_start,@function
-	.size	_start,.-_start
-
-#ifndef GCRT1
-/* A dummy profiling support routine for non-profiling executables,
-   in case we link in some objects that have been compiled for profiling.  */
-
-	.weak	_mcount
-_mcount:
-	ret
-	.type	_mcount,@function
-	.size	_mcount,.-_mcount
-#endif
diff --git a/libgcc/config/sol2/gmon.c b/libgcc/config/sol2/gmon.c
--- a/libgcc/config/sol2/gmon.c
+++ b/libgcc/config/sol2/gmon.c
@@ -316,29 +316,6 @@  internal_mcount (char *selfpc, unsigned 
 /* Only necessary without the Solaris CRTs or a proper gcrt1.o, otherwise
    crtpg.o or gcrt1.o take care of that.
 
-   FIXME: What about _init vs. _start on sparc?  */
-#ifndef HAVE_SOLARIS_CRTS
-  if(!already_setup) {
-    extern char etext[];
-
-    already_setup = 1;
-
-#if defined __i386__
-    /* <sys/vmparam.h> USERSTACK.  */
-    monstartup ((char *) 0x8048000, etext);
-#elif defined __x86_64__
-    monstartup (NULL, etext);
-#elif defined __sparc__
-    {
-      extern char _start[];
-      extern char _init[];
-
-      monstartup (_start < _init ? _start : _init, etext);
-    }
-#endif
-    atexit (_mcleanup);
-  }
-#endif /* !HAVE_SOLARIS_CRTS */
   /* Check that we are profiling and that we aren't recursively invoked.  */
   if (profiling) {
     goto out;
diff --git a/libgcc/config/sol2/t-sol2 b/libgcc/config/sol2/t-sol2
--- a/libgcc/config/sol2/t-sol2
+++ b/libgcc/config/sol2/t-sol2
@@ -25,9 +25,3 @@  crtpg.o: $(srcdir)/config/sol2/crtpg.c
 # gmon build rule
 gmon.o:	$(srcdir)/config/sol2/gmon.c
 	$(crt_compile) $(CRTSTUFF_T_CFLAGS_S) -c $<
-
-# Assemble startup files.
-crt1.o: $(srcdir)/config/$(cpu_type)/sol2-c1.S
-	$(crt_compile) -c $<
-gcrt1.o: $(srcdir)/config/$(cpu_type)/sol2-c1.S
-	$(crt_compile) -c -DGCRT1 $<
diff --git a/libgcc/config/sparc/sol2-c1.S b/libgcc/config/sparc/sol2-c1.S
deleted file mode 100644
--- a/libgcc/config/sparc/sol2-c1.S
+++ /dev/null
@@ -1,103 +0,0 @@ 
-! crt1.s for sparc & sparcv9 (SunOS 5)
-
-!   Copyright (C) 1992-2024 Free Software Foundation, Inc.
-!   Written By David Vinayak Henkel-Wallace, June 1992
-! 
-! This file is free software; you can redistribute it and/or modify it
-! under the terms of the GNU General Public License as published by the
-! Free Software Foundation; either version 3, or (at your option) any
-! later version.
-! 
-! This file is distributed in the hope that it will be useful, but
-! WITHOUT ANY WARRANTY; without even the implied warranty of
-! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-! General Public License for more details.
-! 
-! Under Section 7 of GPL version 3, you are granted additional
-! permissions described in the GCC Runtime Library Exception, version
-! 3.1, as published by the Free Software Foundation.
-!
-! You should have received a copy of the GNU General Public License and
-! a copy of the GCC Runtime Library Exception along with this program;
-! see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-! <http://www.gnu.org/licenses/>.
-
-! This file takes control of the process from the kernel, as specified
-! in section 3 of the SVr4 ABI.
-! This file is the first thing linked into any executable.
-
-#ifdef __sparcv9
-#define	CPTRSIZE	8
-#define	CPTRSHIFT	3
-#define	STACK_BIAS	2047
-#define	ldn		ldx
-#define	stn		stx
-#define setn(s, scratch, dst)	setx s, scratch, dst
-#else
-#define	CPTRSIZE	4
-#define	CPTRSHIFT	2
-#define	STACK_BIAS	0
-#define	ldn		ld
-#define	stn		st
-#define setn(s, scratch, dst)	set s, dst
-#endif
-
-	.section	".text"
-	.proc	022
-	.global	_start
-
-_start:
-	mov	0, %fp		! Mark bottom frame pointer
-	ldn	[%sp + (16 * CPTRSIZE) + STACK_BIAS], %l0	! argc
-	add	%sp, (17 * CPTRSIZE) + STACK_BIAS, %l1		! argv
-
-	! Leave some room for a call.  Sun leaves 32 octets (to sit on
-	! a cache line?) so we do too.
-#ifdef __sparcv9
-	sub	%sp, 48, %sp
-#else
-	sub	%sp, 32, %sp
-#endif
-
-	! %g1 may contain a function to be registered w/atexit
-	orcc	%g0, %g1, %g0
-#ifdef __sparcv9
-	be	%xcc, .nope
-#else
-	be	.nope
-#endif
-	mov	%g1, %o0
-	call	atexit
-	nop   
-.nope:
-	! Now make sure constructors and destructors are handled.
-	setn(_fini, %o1, %o0)
-	call	atexit, 1
-	nop
-	call	_init, 0
-	nop
-
-	! We ignore the auxiliary vector; there is no defined way to
-	! access those data anyway.  Instead, go straight to main:
-	mov	%l0, %o0	! argc
-	mov	%l1, %o1	! argv
-#ifdef GCRT1
-	setn(___Argv, %o4, %o3)
-	stn	%o1, [%o3]      ! *___Argv
-#endif
-	! Skip argc words past argv, to env:
-	sll	%l0, CPTRSHIFT, %o2
-	add	%o2, CPTRSIZE, %o2
-	add	%l1, %o2, %o2	! env
-	setn(_environ, %o4, %o3)
-	stn	%o2, [%o3]	! *_environ
-	call	main, 4
-	nop   
-	call	exit, 0
-	nop   
-	call	_exit, 0
-	nop   
-	! We should never get here.
-
-	.type	_start,#function
-	.size	_start,.-_start
diff --git a/libgcc/configure b/libgcc/configure
--- a/libgcc/configure
+++ b/libgcc/configure
@@ -5110,38 +5110,6 @@  fi
 $as_echo "$libgcc_cv_mips_hard_float" >&6; }
 esac
 
-case ${host} in
-*-*-solaris2*)
-  # Check for system-provided CRTs on Solaris 11.4.
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking system-provided CRTs on Solaris" >&5
-$as_echo_n "checking system-provided CRTs on Solaris... " >&6; }
-if ${libgcc_cv_solaris_crts+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  libgcc_cv_solaris_crts=no
-     libgcc_sysroot="`${CC} -print-sysroot`"
-     libgcc_libdir="$libgcc_sysroot/usr/lib"
-     # At the time they were added, gcrt1.o became a symlink for backwards
-     # compatibility on x86, while crt1.o was added on sparc, so check for that.
-     case ${host} in
-       i?86-*-solaris2* | x86_64-*-solaris2*)
-         if test -h "$libgcc_libdir/gcrt1.o"; then libgcc_cv_solaris_crts=yes; fi
-	 ;;
-       sparc*-*-solaris2*)
-         if test -f "$libgcc_libdir/crt1.o"; then libgcc_cv_solaris_crts=yes; fi
-	 ;;
-     esac
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgcc_cv_solaris_crts" >&5
-$as_echo "$libgcc_cv_solaris_crts" >&6; }
-  if test $libgcc_cv_solaris_crts = yes; then
-
-$as_echo "#define HAVE_SOLARIS_CRTS 1" >>confdefs.h
-
-  fi
-  ;;
-esac
-
 # Determine the version of glibc, if any, used on the target.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target glibc version" >&5
 $as_echo_n "checking for target glibc version... " >&6; }
diff --git a/libgcc/configure.ac b/libgcc/configure.ac
--- a/libgcc/configure.ac
+++ b/libgcc/configure.ac
@@ -346,31 +346,6 @@  mips*-*-*)
     [libgcc_cv_mips_hard_float=no])])
 esac
 
-case ${host} in
-*-*-solaris2*)
-  # Check for system-provided CRTs on Solaris 11.4.
-  AC_CACHE_CHECK([system-provided CRTs on Solaris],
-    		 [libgcc_cv_solaris_crts],
-    [libgcc_cv_solaris_crts=no
-     libgcc_sysroot="`${CC} -print-sysroot`"
-     libgcc_libdir="$libgcc_sysroot/usr/lib"
-     # At the time they were added, gcrt1.o became a symlink for backwards
-     # compatibility on x86, while crt1.o was added on sparc, so check for that.
-     case ${host} in
-       i?86-*-solaris2* | x86_64-*-solaris2*)
-         if test -h "$libgcc_libdir/gcrt1.o"; then libgcc_cv_solaris_crts=yes; fi
-	 ;;
-       sparc*-*-solaris2*)
-         if test -f "$libgcc_libdir/crt1.o"; then libgcc_cv_solaris_crts=yes; fi
-	 ;;
-     esac])
-  if test $libgcc_cv_solaris_crts = yes; then
-    AC_DEFINE(HAVE_SOLARIS_CRTS, 1,
-      [Define if the system-provided CRTs are present on Solaris.])
-  fi
-  ;;
-esac
-
 # Determine the version of glibc, if any, used on the target.
 AC_MSG_CHECKING([for target glibc version])
 AC_ARG_WITH([glibc-version],