]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Remove obsolete Solaris 11.3 support
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Tue, 7 May 2024 08:45:55 +0000 (10:45 +0200)
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Tue, 7 May 2024 08:45:55 +0000 (10:45 +0200)
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.

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.

2024-04-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

c++tools:
* configure.ac (ax_lib_socket_nsl.m4): Don't sinclude.
(AX_LIB_SOCKET_NSL): Don't call.
(NETLIBS): Remove.
* configure: Regenerate.
* Makefile.in (NETLIBS): Remove.
(g++-mapper-server$(exeext)): Remove $(NETLIBS).

gcc:
* config.gcc: Move *-*-solaris2.11.[0-3]* to unsupported list.
<*-*-solaris2*> (default_use_cxa_atexit): Set unconditionally.
* configure.ac (AX_LIB_SOCKET_NSL): Don't call.
(NETLIBS): Remove.
(gcc_cv_ld_aligned_shf_merge): Remove.
(hidden_linkonce) <i?86-*-solaris2* | x86_64-*-solaris2*>: Remove.
(gcc_cv_target_dl_iterate_phdr) <*-*-solaris2*>: Always set to yes.
* Makefile.in (NETLIBS): Remove.
* configure, config.in, aclocal.m4: Regenerate.
* config/sol2.h: Don't check HAVE_SOLARIS_CRTS.
(STARTFILE_SPEC): Remove !HAVE_SOLARIS_CRTS case.
[USE_GLD] (LINK_EH_SPEC): Remove TARGET_DL_ITERATE_PHDR guard.
* config/i386/i386.cc (USE_HIDDEN_LINKONCE): Remove guard.
* varasm.cc (mergeable_string_section): Remove
HAVE_LD_ALIGNED_SHF_MERGE handling.
(mergeable_constant_section): Likewise.

* doc/install.texi (Specific,i?86-*-solaris2*): Reference Solaris
11.4 only.
(Specific, *-*-solaris2*): Document Solaris 11.3 removal.  Remove
11.3 references and caveats.  Update for 11.4.

gcc/cp:
* Make-lang.in (cc1plus$(exeext)): Remove $(NETLIBS).

gcc/objcp:
* Make-lang.in (cc1objplus$(exeext)): Remove $(NETLIBS).

gcc/testsuite:
* lib/target-supports.exp (check_effective_target_pie): Always
enable on *-*-solaris2*.

libgcc:
* configure.ac <*-*-solaris2*> (libgcc_cv_solaris_crts): Remove.
* config.host <*-*-solaris2*>: Remove !libgcc_cv_solaris_crts
support.
* configure, config.in: Regenerate.
* config/sol2/gmon.c (internal_mcount) [!HAVE_SOLARIS_CRTS]: Remove.
* config/i386/sol2-c1.S, config/sparc/sol2-c1.S: Remove.
* config/sol2/t-sol2 (crt1.o, gcrt1.o): Remove.

libstdc++-v3:
* testsuite/lib/dg-options.exp (add_options_for_net_ts)
<*-*-solaris2*>: Don't link with -lsocket -lnsl.

25 files changed:
c++tools/Makefile.in
c++tools/configure
c++tools/configure.ac
gcc/Makefile.in
gcc/aclocal.m4
gcc/config.gcc
gcc/config.in
gcc/config/i386/i386.cc
gcc/config/sol2.h
gcc/configure
gcc/configure.ac
gcc/cp/Make-lang.in
gcc/doc/install.texi
gcc/objcp/Make-lang.in
gcc/testsuite/lib/target-supports.exp
gcc/varasm.cc
libgcc/config.host
libgcc/config.in
libgcc/config/i386/sol2-c1.S [deleted file]
libgcc/config/sol2/gmon.c
libgcc/config/sol2/t-sol2
libgcc/config/sparc/sol2-c1.S [deleted file]
libgcc/configure
libgcc/configure.ac
libstdc++-v3/testsuite/lib/dg-options.exp

index abb408ed46ff8bdc922ef56d02c46f7c668e51b9..7f73af722a719d43a0331aaa868a60bf790c5531 100644 (file)
@@ -35,7 +35,6 @@ CXXOPTS := $(CXXFLAGS) $(PICFLAG) -fno-exceptions -fno-rtti
 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)
index 006efe07b35432c67479ccc253dbc1f8cdd52120..1353479becaf4130efcde468fa3bda48d1f32fc7 100755 (executable)
@@ -622,7 +622,6 @@ ac_includes_default="\
 
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
-NETLIBS
 get_gcc_base_ver
 EGREP
 GREP
@@ -1670,52 +1669,6 @@ $as_echo "$ac_res" >&6; }
   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_cxx_check_header_compile
-
-# ac_fn_cxx_try_link LINENO
-# -------------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_link ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext conftest$ac_exeext
-  if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-        test -z "$ac_cxx_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        test -x conftest$ac_exeext
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_retval=1
-fi
-  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
-  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
-  # interfere with the next link command; also delete a directory that is
-  # left behind by Apple's compiler.  We do this before executing the actions.
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_link
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
@@ -3766,170 +3719,6 @@ fi
 
 
 
-# Solaris needs libsocket and libnsl for socket functions before 11.4.
-# libcody uses those.
-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"
-
-
 ac_config_headers="$ac_config_headers config.h"
 
 ac_config_files="$ac_config_files Makefile"
index 2b56256b3955548c8b5bb9f20b1396f555a9581c..bc0ae382f0a2630c0a4fc5314cf6fd0e36148930 100644 (file)
@@ -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])
 
index a74761b7ab32d85f88aeb1c3d7850920e5df35a8..ecd511463572f6ccfe00ed7f7ab2a37568e42106 100644 (file)
@@ -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@
index c0fcbeb5f990e13b812c20156d10d3522bf5f697..762e9490b6a865dadeb029f8852df11ecdd6ae99 100644 (file)
@@ -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])
index 95c91ee02be4403567d63ac566ab8d3b956a6d74..65bbe9e840fc72b76bc47b00bd3d904e278b5ac0 100644 (file)
@@ -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}"
index f3de4ba6776bd1cb32a3f617397a6343455362c3..e41b6dc97cdd6a4116fe9f6b2fe5e64a2e68ac47 100644 (file)
 #endif
 
 
-/* Define 0/1 if your linker supports the SHF_MERGE flag with section
-   alignment > 1. */
-#ifndef USED_FOR_TARGET
-#undef HAVE_LD_ALIGNED_SHF_MERGE
-#endif
-
-
 /* Define if your linker supports --as-needed/--no-as-needed or equivalent
    options. */
 #ifndef USED_FOR_TARGET
 #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
index e67e5f625333cfed0269d5f189c0c81622b57434..e58335adc8f0b77210c6443a26ea3748dc024a33 100644 (file)
@@ -5976,12 +5976,10 @@ ix86_setup_frame_addresses (void)
   cfun->machine->accesses_prev_frame = 1;
 }
 \f
-#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
index 85c1f9daf6a9f6265b21dee0fd4889766e194023..c602a9451ae0c391d3f2466b34315fcd7a1156f4 100644 (file)
@@ -204,7 +204,7 @@ along with GCC; see the file COPYING3.  If not see
      %{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.  If not see
 
 /* 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.  If not see
                              :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}"
@@ -427,14 +418,13 @@ along with GCC; see the file COPYING3.  If not see
 #endif
 
 #ifdef USE_GLD
-/* Solaris 11 build 135+ implements dl_iterate_phdr.  GNU ld needs
-   --eh-frame-hdr to create the required .eh_frame_hdr sections.  */
-#if defined(HAVE_LD_EH_FRAME_HDR) && defined(TARGET_DL_ITERATE_PHDR)
+/* GNU ld needs --eh-frame-hdr to create the required .eh_frame_hdr sections.  */
+#if defined(HAVE_LD_EH_FRAME_HDR)
 #define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
-#endif /* HAVE_LD_EH_FRAME && TARGET_DL_ITERATE_PHDR */
+#endif /* HAVE_LD_EH_FRAME */
 #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}"
index 23da7d55d62e328f79331d0272ba2ac162d425dd..aaf5899cc039f4a2b44bcfdcd04522cb57775c93 100755 (executable)
@@ -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
@@ -27105,23 +26940,6 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-gcc_cv_ld_aligned_shf_merge=yes
-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_ld_aligned_shf_merge=no
-    fi
-    ;;
-esac
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_LD_ALIGNED_SHF_MERGE `if test $gcc_cv_ld_aligned_shf_merge = yes; then echo 1; else echo 0; fi`
-_ACEOF
-
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for COMDAT group support (GNU as)" >&5
 $as_echo_n "checking assembler for COMDAT group support (GNU as)... " >&6; }
 if ${gcc_cv_as_comdat_group+:} false; then :
@@ -27303,35 +27121,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 :
@@ -33631,14 +33420,7 @@ $as_echo_n "checking dl_iterate_phdr in target C library... " >&6; }
 gcc_cv_target_dl_iterate_phdr=unknown
 case "$target" in
   *-*-solaris2*)
-    # <link.h> needs both a dl_iterate_phdr declaration and support for
-    # compilation with largefile support.
-    if grep dl_iterate_phdr $target_header_dir/link.h > /dev/null 2>&1 \
-      && grep 'large file capable' $target_header_dir/link.h > /dev/null 2>&1; then
-      gcc_cv_target_dl_iterate_phdr=yes
-    else
-      gcc_cv_target_dl_iterate_phdr=no
-    fi
+    gcc_cv_target_dl_iterate_phdr=yes
     ;;
   *-*-dragonfly* | *-*-freebsd*)
     if grep dl_iterate_phdr $target_header_dir/sys/link_elf.h > /dev/null 2>&1; then
index d7cf0b92cd8cc2e2f640388919f293da0c8f40cd..f8d67efeb9886fad87589f24fc22aee2866ab7fb 100644 (file)
@@ -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"
@@ -3599,21 +3590,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.])
 
-gcc_cv_ld_aligned_shf_merge=yes
-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_ld_aligned_shf_merge=no
-    fi
-    ;;
-esac
-AC_DEFINE_UNQUOTED(HAVE_LD_ALIGNED_SHF_MERGE,
-  [`if test $gcc_cv_ld_aligned_shf_merge = yes; then echo 1; else echo 0; fi`],
-[Define 0/1 if your linker supports the SHF_MERGE flag with section alignment > 1.])
-
 gcc_GAS_CHECK_FEATURE([COMDAT group support (GNU as)],
  gcc_cv_as_comdat_group,
  [--fatal-warnings],
@@ -3723,31 +3699,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
@@ -7153,14 +7104,7 @@ AC_MSG_CHECKING(dl_iterate_phdr in target C library)
 gcc_cv_target_dl_iterate_phdr=unknown
 case "$target" in
   *-*-solaris2*)
-    # <link.h> needs both a dl_iterate_phdr declaration and support for
-    # compilation with largefile support.
-    if grep dl_iterate_phdr $target_header_dir/link.h > /dev/null 2>&1 \
-      && grep 'large file capable' $target_header_dir/link.h > /dev/null 2>&1; then
-      gcc_cv_target_dl_iterate_phdr=yes
-    else
-      gcc_cv_target_dl_iterate_phdr=no
-    fi
+    gcc_cv_target_dl_iterate_phdr=yes
     ;;
   *-*-dragonfly* | *-*-freebsd*)
     if grep dl_iterate_phdr $target_header_dir/sys/link_elf.h > /dev/null 2>&1; then
index f153891a1ef6962a40223ccc56026f02f812bb31..026cf8d708838fa45dab467443dbc7bb51a0327a 100644 (file)
@@ -143,7 +143,7 @@ cc1plus-checksum.cc : build/genchecksum$(build_exeext) checksum-options \
 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)
 
index 9f2e427be68b6bc1bf37b7422fa175e3e000f148..42b462a2ce2fc2a4be29e9337f7bb4ac00aa3fae 100644 (file)
@@ -4293,7 +4293,7 @@ found on @uref{https://www.bitwizard.nl/sig11/,,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*}.
@@ -4895,15 +4895,12 @@ supported as cross-compilation target only.
 @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.
@@ -4922,18 +4919,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
@@ -4957,7 +4954,7 @@ will be disabled if no appropriate version is found.  Solaris
 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
@@ -4967,20 +4964,8 @@ configuring with @option{--enable-libphobos}.  Also, GDC 9.4.0 is
 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 />
index 089e4d4d3bf94ffd73d58b47cc4ce19f11ff4548..d725119aa74f3e6c7b38ca716a78d8c174e3f046 100644 (file)
@@ -80,7 +80,7 @@ cc1objplus$(exeext): $(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) \
        @$(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.
index 3a55b2a4159cc68cdbbf8249aa537ab2bec5d2c4..6f5d477b1288105c1d7a5cd667272ec5ef5171ad 100644 (file)
@@ -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
 }
 
index 747f74ba1c008a401eefc16c7c693e667ea501e3..d5cb899ebc48001bc1894b9ce8a16d9fdb445063 100644 (file)
@@ -886,9 +886,6 @@ mergeable_string_section (tree decl ATTRIBUTE_UNUSED,
          if (align < modesize)
            align = modesize;
 
-         if (!HAVE_LD_ALIGNED_SHF_MERGE && align > 8)
-           return readonly_data_section;
-
          str = TREE_STRING_POINTER (decl);
          unit = GET_MODE_SIZE (mode);
 
@@ -927,8 +924,7 @@ mergeable_constant_section (machine_mode mode ATTRIBUTE_UNUSED,
       && known_le (GET_MODE_BITSIZE (mode), align)
       && align >= 8
       && align <= 256
-      && (align & (align - 1)) == 0
-      && (HAVE_LD_ALIGNED_SHF_MERGE ? 1 : align == 8))
+      && (align & (align - 1)) == 0)
     {
       const char *prefix = function_mergeable_rodata_prefix ();
       char *name = (char *) alloca (strlen (prefix) + 30);
index e75a7af647f6004ce004b4a9eb46949507727dff..a8e465aa3abb35258845d512361097784ea8a11d 100644 (file)
@@ -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
index 8f7dd437b0ed647c835b5bb1161ff97b3d3500bd..a8b6f91610e7b37377d64e03127c4b2d2b93bdc2 100644 (file)
@@ -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 (file)
index 64c0339..0000000
+++ /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
index 652fd1ed946ff56d7fc014b942f39338f4a1edad..7b30174a3e1c34182674e304f4c879d7194ea6f9 100644 (file)
@@ -316,29 +316,6 @@ internal_mcount (char *selfpc, unsigned short *frompcindex)
 /* 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;
index 3ac1be37a34f69a4306f9ac0f365ea27615d7e2f..e7494c54f08db4b12d0ee07f9fb20d25106e31ad 100644 (file)
@@ -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 (file)
index fecbb66..0000000
+++ /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
index cff1eff962566abcf8e2e1d228f3614b92e9dbd1..a69d314374a35a379077e6fc8429ad0aaf91b2ab 100755 (executable)
@@ -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; }
index 4e8c036990f040989951f7d73e5e178d7b837a5f..c2749fe0958483432215ce5a1877989479244322 100644 (file)
@@ -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],
index 802bfc0b492b8bedbd301cba0f052ffeef0fd39f..84f9e3ebc730c8cd7d602db36449189b9686eee2 100644 (file)
@@ -296,11 +296,7 @@ proc add_options_for_no_pch { flags } {
 # Add to FLAGS all the target-specific flags needed for networking.
 
 proc add_options_for_net_ts { flags } {
-    # Before they were integrated into libc in Solaris 11.4, Solaris needs
-    # libsocket and libnsl for networking applications.
-    if { [istarget *-*-solaris2*] } {
-       return "$flags -lsocket -lnsl"
-    } elseif { [istarget *-*-rtems*] } {
+    if { [istarget *-*-rtems*] } {
        return "$flags -lbsd -Wl,--gc-sections"
     }
     return $flags