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


   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 #
  23 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  24 # Copyright (c) 2012 by Delphix. All rights reserved.
  25 # Copyright 2014 Garrett D'Amore <garrett@damore.org>

  26 #
  27 
  28 #
  29 # Makefile.master, global definitions for system source
  30 #
  31 ROOT=           /proto
  32 
  33 #
  34 # Adjunct root, containing an additional proto area to be used for headers
  35 # and libraries.
  36 #
  37 ADJUNCT_PROTO=
  38 
  39 #
  40 # Adjunct for building things that run on the build machine.
  41 #
  42 NATIVE_ADJUNCT= /usr
  43 
  44 #
  45 # RELEASE_BUILD should be cleared for final release builds.


 369 XDEPEND=                -xdepend
 370 XFFLAG=                 -xF=%all
 371 XESS=                   -xs
 372 XSTRCONST=              -xstrconst
 373 
 374 #
 375 # turn warnings into errors (C)
 376 CERRWARN = -errtags=yes -errwarn=%all
 377 CERRWARN += -erroff=E_EMPTY_TRANSLATION_UNIT
 378 CERRWARN += -erroff=E_STATEMENT_NOT_REACHED
 379 
 380 CERRWARN += -_gcc=-Wno-missing-braces
 381 CERRWARN += -_gcc=-Wno-sign-compare
 382 CERRWARN += -_gcc=-Wno-unknown-pragmas
 383 CERRWARN += -_gcc=-Wno-unused-parameter
 384 CERRWARN += -_gcc=-Wno-missing-field-initializers
 385 
 386 # Unfortunately, this option can misfire very easily and unfixably.
 387 CERRWARN +=     -_gcc=-Wno-array-bounds
 388 



 389 # DEBUG v. -nd make for frequent unused variables, empty conditions, etc. in
 390 # -nd builds
 391 $(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-unused
 392 $(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-empty-body
 393 
 394 #
 395 # turn warnings into errors (C++)
 396 CCERRWARN=              -xwe
 397 
 398 # C99 mode
 399 C99_ENABLE=     -xc99=%all
 400 C99_DISABLE=    -xc99=%none
 401 C99MODE=        $(C99_DISABLE)
 402 C99LMODE=       $(C99MODE:-xc99%=-Xc99%)
 403 
 404 # In most places, assignments to these macros should be appended with +=
 405 # (CPPFLAGS.master allows values to be prepended to CPPFLAGS).
 406 sparc_CFLAGS=   $(sparc_XARCH) $(CCSTATICSYM)
 407 sparcv9_CFLAGS= $(sparcv9_XARCH) -dalign $(CCVERBOSE) $(V9ABIWARN) $(CCREGSYM) \
 408                 $(CCSTATICSYM)
 409 i386_CFLAGS=    $(i386_XARCH)
 410 amd64_CFLAGS=   $(amd64_XARCH)
 411 
 412 sparc_ASFLAGS=  $(sparc_AS_XARCH)
 413 sparcv9_ASFLAGS=$(sparcv9_AS_XARCH)
 414 i386_ASFLAGS=   $(i386_AS_XARCH)
 415 amd64_ASFLAGS=  $(amd64_AS_XARCH)
 416 



 417 #
 418 sparc_COPTFLAG=         -xO3
 419 sparcv9_COPTFLAG=       -xO3
 420 i386_COPTFLAG=          -O
 421 amd64_COPTFLAG=         -xO3
 422 
 423 COPTFLAG= $($(MACH)_COPTFLAG)
 424 COPTFLAG64= $($(MACH64)_COPTFLAG)
 425 
 426 # When -g is used, the compiler globalizes static objects
 427 # (gives them a unique prefix). Disable that.
 428 CNOGLOBAL= -W0,-noglobal
 429 
 430 # Direct the Sun Studio compiler to use a static globalization prefix based on the
 431 # name of the module rather than something unique. Otherwise, objects
 432 # will not build deterministically, as subsequent compilations of identical
 433 # source will yeild objects that always look different.
 434 #
 435 # In the same spirit, this will also remove the date from the N_OPT stab.
 436 CGLOBALSTATIC= -W0,-xglobalstatic
 437 
 438 # Sometimes we want all symbols and types in debugging information even
 439 # if they aren't used.
 440 CALLSYMS=       -W0,-xdbggen=no%usedonly
 441 




   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 #
  23 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  24 # Copyright (c) 2012 by Delphix. All rights reserved.
  25 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
  26 # Copyright 2014 Gary Mills
  27 #
  28 
  29 #
  30 # Makefile.master, global definitions for system source
  31 #
  32 ROOT=           /proto
  33 
  34 #
  35 # Adjunct root, containing an additional proto area to be used for headers
  36 # and libraries.
  37 #
  38 ADJUNCT_PROTO=
  39 
  40 #
  41 # Adjunct for building things that run on the build machine.
  42 #
  43 NATIVE_ADJUNCT= /usr
  44 
  45 #
  46 # RELEASE_BUILD should be cleared for final release builds.


 370 XDEPEND=                -xdepend
 371 XFFLAG=                 -xF=%all
 372 XESS=                   -xs
 373 XSTRCONST=              -xstrconst
 374 
 375 #
 376 # turn warnings into errors (C)
 377 CERRWARN = -errtags=yes -errwarn=%all
 378 CERRWARN += -erroff=E_EMPTY_TRANSLATION_UNIT
 379 CERRWARN += -erroff=E_STATEMENT_NOT_REACHED
 380 
 381 CERRWARN += -_gcc=-Wno-missing-braces
 382 CERRWARN += -_gcc=-Wno-sign-compare
 383 CERRWARN += -_gcc=-Wno-unknown-pragmas
 384 CERRWARN += -_gcc=-Wno-unused-parameter
 385 CERRWARN += -_gcc=-Wno-missing-field-initializers
 386 
 387 # Unfortunately, this option can misfire very easily and unfixably.
 388 CERRWARN +=     -_gcc=-Wno-array-bounds
 389 
 390 # Suppress it: this warning generates many false alarms
 391 CERRWARN +=     -_gcc=-Wno-uninitialized
 392 
 393 # DEBUG v. -nd make for frequent unused variables, empty conditions, etc. in
 394 # -nd builds
 395 $(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-unused
 396 $(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-empty-body
 397 
 398 #
 399 # turn warnings into errors (C++)
 400 CCERRWARN=              -xwe
 401 
 402 # C99 mode
 403 C99_ENABLE=     -xc99=%all
 404 C99_DISABLE=    -xc99=%none
 405 C99MODE=        $(C99_DISABLE)
 406 C99LMODE=       $(C99MODE:-xc99%=-Xc99%)
 407 
 408 # In most places, assignments to these macros should be appended with +=
 409 # (CPPFLAGS.master allows values to be prepended to CPPFLAGS).
 410 sparc_CFLAGS=   $(sparc_XARCH) $(CCSTATICSYM)
 411 sparcv9_CFLAGS= $(sparcv9_XARCH) -dalign $(CCVERBOSE) $(V9ABIWARN) $(CCREGSYM) \
 412                 $(CCSTATICSYM)
 413 i386_CFLAGS=    $(i386_XARCH)
 414 amd64_CFLAGS=   $(amd64_XARCH)
 415 
 416 sparc_ASFLAGS=  $(sparc_AS_XARCH)
 417 sparcv9_ASFLAGS=$(sparcv9_AS_XARCH)
 418 i386_ASFLAGS=   $(i386_AS_XARCH)
 419 amd64_ASFLAGS=  $(amd64_AS_XARCH)
 420 
 421 # Adjustments to specified optimization level
 422 ADJUST_COPT=            -_gcc=-fno-strict-aliasing -_gcc=-fno-tree-vrp
 423 
 424 #
 425 sparc_COPTFLAG=         $(ADJUST_COPT) -xO3
 426 sparcv9_COPTFLAG=       $(ADJUST_COPT) -xO3
 427 i386_COPTFLAG=          $(ADJUST_COPT) -O
 428 amd64_COPTFLAG=         $(ADJUST_COPT) -xO3
 429 
 430 COPTFLAG= $($(MACH)_COPTFLAG)
 431 COPTFLAG64= $($(MACH64)_COPTFLAG)
 432 
 433 # When -g is used, the compiler globalizes static objects
 434 # (gives them a unique prefix). Disable that.
 435 CNOGLOBAL= -W0,-noglobal
 436 
 437 # Direct the Sun Studio compiler to use a static globalization prefix based on the
 438 # name of the module rather than something unique. Otherwise, objects
 439 # will not build deterministically, as subsequent compilations of identical
 440 # source will yeild objects that always look different.
 441 #
 442 # In the same spirit, this will also remove the date from the N_OPT stab.
 443 CGLOBALSTATIC= -W0,-xglobalstatic
 444 
 445 # Sometimes we want all symbols and types in debugging information even
 446 # if they aren't used.
 447 CALLSYMS=       -W0,-xdbggen=no%usedonly
 448