Print this page
5196 The cw wrapper restricts gcc to -O2


   4 # The contents of this file are subject to the terms of the
   5 # Common Development and Distribution License (the "License").
   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 
  22 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  23 # Copyright (c) 2013 Andrew Stormont.  All rights reserved.

  24 
  25 
  26 #
  27 #       This makefile contains the common definitions for all sparc
  28 #       implementation architecture independent modules.
  29 #
  30 
  31 #
  32 #       Define supported builds
  33 #
  34 DEF_BUILDS      = $(DEF_BUILDS64)
  35 ALL_BUILDS      = $(ALL_BUILDS64)
  36 
  37 #
  38 #       Everybody needs to know how to build modstubs.o and to locate unix.o.
  39 #       Note that unix.o must currently be selected from among the possible
  40 #       "implementation architectures". Note further, that unix.o is only
  41 #       used as an optional error check for undefines so (theoretically)
  42 #       any "implementation architectures" could be used. We choose sun4u
  43 #       because it is the reference port.
  44 #
  45 UNIX_DIR         = $(UTSBASE)/sun4u/unix


  97 #       won't be as parallel as we might like.
  98 #
  99 NOT_YET_KMODS    = $(OLDPTY_OBJS) $(PTY_OBJS) $(VCONS_CONF_OBJS) $(MOD_OBJS)
 100 
 101 #
 102 # ----- END OF TRANSITIONAL SECTION -------------------------------------------
 103 #
 104 #       Include machine independent rules. Note that this does not imply
 105 #       that the resulting module from rules in Makefile.uts is machine
 106 #       independent. Only that the build rules are machine independent.
 107 #
 108 include $(UTSBASE)/Makefile.uts
 109 
 110 #
 111 #       machine specific optimization, override default in Makefile.master
 112 #
 113 XARCH_32        = -xarch=v8
 114 XARCH_64        = -m64
 115 XARCH           = $(XARCH_$(CLASS))
 116 
 117 COPTIMIZE_32    = -xO3
 118 COPTIMIZE_64    = -xO3
 119 COPTIMIZE       = $(COPTIMIZE_$(CLASS))
 120 
 121 CCMODE          = -Xa
 122 
 123 CFLAGS_32       = -xcg92
 124 CFLAGS_64       = -xchip=ultra $(CCABS32) $(CCREGSYM)
 125 CFLAGS          = $(CFLAGS_$(CLASS))
 126 
 127 CFLAGS          += $(XARCH)
 128 CFLAGS          += $(COPTIMIZE)
 129 CFLAGS          += $(EXTRA_CFLAGS)
 130 CFLAGS          += $(XAOPT)
 131 CFLAGS          += $(INLINES) -D_ASM_INLINES
 132 CFLAGS          += $(CCMODE)
 133 CFLAGS          += $(SPACEFLAG)
 134 CFLAGS          += $(CERRWARN)
 135 CFLAGS          += $(CTF_FLAGS_$(CLASS))
 136 CFLAGS          += $(C99MODE)
 137 CFLAGS          += $(CCUNBOUND)
 138 CFLAGS          += $(CCSTATICSYM)




   4 # The contents of this file are subject to the terms of the
   5 # Common Development and Distribution License (the "License").
   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 
  22 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  23 # Copyright (c) 2013 Andrew Stormont.  All rights reserved.
  24 # Copyright 2014 Gary Mills
  25 

  26 #
  27 #       This makefile contains the common definitions for all sparc
  28 #       implementation architecture independent modules.
  29 #
  30 
  31 #
  32 #       Define supported builds
  33 #
  34 DEF_BUILDS      = $(DEF_BUILDS64)
  35 ALL_BUILDS      = $(ALL_BUILDS64)
  36 
  37 #
  38 #       Everybody needs to know how to build modstubs.o and to locate unix.o.
  39 #       Note that unix.o must currently be selected from among the possible
  40 #       "implementation architectures". Note further, that unix.o is only
  41 #       used as an optional error check for undefines so (theoretically)
  42 #       any "implementation architectures" could be used. We choose sun4u
  43 #       because it is the reference port.
  44 #
  45 UNIX_DIR         = $(UTSBASE)/sun4u/unix


  97 #       won't be as parallel as we might like.
  98 #
  99 NOT_YET_KMODS    = $(OLDPTY_OBJS) $(PTY_OBJS) $(VCONS_CONF_OBJS) $(MOD_OBJS)
 100 
 101 #
 102 # ----- END OF TRANSITIONAL SECTION -------------------------------------------
 103 #
 104 #       Include machine independent rules. Note that this does not imply
 105 #       that the resulting module from rules in Makefile.uts is machine
 106 #       independent. Only that the build rules are machine independent.
 107 #
 108 include $(UTSBASE)/Makefile.uts
 109 
 110 #
 111 #       machine specific optimization, override default in Makefile.master
 112 #
 113 XARCH_32        = -xarch=v8
 114 XARCH_64        = -m64
 115 XARCH           = $(XARCH_$(CLASS))
 116 
 117 COPTIMIZE_32    = -_cc=-xO3 -_gcc=-O2
 118 COPTIMIZE_64    = -_cc=-xO3 -_gcc=-O2
 119 COPTIMIZE       = $(COPTIMIZE_$(CLASS))
 120 
 121 CCMODE          = -Xa
 122 
 123 CFLAGS_32       = -xcg92
 124 CFLAGS_64       = -xchip=ultra $(CCABS32) $(CCREGSYM)
 125 CFLAGS          = $(CFLAGS_$(CLASS))
 126 
 127 CFLAGS          += $(XARCH)
 128 CFLAGS          += $(COPTIMIZE)
 129 CFLAGS          += $(EXTRA_CFLAGS)
 130 CFLAGS          += $(XAOPT)
 131 CFLAGS          += $(INLINES) -D_ASM_INLINES
 132 CFLAGS          += $(CCMODE)
 133 CFLAGS          += $(SPACEFLAG)
 134 CFLAGS          += $(CERRWARN)
 135 CFLAGS          += $(CTF_FLAGS_$(CLASS))
 136 CFLAGS          += $(C99MODE)
 137 CFLAGS          += $(CCUNBOUND)
 138 CFLAGS          += $(CCSTATICSYM)