This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[build, libgcc, libgo] Adapt Solaris 12 references


With the change in the Solaris release model (no more major releases
like Solaris 12 but only minor ones like 11.4), the Solaris 12
references in GCC need to be adapted.

The following patch does this, consisting mostly of comment changes.

Only a few changes bear comment:

* Solaris 11.4 introduced __cxa_atexit, so we have to enable it on
  *-*-solaris2.11.  Not a problem for native builds which check for the
  actual availability of the function.

* gcc.dg/torture/pr60092.c was xfailed on *-*-solaris2.11*, but the
  underlying bug was fixed in Solaris 12/11.4.  However, now 11.3 and
  11.4 have the same configure triplet.  To avoid noise on the newest
  release, I've removed the xfail.

I've left a few references to Solaris 12 builds in
libstdc++-v3/acinclude.m4 because those hadn't been renamed
retroactively, of course.

install.texi needs some work, too, but I'll address this separately
because there's more than just the version change.

Bootstrapped without regressions on {i386-pc, sparc-sun}-solaris2.1[01]
(both Solaris 11.3 and 11.4).  I believe I need approval only for the
libgo parts.

I'm going to backport the patch to the gcc-7 and gcc-6 branches after a
bit of soak time.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2017-07-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	libgo:
	* Makefile.am [LIBGO_IS_SOLARIS && HAVE_STAT_TIMESPEC]: Adapt
	comment for Solaris 12 renaming.
	* Makefile.in: Regenerate.
	* configure.ac (have_stat_timespec): Likewise.
	* configure: Regenerate.
	* mkrsysinfo.sh (_flow_arp_desc_t, _flow_l3_desc_t, _mac_ipaddr_t)
	(_mactun_info_t): Adapt comments for Solaris 12 renaming and
	backports.
	* mkrsysinfo.sh (_flow_arp_desc_t, _flow_l3_desc_t, _mac_ipaddr_t)
	(_mactun_info_t): Likewise.

	libgcc:
	* config.host (*-*-solaris2*): Adapt comment for Solaris 12
	renaming.
	* config/sol2/crtpg.c (__start_crt_compiler): Likewise.
	* configure.ac (libgcc_cv_solaris_crts): Likewise.
	* configure: Regenerate.

	gcc:
	* config.gcc (*-*-solaris2*): Enable default_use_cxa_atexit since
	Solaris 11.  Update comment.
	* configure.ac (gcc_cv_ld_pid): Adapt comment for Solaris 12
	renaming.
	* config/sol2.h (STARTFILE_SPEC): Likewise.
	* configure: Regenerate.

	gcc/testsuite:
	* lib/target-supports.exp (check_effective_target_pie): Adapt
	comment for Solaris 12 renaming.

	* gcc.dg/torture/pr60092.c: Remove *-*-solaris2.11* dg-xfail-run-if.

# HG changeset patch
# Parent  f752fe4435b62bc0cae5d59f32c22db221b0c6f0
Adapt Solaris 12 references

diff --git a/gcc/config.gcc b/gcc/config.gcc
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -851,8 +851,8 @@ case ${target} in
   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[2-9]*)
-      # __cxa_atexit was introduced in Solaris 12.
+    *-*-solaris2.1[1-9]*)
+      # __cxa_atexit was introduced in Solaris 11.4.
       default_use_cxa_atexit=yes
       ;;
   esac
diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h
--- a/gcc/config/sol2.h
+++ b/gcc/config/sol2.h
@@ -208,8 +208,8 @@ 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.x and Solaris 12, the OS delivers crt1.o, crti.o, and
-   crtn.o, with a hook for compiler-dependent stuff like profile handling.  */
+/* 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: \
 			  crt1.o%s \
 			  %{p:%e-p is not supported; \
diff --git a/gcc/configure.ac b/gcc/configure.ac
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -5091,7 +5091,7 @@ elif test x$gcc_cv_ld != x; then
   else
     case "$target" in
       *-*-solaris2.1[[1-9]]*)
-	# Solaris 11.x and Solaris 12 added PIE support.
+	# Solaris 11.3 added PIE support.
 	if $gcc_cv_ld -z help 2>&1 | grep -- type.*pie > /dev/null; then
 	  gcc_cv_ld_pie=yes
 	fi
diff --git a/gcc/testsuite/gcc.dg/torture/pr60092.c b/gcc/testsuite/gcc.dg/torture/pr60092.c
--- a/gcc/testsuite/gcc.dg/torture/pr60092.c
+++ b/gcc/testsuite/gcc.dg/torture/pr60092.c
@@ -4,7 +4,6 @@
 /* { dg-skip-if "No undefined weak" { nvptx-*-* } } */
 /* { dg-additional-options "-Wl,-undefined,dynamic_lookup" { target *-*-darwin* } } */
 /* { dg-additional-options "-Wl,-flat_namespace" { target *-*-darwin[89]* } } */
-/* { dg-xfail-run-if "posix_memalign modifies first arg on error" { *-*-solaris2.11* } { "-O0" } } */
 
 typedef __SIZE_TYPE__ size_t;
 extern int posix_memalign(void **memptr, size_t alignment, size_t size) __attribute__((weak));
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
@@ -1170,8 +1170,8 @@ proc check_effective_target_pie { } {
 	return 1;
     }
     if { [istarget *-*-solaris2.1\[1-9\]*] } {
-	# Full PIE support was added in Solaris 11.x and Solaris 12, but gcc
-	# errors out if missing, so check for that.
+	# 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"]
diff --git a/libgcc/config.host b/libgcc/config.host
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -277,7 +277,7 @@ case ${host} in
   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.x and 12 provide crt1.o, crti.o, and crtn.o as part of the
+    # 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.
diff --git a/libgcc/config/sol2/crtpg.c b/libgcc/config/sol2/crtpg.c
--- a/libgcc/config/sol2/crtpg.c
+++ b/libgcc/config/sol2/crtpg.c
@@ -31,11 +31,10 @@ extern char _start[], _etext[];
 
 int __start_crt_compiler (int, char **);
 
-/* Since Solaris 11.x and Solaris 12, the system-provided CRTs provide a
-   hook to invoke initialization code early during process startup.
-   __start_crt_compiler is documented in crt1.o(5).  We use it to perform
-   initialization for profiling as a substitute for the earlier separate
-   gcrt1.o.  */
+/* Since Solaris 11.4, the system-provided CRTs provide a hook to invoke
+   initialization code early during process startup.  __start_crt_compiler
+   is documented in crt1.o(5).  We use it to perform initialization for
+   profiling as a substitute for the earlier separate gcrt1.o.  */
 
 int
 __start_crt_compiler (int argc __attribute__ ((unused)),
diff --git a/libgcc/configure.ac b/libgcc/configure.ac
--- a/libgcc/configure.ac
+++ b/libgcc/configure.ac
@@ -296,7 +296,7 @@ esac
 
 case ${host} in
 *-*-solaris2*)
-  # Check for system-provided CRTs on Solaris 11.x and Solaris 12.
+  # 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
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
--- a/libgo/Makefile.am
+++ b/libgo/Makefile.am
@@ -1111,7 +1111,7 @@ syscall/wait.lo: go/syscall/wait.c runti
 	@$(MKDIR_P) syscall
 	$(LTCOMPILE) -c -o $@ $(srcdir)/go/syscall/wait.c
 
-# Solaris 12 changed the type of fields in struct stat.
+# Solaris 11.4 changed the type of fields in struct stat.
 # Use a build tag, based on a configure check, to cope.
 if LIBGO_IS_SOLARIS
 if HAVE_STAT_TIMESPEC
diff --git a/libgo/configure.ac b/libgo/configure.ac
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -757,7 +757,7 @@ STRUCT_EPOLL_EVENT_FD_OFFSET=${libgo_cv_
 AC_SUBST(STRUCT_EPOLL_EVENT_FD_OFFSET)
 
 dnl Check if <sys/stat.h> uses timespec_t for st_?tim members.  Introduced
-dnl in Solaris 12 for XPG7 compatibility.
+dnl in Solaris 11.4 for XPG7 compatibility.
 AC_EGREP_HEADER([timespec_t.*st_atim], [sys/stat.h],
 		[have_stat_timespec=yes], [have_stat_timespec=no])
 AM_CONDITIONAL(HAVE_STAT_TIMESPEC, test $have_stat_timespec = yes)
diff --git a/libgo/mkrsysinfo.sh b/libgo/mkrsysinfo.sh
--- a/libgo/mkrsysinfo.sh
+++ b/libgo/mkrsysinfo.sh
@@ -163,22 +163,22 @@ grep '^type _zone_net_addr_t ' gen-sysin
     sed -e 's/_in6_addr/[16]byte/' \
     >> ${OUT}
 
-# The Solaris 12 _flow_arp_desc_t struct.
+# The Solaris 11.4 _flow_arp_desc_t struct.
 grep '^type _flow_arp_desc_t ' gen-sysinfo.go | \
     sed -e 's/_in6_addr_t/[16]byte/g' \
     >> ${OUT}
 
-# The Solaris 12 _flow_l3_desc_t struct.
+# The Solaris 11.4 _flow_l3_desc_t struct.
 grep '^type _flow_l3_desc_t ' gen-sysinfo.go | \
     sed -e 's/_in6_addr_t/[16]byte/g' \
     >> ${OUT}
 
-# The Solaris 12 _mac_ipaddr_t struct.
+# The Solaris 11.3 _mac_ipaddr_t struct.
 grep '^type _mac_ipaddr_t ' gen-sysinfo.go | \
     sed -e 's/_in6_addr_t/[16]byte/g' \
     >> ${OUT}
 
-# The Solaris 12 _mactun_info_t struct.
+# The Solaris 11.3 _mactun_info_t struct.
 grep '^type _mactun_info_t ' gen-sysinfo.go | \
     sed -e 's/_in6_addr_t/[16]byte/g' \
     >> ${OUT}
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
--- a/libgo/mksysinfo.sh
+++ b/libgo/mksysinfo.sh
@@ -1288,22 +1288,22 @@ grep '^type _zone_net_addr_t ' gen-sysin
     sed -e 's/_in6_addr/[16]byte/' \
     >> ${OUT}
 
-# The Solaris 12 _flow_arp_desc_t struct.
+# The Solaris 11.4 _flow_arp_desc_t struct.
 grep '^type _flow_arp_desc_t ' gen-sysinfo.go | \
     sed -e 's/_in6_addr_t/[16]byte/g' \
     >> ${OUT}
 
-# The Solaris 12 _flow_l3_desc_t struct.
+# The Solaris 11.4 _flow_l3_desc_t struct.
 grep '^type _flow_l3_desc_t ' gen-sysinfo.go | \
     sed -e 's/_in6_addr_t/[16]byte/g' \
     >> ${OUT}
 
-# The Solaris 12 _mac_ipaddr_t struct.
+# The Solaris 11.3 _mac_ipaddr_t struct.
 grep '^type _mac_ipaddr_t ' gen-sysinfo.go | \
     sed -e 's/_in6_addr_t/[16]byte/g' \
     >> ${OUT}
 
-# The Solaris 12 _mactun_info_t struct.
+# The Solaris 11.3 _mactun_info_t struct.
 grep '^type _mactun_info_t ' gen-sysinfo.go | \
     sed -e 's/_in6_addr_t/[16]byte/g' \
     >> ${OUT}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]