public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Remove obsolete Solaris 10 libgo support
@ 2019-05-13 11:49 Rainer Orth
  2019-05-13 20:27 ` Ian Lance Taylor
  0 siblings, 1 reply; 3+ messages in thread
From: Rainer Orth @ 2019-05-13 11:49 UTC (permalink / raw)
  To: gcc-patches; +Cc: Ian Lance Taylor

[-- Attachment #1: Type: text/plain, Size: 679 bytes --]

Here's the libgo part of the Solaris 10 removal patch.  I wonder if the
cleanup is worthwhile given the small size of the patch.

Bootstrapped without regressions on i386-pc-solaris2.11 and
sparc-sun-solaris2.11 together with the main patch.

	Rainer

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


2019-05-11  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	libgo:
	* configure.ac (OSCFLAGS): Simplify Solaris triplet.
	* configure: Regenerate.
	* mksysinfo.sh (Pw_uid, Pw_gid): Remove Solaris 10 workaround.

	* go/runtime/signal_gccgo.go (sigcode): Remove Solaris 10
	workaround.



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sol10-removal-libgo.patch --]
[-- Type: text/x-patch, Size: 1656 bytes --]

# HG changeset patch
# Parent  51af0604e57ec839b47bfaff79f7d1877a70f6a1
Remove obsolete Solaris 10 libgo support

diff --git a/libgo/configure.ac b/libgo/configure.ac
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -397,7 +397,7 @@ case "$target" in
 	# msghdr in <sys/socket.h>.
 	OSCFLAGS="$OSCFLAGS -D_XOPEN_SOURCE=500"
 	;;
-    *-*-solaris2.1[[01]])
+    *-*-solaris2.*)
 	# Solaris 10+ needs this so struct msghdr gets the msg_control
 	# etc. fields in <sys/socket.h> (_XPG4_2).  _XOPEN_SOURCE=600 as
 	# above doesn't work with C99.
diff --git a/libgo/go/runtime/signal_gccgo.go b/libgo/go/runtime/signal_gccgo.go
--- a/libgo/go/runtime/signal_gccgo.go
+++ b/libgo/go/runtime/signal_gccgo.go
@@ -60,11 +60,6 @@ type sigctxt struct {
 }
 
 func (c *sigctxt) sigcode() uint64 {
-	if c.info == nil {
-		// This can happen on Solaris 10.  We don't know the
-		// code, just avoid a misleading value.
-		return _SI_USER + 1
-	}
 	return uint64(c.info.si_code)
 }
 
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
--- a/libgo/mksysinfo.sh
+++ b/libgo/mksysinfo.sh
@@ -734,16 +734,6 @@ if ! grep "const EAI_OVERFLOW " ${OUT} >
   echo "const EAI_OVERFLOW = 0" >> ${OUT}
 fi
 
-# The passwd struct.
-# Force uid and gid from int32 to uint32 for consistency; they are
-# int32 on Solaris 10 but uint32 everywhere else including Solaris 11.
-grep '^type _passwd ' gen-sysinfo.go | \
-    sed -e 's/_passwd/Passwd/' \
-      -e 's/ pw_/ Pw_/g' \
-      -e 's/ Pw_uid int32/ Pw_uid uint32/' \
-      -e 's/ Pw_gid int32/ Pw_gid uint32/' \
-    >> ${OUT}
-
 # The group struct.
 grep '^type _group ' gen-sysinfo.go | \
     sed -e 's/_group/Group/' \

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Remove obsolete Solaris 10 libgo support
  2019-05-13 11:49 Remove obsolete Solaris 10 libgo support Rainer Orth
@ 2019-05-13 20:27 ` Ian Lance Taylor
  2019-05-13 21:00   ` Rainer Orth
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Lance Taylor @ 2019-05-13 20:27 UTC (permalink / raw)
  To: Rainer Orth; +Cc: gcc-patches, gofrontend-dev

[-- Attachment #1: Type: text/plain, Size: 399 bytes --]

From: Rainer Orth <ro@cebitec.uni-bielefeld.de>

> Here's the libgo part of the Solaris 10 removal patch.  I wonder if the
> cleanup is worthwhile given the small size of the patch.
>
> Bootstrapped without regressions on i386-pc-solaris2.11 and
> sparc-sun-solaris2.11 together with the main patch.

Thanks.  The patch to mksysinfo.sh wasn't quite right.  This was the
patch that I committed.

Ian

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 2027 bytes --]

Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE	(revision 271088)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -1,4 +1,4 @@
-5c2c4743980556c041561533ef31762f524737ca
+3f015e128bf6d1d9279f3d43e26f60f0927019cb
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/configure.ac
===================================================================
--- libgo/configure.ac	(revision 270877)
+++ libgo/configure.ac	(working copy)
@@ -397,7 +397,7 @@ case "$target" in
 	# msghdr in <sys/socket.h>.
 	OSCFLAGS="$OSCFLAGS -D_XOPEN_SOURCE=500"
 	;;
-    *-*-solaris2.1[[01]])
+    *-*-solaris2.*)
 	# Solaris 10+ needs this so struct msghdr gets the msg_control
 	# etc. fields in <sys/socket.h> (_XPG4_2).  _XOPEN_SOURCE=600 as
 	# above doesn't work with C99.
Index: libgo/go/runtime/signal_gccgo.go
===================================================================
--- libgo/go/runtime/signal_gccgo.go	(revision 270877)
+++ libgo/go/runtime/signal_gccgo.go	(working copy)
@@ -60,11 +60,6 @@ type sigctxt struct {
 }
 
 func (c *sigctxt) sigcode() uint64 {
-	if c.info == nil {
-		// This can happen on Solaris 10.  We don't know the
-		// code, just avoid a misleading value.
-		return _SI_USER + 1
-	}
 	return uint64(c.info.si_code)
 }
 
Index: libgo/mksysinfo.sh
===================================================================
--- libgo/mksysinfo.sh	(revision 270877)
+++ libgo/mksysinfo.sh	(working copy)
@@ -735,13 +735,9 @@ if ! grep "const EAI_OVERFLOW " ${OUT} >
 fi
 
 # The passwd struct.
-# Force uid and gid from int32 to uint32 for consistency; they are
-# int32 on Solaris 10 but uint32 everywhere else including Solaris 11.
 grep '^type _passwd ' gen-sysinfo.go | \
     sed -e 's/_passwd/Passwd/' \
       -e 's/ pw_/ Pw_/g' \
-      -e 's/ Pw_uid int32/ Pw_uid uint32/' \
-      -e 's/ Pw_gid int32/ Pw_gid uint32/' \
     >> ${OUT}
 
 # The group struct.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Remove obsolete Solaris 10 libgo support
  2019-05-13 20:27 ` Ian Lance Taylor
@ 2019-05-13 21:00   ` Rainer Orth
  0 siblings, 0 replies; 3+ messages in thread
From: Rainer Orth @ 2019-05-13 21:00 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-patches, gofrontend-dev

Hi Ian,

> Thanks.  The patch to mksysinfo.sh wasn't quite right.  This was the
> patch that I committed.

that was the only part I'd added at the very last minute without testing
it.  I'd already noticed the mess myself earlier this evening when it
broke my own bootstraps.  Sorry for the mess and thanks.

	Rainer

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-13 21:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-13 11:49 Remove obsolete Solaris 10 libgo support Rainer Orth
2019-05-13 20:27 ` Ian Lance Taylor
2019-05-13 21:00   ` Rainer Orth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).