diff options
| author | petede <none@none> | 2006-08-24 08:16:31 -0700 |
|---|---|---|
| committer | petede <none@none> | 2006-08-24 08:16:31 -0700 |
| commit | ac204d0d8540b5aa1b97cb5de5984f6cb831c517 (patch) | |
| tree | 08908b7a638dbaa6832571638048208d5c6a2a51 | |
| parent | 47db7e746eb0bef03d3708b9d5b48f4ca49968ba (diff) | |
| download | illumos-joyent-ac204d0d8540b5aa1b97cb5de5984f6cb831c517.tar.gz | |
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
| -rw-r--r-- | usr/src/Makefile.master | 42 | ||||
| -rw-r--r-- | usr/src/lib/gss_mechs/mech_krb5/Makefile.com | 2 | ||||
| -rw-r--r-- | usr/src/lib/gss_mechs/mech_krb5/sparc/Makefile | 4 | ||||
| -rw-r--r-- | usr/src/lib/gss_mechs/mech_krb5/sparcv9/Makefile | 4 | ||||
| -rw-r--r-- | usr/src/psm/stand/boot/i386/Makefile.com | 9 | ||||
| -rw-r--r-- | usr/src/tools/cw/cw.c | 4 | ||||
| -rw-r--r-- | usr/src/uts/sparc/Makefile.sparc.shared | 2 | ||||
| -rw-r--r-- | usr/src/uts/sun4u/Makefile.sun4u.shared | 2 | ||||
| -rw-r--r-- | usr/src/uts/sun4v/Makefile.sun4v.shared | 2 | ||||
| -rw-r--r-- | usr/src/uts/sun4v/arcfour/Makefile | 9 | ||||
| -rw-r--r-- | usr/src/uts/sun4v/arcfour2048/Makefile | 9 | ||||
| -rw-r--r-- | usr/src/uts/sun4v/md5/Makefile | 2 |
12 files changed, 63 insertions, 28 deletions
diff --git a/usr/src/Makefile.master b/usr/src/Makefile.master index e087f4791b..db2c53d0f0 100644 --- a/usr/src/Makefile.master +++ b/usr/src/Makefile.master @@ -279,6 +279,8 @@ V9ABIWARN= CCREGSYM= -Wc,-Qiselect-regsym=0 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 +360,8 @@ C99LMODE= $(C99MODE:-xc99%=-Xc99%) # 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) @@ -397,12 +400,18 @@ CDWARFSTR= -_gcc=-fno-dwarf2-indirect-strings CALLSYMS= -W0,-xdbggen=no%usedonly # +# Default debug format for Sun Studio 11 is dwarf, so force it to +# generate stabs. +# +DEBUGFORMAT= -xdebugformat=stabs + +# # Flags used to build in debug mode for ctf generation. Bugs in the Devpro # compilers currently prevent us from building with cc-emitted DWARF. # 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)) $(DEBUGFORMAT) # # Flags used with genoffsets @@ -420,14 +429,27 @@ OFFSETS_CREATE64 = $(GENOFFSETS) -s $(CTFSTABS) -r $(CTFCONVERT) \ # # 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 +sparcv9_SPACEFLAG = -xspace -W0,-Lt i386_SPACEFLAG = -xspace amd64_SPACEFLAG = SPACEFLAG = $($(MACH)_SPACEFLAG) SPACEFLAG64 = $($(MACH64)_SPACEFLAG) +# +# The Sun Studio 11 compiler has changed the behaviour of integer +# wrap arounds and so a flag is needed to use the legacy behaviour +# (without this flag panics/hangs could be exposed within the source). +# +sparc_IROPTFLAG = -W2,-xwrap_int +sparcv9_IROPTFLAG = -W2,-xwrap_int +i386_IROPTFLAG = +amd64_IROPTFLAG = + +IROPTFLAG = $($(MACH)_IROPTFLAG) +IROPTFLAG64 = $($(MACH64)_IROPTFLAG) + sparc_XREGSFLAG = -xregs=no%appl sparcv9_XREGSFLAG = -xregs=no%appl i386_XREGSFLAG = @@ -437,14 +459,18 @@ XREGSFLAG = $($(MACH)_XREGSFLAG) XREGSFLAG64 = $($(MACH64)_XREGSFLAG) CFLAGS= $(COPTFLAG) $($(MACH)_CFLAGS) $(SPACEFLAG) $(CCMODE) \ - $(ILDOFF) $(CERRWARN) $(C99MODE) $(CCUNBOUND) \ + $(ILDOFF) $(CERRWARN) $(C99MODE) $(CCUNBOUND) $(IROPTFLAG) \ $(CGLOBALSTATIC) CFLAGS64= $(COPTFLAG64) $($(MACH64)_CFLAGS) $(SPACEFLAG64) $(CCMODE64) \ - $(ILDOFF) $(CERRWARN) $(C99MODE) $(CCUNBOUND) \ + $(ILDOFF) $(CERRWARN) $(C99MODE) $(CCUNBOUND) $(IROPTFLAG64) \ $(CGLOBALSTATIC) +# +# Flags that are used to build parts of the code that are subsequently +# run on the build machine (also known as the NATIVE_BUILD). +# NATIVE_CFLAGS= $(COPTFLAG) $($(NATIVE_MACH)_CFLAGS) $(CCMODE) \ $(ILDOFF) $(CERRWARN) $(C99MODE) $($(NATIVE_MACH)_CCUNBOUND) \ - $(CGLOBALSTATIC) + $(IROPTFLAG) $(CGLOBALSTATIC) DTEXTDOM=-DTEXT_DOMAIN=\"$(TEXT_DOMAIN)\" # For messaging. DTS_ERRNO=-D_TS_ERRNO @@ -591,7 +617,7 @@ NATIVE_MACH= $(MACH:amd64=i386) # 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 diff --git a/usr/src/lib/gss_mechs/mech_krb5/Makefile.com b/usr/src/lib/gss_mechs/mech_krb5/Makefile.com index 5d3e211f97..97a7440871 100644 --- a/usr/src/lib/gss_mechs/mech_krb5/Makefile.com +++ b/usr/src/lib/gss_mechs/mech_krb5/Makefile.com @@ -220,8 +220,6 @@ include $(REL_PATH)/../../Makefile.lib # Must come after Makefile.lib so CPPFLAGS doesn't get overwritten include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5 -sparcv9_C_PICFLAGS = -K PIC - K5LIBLINK=$(LIBRARY:%.a=lib%.so) # override default text domain diff --git a/usr/src/lib/gss_mechs/mech_krb5/sparc/Makefile b/usr/src/lib/gss_mechs/mech_krb5/sparc/Makefile index b56364c572..4a270806e9 100644 --- a/usr/src/lib/gss_mechs/mech_krb5/sparc/Makefile +++ b/usr/src/lib/gss_mechs/mech_krb5/sparc/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2003 Sun Microsystems, Inc. All rights reserved. +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -27,6 +27,8 @@ include ../Makefile.com +sparc_C_PICFLAGS = $(C_BIGPICFLAGS) + .KEEP_STATE: all: $(LIBS) diff --git a/usr/src/lib/gss_mechs/mech_krb5/sparcv9/Makefile b/usr/src/lib/gss_mechs/mech_krb5/sparcv9/Makefile index 408d1fc9f5..cce46ce8d9 100644 --- a/usr/src/lib/gss_mechs/mech_krb5/sparcv9/Makefile +++ b/usr/src/lib/gss_mechs/mech_krb5/sparcv9/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2003 Sun Microsystems, Inc. All rights reserved. +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -28,6 +28,8 @@ include ../Makefile.com include ../../../Makefile.lib.64 +sparcv9_C_PICFLAGS = $(C_BIGPICFLAGS64) + .KEEP_STATE: all: $(LIBS) diff --git a/usr/src/psm/stand/boot/i386/Makefile.com b/usr/src/psm/stand/boot/i386/Makefile.com index a57dd079a2..06e00ac095 100644 --- a/usr/src/psm/stand/boot/i386/Makefile.com +++ b/usr/src/psm/stand/boot/i386/Makefile.com @@ -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. @@ -114,6 +113,10 @@ CFLAGS += -xcache=0/16/0:0/16/0 # This should be globally enabled! # CFLAGS += $(CCVERBOSE) +# +# Inherit the debug format +# +CFLAGS += $(DEBUGFORMAT) YFLAGS = -d diff --git a/usr/src/tools/cw/cw.c b/usr/src/tools/cw/cw.c index 29fc29e4d5..933ee9cf56 100644 --- a/usr/src/tools/cw/cw.c +++ b/usr/src/tools/cw/cw.c @@ -1636,10 +1636,10 @@ main(int argc, char **argv) if ((dir = getenv("SPRO_VROOT")) != NULL) { (void) snprintf(cc_buf, MAXPATHLEN, "%s/bin", dir); } else if ((dir = getenv("SPRO_ROOT")) != NULL) { - (void) snprintf(cc_buf, MAXPATHLEN, "%s/SOS10/bin", dir); + (void) snprintf(cc_buf, MAXPATHLEN, "%s/SS11/bin", dir); } else if ((dir = getenv("BUILD_TOOLS")) != NULL) { (void) snprintf(cc_buf, MAXPATHLEN, - "%s/SUNWspro/SOS10/bin", dir); + "%s/SUNWspro/SS11/bin", dir); } if (dir != NULL) { dirs[CIDX(CW_C_CC, 0)] = (const char *)cc_buf; diff --git a/usr/src/uts/sparc/Makefile.sparc.shared b/usr/src/uts/sparc/Makefile.sparc.shared index a69908f463..64ccfaf037 100644 --- a/usr/src/uts/sparc/Makefile.sparc.shared +++ b/usr/src/uts/sparc/Makefile.sparc.shared @@ -136,6 +136,8 @@ CFLAGS += $(CERRWARN) CFLAGS += $(CTF_FLAGS) CFLAGS += $(C99MODE) CFLAGS += $(CCUNBOUND) +CFLAGS += $(CCSTATICSYM) +CFLAGS += $(IROPTFLAG) CFLAGS += $(CGLOBALSTATIC) CFLAGS += -xregs=no%float diff --git a/usr/src/uts/sun4u/Makefile.sun4u.shared b/usr/src/uts/sun4u/Makefile.sun4u.shared index 7288c1582e..fc63b31e8c 100644 --- a/usr/src/uts/sun4u/Makefile.sun4u.shared +++ b/usr/src/uts/sun4u/Makefile.sun4u.shared @@ -205,6 +205,8 @@ CFLAGS += $(CERRWARN) CFLAGS += $(CTF_FLAGS) CFLAGS += $(C99MODE) CFLAGS += $(CCUNBOUND) +CFLAGS += $(CCSTATICSYM) +CFLAGS += $(IROPTFLAG) CFLAGS += $(CGLOBALSTATIC) CFLAGS += -xregs=no%float diff --git a/usr/src/uts/sun4v/Makefile.sun4v.shared b/usr/src/uts/sun4v/Makefile.sun4v.shared index 57e79a9720..3d6c16f4f3 100644 --- a/usr/src/uts/sun4v/Makefile.sun4v.shared +++ b/usr/src/uts/sun4v/Makefile.sun4v.shared @@ -167,6 +167,8 @@ CFLAGS += $(CERRWARN) CFLAGS += $(CTF_FLAGS) CFLAGS += $(C99MODE) CFLAGS += $(CCUNBOUND) +CFLAGS += $(CCSTATICSYM) +CFLAGS += $(IROPTFLAG) CFLAGS += $(CGLOBALSTATIC) CFLAGS += -xregs=no%float CPPFLAGS += -DGLREG diff --git a/usr/src/uts/sun4v/arcfour/Makefile b/usr/src/uts/sun4v/arcfour/Makefile index 55b9b59470..0a7abb5b3f 100644 --- a/usr/src/uts/sun4v/arcfour/Makefile +++ b/usr/src/uts/sun4v/arcfour/Makefile @@ -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,7 +21,7 @@ # # 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 "%Z%%M% %I% %E% SMI" @@ -80,7 +79,7 @@ COPTIMIZE = -xO5 -xbuiltin=%all # # Override the default -xspace setting # -sparc_SPACEFLAG = -W0,-Lt -W2,-Rcond_elim +sparc_SPACEFLAG = -W0,-Lt # # Default build targets. diff --git a/usr/src/uts/sun4v/arcfour2048/Makefile b/usr/src/uts/sun4v/arcfour2048/Makefile index dcbb88d920..3cd7b549d1 100644 --- a/usr/src/uts/sun4v/arcfour2048/Makefile +++ b/usr/src/uts/sun4v/arcfour2048/Makefile @@ -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,7 +19,7 @@ # 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 "%Z%%M% %I% %E% SMI" @@ -70,7 +69,7 @@ COPTIMIZE = -xO5 -xbuiltin=%all # # Override the default -xspace setting # -sparc_SPACEFLAG = -W0,-Lt -W2,-Rcond_elim +sparc_SPACEFLAG = -W0,-Lt # # Turn on doubleword alignment for 64 bit registers diff --git a/usr/src/uts/sun4v/md5/Makefile b/usr/src/uts/sun4v/md5/Makefile index e99af50999..535be83119 100644 --- a/usr/src/uts/sun4v/md5/Makefile +++ b/usr/src/uts/sun4v/md5/Makefile @@ -65,7 +65,7 @@ CFLAGS += $(CCVERBOSE) # # Override the default -xspace setting # -sparc_SPACEFLAG = -W0,-Lt -W2,-Rcond_elim +sparc_SPACEFLAG = -W0,-Lt # # md5 depends on the kcf framework |
