diff mbox

Remove obsolete Solaris 9 support

Message ID CAKOQZ8ynmQ02tGrYrRk7XY9A0DTO79wFrHkWezBJtMyEMbw3CQ@mail.gmail.com
State New
Headers show

Commit Message

Ian Lance Taylor April 16, 2014, 8:34 p.m. UTC
On Wed, Apr 16, 2014 at 1:02 PM, Rainer Orth
<ro@cebitec.uni-bielefeld.de> wrote:
> Ian Lance Taylor <iant@google.com> writes:
>
>> On Wed, Apr 16, 2014 at 4:16 AM, Rainer Orth
>> <ro@cebitec.uni-bielefeld.de> wrote:
>>>
>>> * Ian: I've removed Solaris 8 and 9 support from libgo.  I'm uncertain
>>>   if you want this or rather keep that support for the 4.[789] branches?
>>
>> I want it.  I don't try to maintain exact copies of older GCC
>> branches.
>>
>> Your patch appears separable, and I can commit the libgo part.  Let me
>> know when I should do so.
>
> Go ahead whenever you like.  It's at most a few days until I commit the
> rest, Solaris 9 isn't supposed to work on mainline any longer, and the
> libgo part is independent of the rest.
>
> I've already separated the libgo and classpath parts from my main patch.

Thanks.  Committed attached patch to mainline.

Ian
diff mbox

Patch

diff -r 98547f162e12 libgo/configure.ac
--- a/libgo/configure.ac	Thu Apr 10 09:25:24 2014 -0700
+++ b/libgo/configure.ac	Wed Apr 16 13:22:16 2014 -0700
@@ -316,11 +316,6 @@ 
 	# msghdr in <sys/socket.h>.
 	OSCFLAGS="$OSCFLAGS -D_XOPEN_SOURCE=500"
 	;;
-    *-*-solaris2.[[89]])
-	# Solaris 8/9 need this so struct msghdr gets the msg_control
-	# etc. fields in <sys/socket.h> (_XPG4_2).
-	OSCFLAGS="$OSCFLAGS -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D__EXTENSIONS__"
-	;;
     *-*-solaris2.1[[01]])
 	# Solaris 10+ needs this so struct msghdr gets the msg_control
 	# etc. fields in <sys/socket.h> (_XPG4_2).  _XOPEN_SOURCE=600 as
@@ -662,21 +657,6 @@ 
             [Define to 1 if <math.h> defines struct exception])
 fi
 
-dnl Check if makecontext expects the uc_stack member of ucontext to point
-dnl to the top of the stack.
-case "$target" in
-  sparc*-*-solaris2.[[89]]*)
-    libgo_cv_lib_makecontext_stack_top=yes
-    ;;
-  *)
-    libgo_cv_lib_makecontext_stack_top=no
-    ;;
-esac
-if test "$libgo_cv_lib_makecontext_stack_top" = "yes"; then
-  AC_DEFINE(MAKECONTEXT_STACK_TOP, 1,
-	    [Define if makecontext expects top of stack in uc_stack.])
-fi
-
 dnl See whether setcontext changes the value of TLS variables.
 AC_CACHE_CHECK([whether setcontext clobbers TLS variables],
 [libgo_cv_lib_setcontext_clobbers_tls],
diff -r 98547f162e12 libgo/go/math/ldexp.go
--- a/libgo/go/math/ldexp.go	Thu Apr 10 09:25:24 2014 -0700
+++ b/libgo/go/math/ldexp.go	Wed Apr 16 13:22:16 2014 -0700
@@ -17,16 +17,6 @@ 
 
 func Ldexp(frac float64, exp int) float64 {
 	r := libc_ldexp(frac, exp)
-
-	// Work around a bug in the implementation of ldexp on Solaris
-	// 9.  If multiplying a negative number by 2 raised to a
-	// negative exponent underflows, we want to return negative
-	// zero, but the Solaris 9 implementation returns positive
-	// zero.  This workaround can be removed when and if we no
-	// longer care about Solaris 9.
-	if r == 0 && frac < 0 && exp < 0 {
-		r = Copysign(0, frac)
-	}
 	return r
 }
 
diff -r 98547f162e12 libgo/runtime/proc.c
--- a/libgo/runtime/proc.c	Thu Apr 10 09:25:24 2014 -0700
+++ b/libgo/runtime/proc.c	Wed Apr 16 13:22:16 2014 -0700
@@ -1212,9 +1212,6 @@ 
 	// here we need to set up the context for g0.
 	getcontext(&mp->g0->context);
 	mp->g0->context.uc_stack.ss_sp = g0_sp;
-#ifdef MAKECONTEXT_STACK_TOP
-	mp->g0->context.uc_stack.ss_sp += g0_spsize;
-#endif
 	mp->g0->context.uc_stack.ss_size = g0_spsize;
 	makecontext(&mp->g0->context, kickoff, 0);