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.


 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 
 442 #
 443 # Default debug format for Sun Studio 11 is dwarf, so force it to
 444 # generate stabs.
 445 #


 586 #
 587 POFILE= $(PROG).po
 588 
 589 sparc_CCFLAGS=          -cg92 -compat=4 \
 590                         -Qoption ccfe -messages=no%anachronism \
 591                         $(CCERRWARN)
 592 sparcv9_CCFLAGS=        $(sparcv9_XARCH) -dalign -compat=5 \
 593                         -Qoption ccfe -messages=no%anachronism \
 594                         -Qoption ccfe -features=no%conststrings \
 595                         $(CCCREGSYM) \
 596                         $(CCERRWARN)
 597 i386_CCFLAGS=           -compat=4 \
 598                         -Qoption ccfe -messages=no%anachronism \
 599                         -Qoption ccfe -features=no%conststrings \
 600                         $(CCERRWARN)
 601 amd64_CCFLAGS=          $(amd64_XARCH) -compat=5 \
 602                         -Qoption ccfe -messages=no%anachronism \
 603                         -Qoption ccfe -features=no%conststrings \
 604                         $(CCERRWARN)
 605 
 606 sparc_CCOPTFLAG=        -O
 607 sparcv9_CCOPTFLAG=      -O
 608 i386_CCOPTFLAG=         -O
 609 amd64_CCOPTFLAG=        -O
 610 
 611 CCOPTFLAG=      $($(MACH)_CCOPTFLAG)
 612 CCOPTFLAG64=    $($(MACH64)_CCOPTFLAG)
 613 CCFLAGS=        $(CCOPTFLAG) $($(MACH)_CCFLAGS) $(CCSOURCEDEBUGFLAGS) \
 614                 $(CCUSERFLAGS)
 615 CCFLAGS64=      $(CCOPTFLAG64) $($(MACH64)_CCFLAGS) $(CCSOURCEDEBUGFLAGS) \
 616                 $(CCUSERFLAGS64)
 617 







 618 #
 619 #
 620 #
 621 ELFWRAP_FLAGS   =
 622 ELFWRAP_FLAGS64 =       -64
 623 
 624 #
 625 # Various mapfiles that are used throughout the build, and delivered to
 626 # /usr/lib/ld.
 627 #
 628 MAPFILE.NED_i386 =      $(SRC)/common/mapfiles/common/map.noexdata
 629 MAPFILE.NED_sparc =
 630 MAPFILE.NED =           $(MAPFILE.NED_$(MACH))
 631 MAPFILE.PGA =           $(SRC)/common/mapfiles/common/map.pagealign
 632 MAPFILE.NES =           $(SRC)/common/mapfiles/common/map.noexstk
 633 MAPFILE.FLT =           $(SRC)/common/mapfiles/common/map.filter
 634 MAPFILE.LEX =           $(SRC)/common/mapfiles/common/map.lex.yy
 635 
 636 #
 637 # Generated mapfiles that are compiler specific, and used throughout the




   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.


 398 
 399 # C99 mode
 400 C99_ENABLE=     -xc99=%all
 401 C99_DISABLE=    -xc99=%none
 402 C99MODE=        $(C99_DISABLE)
 403 C99LMODE=       $(C99MODE:-xc99%=-Xc99%)
 404 
 405 # In most places, assignments to these macros should be appended with +=
 406 # (CPPFLAGS.master allows values to be prepended to CPPFLAGS).
 407 sparc_CFLAGS=   $(sparc_XARCH) $(CCSTATICSYM)
 408 sparcv9_CFLAGS= $(sparcv9_XARCH) -dalign $(CCVERBOSE) $(V9ABIWARN) $(CCREGSYM) \
 409                 $(CCSTATICSYM)
 410 i386_CFLAGS=    $(i386_XARCH)
 411 amd64_CFLAGS=   $(amd64_XARCH)
 412 
 413 sparc_ASFLAGS=  $(sparc_AS_XARCH)
 414 sparcv9_ASFLAGS=$(sparcv9_AS_XARCH)
 415 i386_ASFLAGS=   $(i386_AS_XARCH)
 416 amd64_ASFLAGS=  $(amd64_AS_XARCH)
 417 
 418 # Default adjustments to specified gcc optimization level
 419 # 
 420 # For -O and -O1
 421 ADJUST_OPT1=
 422 # For -O2
 423 ADJUST_OPT2=            -_gcc=-fno-strict-aliasing \
 424                         -_gcc=-fno-unit-at-a-time \
 425                         -_gcc=-fno-optimize-sibling-calls
 426 
 427 sparc_ADJCOPT=          $(ADJUST_OPT2)
 428 sparcv9_ADJCOPT=        $(ADJUST_OPT2)
 429 i386_ADJCOPT=           $(ADJUST_OPT1)
 430 amd64_ADJCOPT=          $(ADJUST_OPT2)
 431 
 432 # Symbols that can be redefined in individual Makefiles
 433 ADJCOPT= $($(MACH)_ADJCOPT)
 434 ADJCOPT64= $($(MACH64)_ADJCOPT)
 435 
 436 # These symbols are sometimes redefined in individual Makefiles
 437 sparc_COPTFLAG=         -_cc=-xO3 -_gcc=-O2
 438 sparcv9_COPTFLAG=       -_cc=-xO3 -_gcc=-O2
 439 i386_COPTFLAG=          -_cc=-O -_gcc=-O
 440 amd64_COPTFLAG=         -_cc=-xO3 -_gcc=-O2
 441 
 442 # Documented symbols that can be redefined in individual Makefiles
 443 COPTFLAG= $(ADJCOPT) $($(MACH)_COPTFLAG)
 444 COPTFLAG64= $(ADJCOPT64) $($(MACH64)_COPTFLAG)
 445 
 446 # When -g is used, the compiler globalizes static objects
 447 # (gives them a unique prefix). Disable that.
 448 CNOGLOBAL= -W0,-noglobal
 449 
 450 # Direct the Sun Studio compiler to use a static globalization prefix based on the
 451 # name of the module rather than something unique. Otherwise, objects
 452 # will not build deterministically, as subsequent compilations of identical
 453 # source will yeild objects that always look different.
 454 #
 455 # In the same spirit, this will also remove the date from the N_OPT stab.
 456 CGLOBALSTATIC= -W0,-xglobalstatic
 457 
 458 # Sometimes we want all symbols and types in debugging information even
 459 # if they aren't used.
 460 CALLSYMS=       -W0,-xdbggen=no%usedonly
 461 
 462 #
 463 # Default debug format for Sun Studio 11 is dwarf, so force it to
 464 # generate stabs.
 465 #


 606 #
 607 POFILE= $(PROG).po
 608 
 609 sparc_CCFLAGS=          -cg92 -compat=4 \
 610                         -Qoption ccfe -messages=no%anachronism \
 611                         $(CCERRWARN)
 612 sparcv9_CCFLAGS=        $(sparcv9_XARCH) -dalign -compat=5 \
 613                         -Qoption ccfe -messages=no%anachronism \
 614                         -Qoption ccfe -features=no%conststrings \
 615                         $(CCCREGSYM) \
 616                         $(CCERRWARN)
 617 i386_CCFLAGS=           -compat=4 \
 618                         -Qoption ccfe -messages=no%anachronism \
 619                         -Qoption ccfe -features=no%conststrings \
 620                         $(CCERRWARN)
 621 amd64_CCFLAGS=          $(amd64_XARCH) -compat=5 \
 622                         -Qoption ccfe -messages=no%anachronism \
 623                         -Qoption ccfe -features=no%conststrings \
 624                         $(CCERRWARN)
 625 
 626 sparc_CCOPTFLAG=        -_CC=-O -_g++=-O
 627 sparcv9_CCOPTFLAG=      -_CC=-O -_g++=-O
 628 i386_CCOPTFLAG=         -_CC=-O -_g++=-O
 629 amd64_CCOPTFLAG=        -_CC=-O -_g++=-O
 630 
 631 ADJCCOPT=       $(ADJUST_OPT1)
 632 ADJCCOPT64=     $(ADJUST_OPT1)




 633 
 634 CCOPTFLAG=      $(ADJCCOPT) $($(MACH)_CCOPTFLAG)
 635 CCOPTFLAG64=    $(ADJCCOPT) $($(MACH64)_CCOPTFLAG)
 636 CCFLAGS=        $(CCOPTFLAG) $($(MACH)_CCFLAGS) \
 637                 $(CCSOURCEDEBUGFLAGS) $(CCUSERFLAGS)
 638 CCFLAGS64=      $(CCOPTFLAG64) $($(MACH64)_CCFLAGS) \
 639                 $(CCSOURCEDEBUGFLAGS) $(CCUSERFLAGS64)
 640 
 641 #
 642 #
 643 #
 644 ELFWRAP_FLAGS   =
 645 ELFWRAP_FLAGS64 =       -64
 646 
 647 #
 648 # Various mapfiles that are used throughout the build, and delivered to
 649 # /usr/lib/ld.
 650 #
 651 MAPFILE.NED_i386 =      $(SRC)/common/mapfiles/common/map.noexdata
 652 MAPFILE.NED_sparc =
 653 MAPFILE.NED =           $(MAPFILE.NED_$(MACH))
 654 MAPFILE.PGA =           $(SRC)/common/mapfiles/common/map.pagealign
 655 MAPFILE.NES =           $(SRC)/common/mapfiles/common/map.noexstk
 656 MAPFILE.FLT =           $(SRC)/common/mapfiles/common/map.filter
 657 MAPFILE.LEX =           $(SRC)/common/mapfiles/common/map.lex.yy
 658 
 659 #
 660 # Generated mapfiles that are compiler specific, and used throughout the