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

Split Close
Expand all
Collapse all
          --- old/usr/src/Makefile.master
          +++ new/usr/src/Makefile.master
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16  # fields enclosed by brackets "[]" replaced with your own identifying
  17   17  # information: Portions Copyright [yyyy] [name of copyright owner]
  18   18  #
  19   19  # CDDL HEADER END
  20   20  #
  21   21  
  22   22  #
  23   23  # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  24   24  # Copyright (c) 2012 by Delphix. All rights reserved.
  25   25  # Copyright 2014 Garrett D'Amore <garrett@damore.org>
       26 +# Copyright 2014 Gary Mills
  26   27  #
  27   28  
  28   29  #
  29   30  # Makefile.master, global definitions for system source
  30   31  #
  31   32  ROOT=           /proto
  32   33  
  33   34  #
  34   35  # Adjunct root, containing an additional proto area to be used for headers
  35   36  # and libraries.
↓ open down ↓ 343 lines elided ↑ open up ↑
 379  380  
 380  381  CERRWARN += -_gcc=-Wno-missing-braces
 381  382  CERRWARN += -_gcc=-Wno-sign-compare
 382  383  CERRWARN += -_gcc=-Wno-unknown-pragmas
 383  384  CERRWARN += -_gcc=-Wno-unused-parameter
 384  385  CERRWARN += -_gcc=-Wno-missing-field-initializers
 385  386  
 386  387  # Unfortunately, this option can misfire very easily and unfixably.
 387  388  CERRWARN +=     -_gcc=-Wno-array-bounds
 388  389  
      390 +# Suppress it: this warning generates many false alarms
      391 +CERRWARN +=     -_gcc=-Wno-uninitialized
      392 +
 389  393  # DEBUG v. -nd make for frequent unused variables, empty conditions, etc. in
 390  394  # -nd builds
 391  395  $(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-unused
 392  396  $(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-empty-body
 393  397  
 394  398  #
 395  399  # turn warnings into errors (C++)
 396  400  CCERRWARN=              -xwe
 397  401  
 398  402  # C99 mode
↓ open down ↓ 8 lines elided ↑ open up ↑
 407  411  sparcv9_CFLAGS= $(sparcv9_XARCH) -dalign $(CCVERBOSE) $(V9ABIWARN) $(CCREGSYM) \
 408  412                  $(CCSTATICSYM)
 409  413  i386_CFLAGS=    $(i386_XARCH)
 410  414  amd64_CFLAGS=   $(amd64_XARCH)
 411  415  
 412  416  sparc_ASFLAGS=  $(sparc_AS_XARCH)
 413  417  sparcv9_ASFLAGS=$(sparcv9_AS_XARCH)
 414  418  i386_ASFLAGS=   $(i386_AS_XARCH)
 415  419  amd64_ASFLAGS=  $(amd64_AS_XARCH)
 416  420  
      421 +# Adjustments to specified optimization level
      422 +ADJUST_COPT=            -_gcc=-fno-strict-aliasing -_gcc=-fno-tree-vrp
      423 +
 417  424  #
 418      -sparc_COPTFLAG=         -xO3
 419      -sparcv9_COPTFLAG=       -xO3
 420      -i386_COPTFLAG=          -O
 421      -amd64_COPTFLAG=         -xO3
      425 +sparc_COPTFLAG=         $(ADJUST_COPT) -xO3
      426 +sparcv9_COPTFLAG=       $(ADJUST_COPT) -xO3
      427 +i386_COPTFLAG=          $(ADJUST_COPT) -O
      428 +amd64_COPTFLAG=         $(ADJUST_COPT) -xO3
 422  429  
 423  430  COPTFLAG= $($(MACH)_COPTFLAG)
 424  431  COPTFLAG64= $($(MACH64)_COPTFLAG)
 425  432  
 426  433  # When -g is used, the compiler globalizes static objects
 427  434  # (gives them a unique prefix). Disable that.
 428  435  CNOGLOBAL= -W0,-noglobal
 429  436  
 430  437  # Direct the Sun Studio compiler to use a static globalization prefix based on the
 431  438  # name of the module rather than something unique. Otherwise, objects
↓ open down ↓ 737 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX