Like Mike said, we're working on it, so please don't spend any time
tracking down the problems unless you just want to do it for fun.  The
attached patch is (hopefully) in the final phases of testing, and you may
find it useful, though you should also be careful also to have the latest
rev of Studio 11 (ube -V should say 120759-04).  Note that the CTF errors
you're getting are solved by adding -xdebugformat=stabs to CTF_FLAGS in
Makefile.master.  The other changes are there for more subtle problems.

Danek
------- usr/src/Makefile.master -------

Index: usr/src/Makefile.master
--- a/usr/src/Makefile.master   Wed May 24 00:33:16 2006
+++ b/usr/src/Makefile.master   Thu May 25 03:30:01 2006
@@ -23,7 +23,7 @@
 # Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident        "@(#)Makefile.master    1.205   06/05/19 SMI"
+# ident        "@(#)Makefile.master    1.206   06/05/25 SMI"
 #
 
 #
@@ -280,6 +280,9 @@
 CCCREGSYM=             -Qoption cg -Qiselect-regsym=0
 
 #
+# prevent static symbols being optimized out
+CCSTATICSYM=           -Wc,-Qassembler-ounrefsym=0
+#
 # generate 32-bit addresses in the v9 kernel. Saves memory.
 CCABS32=               -Wc,-xcode=abs32
 
@@ -358,7 +361,8 @@
 # In most places, assignments to these macros should be appended with +=
 # (CPPFLAGS.master allows values to be prepended to CPPFLAGS).
 sparc_CFLAGS=  $(sparc_XARCH)
-sparcv9_CFLAGS=        $(sparcv9_XARCH) -dalign $(CCVERBOSE) $(V9ABIWARN) 
$(CCREGSYM)
+sparcv9_CFLAGS=        $(sparcv9_XARCH) -dalign $(CCVERBOSE) $(V9ABIWARN) 
$(CCREGSYM) \
+       $(CCSTATICSYM)
 i386_CFLAGS=   $(i386_XARCH)
 amd64_CFLAGS=  $(amd64_XARCH)
 
@@ -394,7 +398,7 @@
 #
 CTF_FLAGS_sparc        = -g -Wc,-Qiselect-T1 $(C99MODE) $(CNOGLOBAL) 
$(CDWARFSTR)
 CTF_FLAGS_i386 = -g $(C99MODE) $(CNOGLOBAL) $(CDWARFSTR)
-CTF_FLAGS      = $(CTF_FLAGS_$(MACH))
+CTF_FLAGS      = $(CTF_FLAGS_$(MACH)) -xdebugformat=stabs
 
 #
 # Flags used with genoffsets
@@ -412,8 +416,8 @@
 #
 # tradeoff time for space (smaller is better)
 #
-sparc_SPACEFLAG                = -xspace -W0,-Lt -W2,-Rcond_elim
-sparcv9_SPACEFLAG      = -xspace -W0,-Lt -W2,-Rcond_elim
+sparc_SPACEFLAG                = -xspace -W0,-Lt -W2,-Rsr,-Rcond_elim
+sparcv9_SPACEFLAG      = -xspace -W0,-Lt -W2,-Rsr,-Rcond_elim
 i386_SPACEFLAG         = -xspace
 amd64_SPACEFLAG                =
 
@@ -580,7 +584,7 @@
 # Defined here so it can be overridden by developer.
 #
 SPRO_ROOT=             $(BUILD_TOOLS)/SUNWspro
-SPRO_VROOT=            $(SPRO_ROOT)/SOS10
+SPRO_VROOT=            $(SPRO_ROOT)/SS11
 GNU_ROOT=              $(SFW_ROOT)
 
 # Specify platform compiler versions for languages

------- usr/src/tools/cw/cw.c -------

Index: usr/src/tools/cw/cw.c
--- a/usr/src/tools/cw/cw.c     Wed Apr 12 00:31:48 2006
+++ b/usr/src/tools/cw/cw.c     Thu Jun 15 14:45:23 2006
@@ -24,7 +24,7 @@
  * Use is subject to license terms.
  */
 
-#pragma ident  "@(#)cw.c       1.16    06/04/07 SMI"
+#pragma ident  "%Z%%M% %I%     %E% SMI"
 
 /*
  * Wrapper for the GNU C compiler to make it accept the Sun C compiler
@@ -1009,7 +1009,7 @@
                                    "-fno-eliminate-unused-debug-types");
                                break;
                        }
-                       if (strcmp(arg, "-W2,-Rcond_elim") == 0) {
+                       if (strcmp(arg, "-W2,-Rsr,-Rcond_elim") == 0) {
                                /*
                                 * Elimination and expansion of conditionals;
                                 * gcc has no direct equivalent.
@@ -1037,6 +1037,13 @@
                                 */
                                break;
                        }
+                       if (strcmp(arg, "-Wc,-Qassembler-ounrefsym=0") == 0) {
+                               /*
+                                * Prevents optimizing away of static variables.
+                                * gcc does not do this, so it's not needed.
+                                */
+                               break;
+                       }
 #if defined(__x86)
                        if (strcmp(arg, "-Wu,-no_got_reloc") == 0) {
                                newae(ctx->i_ae, "-fno-jump-tables");
@@ -1690,7 +1697,7 @@
         *              ask each for its version if we know how.
         */
        if (argc > 1 && strcmp(argv[1], "-_versions") == 0) {
-               (void) printf("%s", "cw version 1.16");
+               (void) printf("%s", "cw version %I%");
                if (!do_shadow)
                        (void) printf(" (SHADOW MODE DISABLED)");
                (void) printf("\n");

------- usr/src/uts/sparc/Makefile.sparc.shared -------

Index: usr/src/uts/sparc/Makefile.sparc.shared
--- a/usr/src/uts/sparc/Makefile.sparc.shared   Wed May  3 00:32:08 2006
+++ b/usr/src/uts/sparc/Makefile.sparc.shared   Mon Jun  5 09:34:08 2006
@@ -23,7 +23,7 @@
 # Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident        "@(#)Makefile.sparc.shared      1.9     06/04/30 SMI"
+# ident        "@(#)Makefile.sparc.shared      1.10    06/06/05 SMI"
 #
 #      This makefile contains the common definitions for all sparc
 #      implementation architecture independent modules.
@@ -136,6 +136,7 @@
 CFLAGS         += $(CTF_FLAGS)
 CFLAGS         += $(C99MODE)
 CFLAGS         += $(CCUNBOUND)
+CFLAGS         += $(CCSTATICSYM)
 CFLAGS         += -xregs=no%float
 
 ASFLAGS                += $(XARCH)

------- usr/src/uts/sun4u/Makefile.sun4u.shared -------

Index: usr/src/uts/sun4u/Makefile.sun4u.shared
--- a/usr/src/uts/sun4u/Makefile.sun4u.shared   Sun Apr  9 00:41:36 2006
+++ b/usr/src/uts/sun4u/Makefile.sun4u.shared   Wed Jun  7 07:57:21 2006
@@ -23,7 +23,7 @@
 # Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident        "@(#)Makefile.sun4u.shared      1.8     06/04/08 SMI"
+# ident        "@(#)Makefile.sun4u.shared      1.9     06/06/07 SMI"
 #
 #      This makefile contains the common definitions for the sun4u unix
 #      and all sun4u implementation architecture dependent modules.
@@ -205,6 +205,7 @@
 CFLAGS         += $(CTF_FLAGS)
 CFLAGS         += $(C99MODE)
 CFLAGS         += $(CCUNBOUND)
+CFLAGS         += $(CCSTATICSYM)
 CFLAGS         += -xregs=no%float
 
 ASFLAGS                += $(AS_XARCH)

------- usr/src/uts/sun4v/Makefile.sun4v.shared -------

Index: usr/src/uts/sun4v/Makefile.sun4v.shared
--- a/usr/src/uts/sun4v/Makefile.sun4v.shared   Wed May 17 00:37:09 2006
+++ b/usr/src/uts/sun4v/Makefile.sun4v.shared   Wed Jun  7 07:57:21 2006
@@ -23,7 +23,7 @@
 # Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-#ident "@(#)Makefile.sun4v.shared      1.6     06/05/16 SMI"
+#ident "@(#)Makefile.sun4v.shared      1.7     06/06/07 SMI"
 #
 #      This makefile contains the common definitions for the sun4v unix
 #      and all sun4v implementation architecture dependent modules.
@@ -166,6 +166,7 @@
 CFLAGS         += $(CTF_FLAGS)
 CFLAGS         += $(C99MODE)
 CFLAGS         += $(CCUNBOUND)
+CFLAGS         += $(CCSTATICSYM)
 CFLAGS         += -xregs=no%float
 CPPFLAGS       += -DGLREG
 

------- usr/src/uts/sun4v/arcfour/Makefile -------

Index: usr/src/uts/sun4v/arcfour/Makefile
--- a/usr/src/uts/sun4v/arcfour/Makefile        Thu Jul 28 00:31:15 2005
+++ b/usr/src/uts/sun4v/arcfour/Makefile        Thu Jun  8 06:35:53 2006
@@ -2,9 +2,8 @@
 # CDDL HEADER START
 #
 # The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
 #
 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 # or http://www.opensolaris.org/os/licensing.
@@ -22,10 +21,10 @@
 #
 # uts/sun4v/arcfour/Makefile
 #
-# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-#ident "@(#)Makefile   1.2     05/07/26 SMI"
+#ident "@(#)Makefile   1.3     06/06/08 SMI"
 #
 #      This makefile drives the production of the arcfour kernel module.
 #
@@ -80,7 +79,7 @@
 #
 # Override the default -xspace setting
 #
-sparc_SPACEFLAG        = -W0,-Lt -W2,-Rcond_elim
+sparc_SPACEFLAG        = -W0,-Lt -W2,-Rsr,-Rcond_elim
 
 #
 #      Default build targets.

------- usr/src/uts/sun4v/arcfour2048/Makefile -------

Index: usr/src/uts/sun4v/arcfour2048/Makefile
--- a/usr/src/uts/sun4v/arcfour2048/Makefile    Thu Jul 28 00:31:15 2005
+++ b/usr/src/uts/sun4v/arcfour2048/Makefile    Thu Jun  8 06:35:54 2006
@@ -2,9 +2,8 @@
 # CDDL HEADER START
 #
 # The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
 #
 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 # or http://www.opensolaris.org/os/licensing.
@@ -20,10 +19,10 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-#ident "@(#)Makefile   1.2     05/07/26 SMI"
+#ident "@(#)Makefile   1.3     06/06/08 SMI"
 #
 #      This makefile drives the production of the arcfour KEF provider.
 #
@@ -70,7 +69,7 @@
 #
 # Override the default -xspace setting
 #
-sparc_SPACEFLAG        = -W0,-Lt -W2,-Rcond_elim
+sparc_SPACEFLAG        = -W0,-Lt -W2,-Rsr,-Rcond_elim
 
 #
 # Turn on doubleword alignment for 64 bit registers

------- usr/src/uts/sun4v/md5/Makefile -------

Index: usr/src/uts/sun4v/md5/Makefile
--- a/usr/src/uts/sun4v/md5/Makefile    Tue Mar 28 23:36:52 2006
+++ b/usr/src/uts/sun4v/md5/Makefile    Thu May  4 10:17:24 2006
@@ -24,7 +24,7 @@
 # Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-#ident "@(#)Makefile   1.2     06/03/28 SMI"
+#ident "@(#)Makefile   1.4     06/05/04 SMI"
 #
 #      This makefile drives the production of the MD5 kernel module.
 #
@@ -65,7 +65,7 @@
 #
 # Override the default -xspace setting
 #
-sparc_SPACEFLAG        = -W0,-Lt -W2,-Rcond_elim
+sparc_SPACEFLAG        = -W0,-Lt -W2,-Rsr,-Rcond_elim
 
 #
 # md5 depends on the kcf framework
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to