Print this page
10051 cw(1) shouldn't have to translate -g


 469 # When -g is used, the compiler globalizes static objects
 470 # (gives them a unique prefix). Disable that.
 471 CNOGLOBAL= -W0,-noglobal
 472 
 473 # Direct the Sun Studio compiler to use a static globalization prefix based on the
 474 # name of the module rather than something unique. Otherwise, objects
 475 # will not build deterministically, as subsequent compilations of identical
 476 # source will yeild objects that always look different.
 477 #
 478 # In the same spirit, this will also remove the date from the N_OPT stab.
 479 CGLOBALSTATIC= -W0,-xglobalstatic
 480 
 481 # Sometimes we want all symbols and types in debugging information even
 482 # if they aren't used.
 483 CALLSYMS=       -W0,-xdbggen=no%usedonly
 484 
 485 #
 486 # Default debug format for Sun Studio 11 is dwarf, so force it to
 487 # generate stabs.
 488 #
 489 DEBUGFORMAT=    -xdebugformat=stabs





 490 
 491 #
 492 # Flags used to build in debug mode for ctf generation.  Bugs in the Devpro
 493 # compilers currently prevent us from building with cc-emitted DWARF.
 494 #
 495 CTF_FLAGS_sparc = -g -Wc,-Qiselect-T1 $(CSTD) $(CNOGLOBAL) $(CDWARFSTR)
 496 CTF_FLAGS_i386  = -g $(CSTD) $(CNOGLOBAL) $(CDWARFSTR)
 497 
 498 CTF_FLAGS_sparcv9       = $(CTF_FLAGS_sparc)
 499 CTF_FLAGS_amd64         = $(CTF_FLAGS_i386)
 500 
 501 # Sun Studio produces broken userland code when saving arguments.
 502 $(__GNUC)CTF_FLAGS_amd64 += $(SAVEARGS)
 503 
 504 CTF_FLAGS_32    = $(CTF_FLAGS_$(MACH)) $(DEBUGFORMAT)
 505 CTF_FLAGS_64    = $(CTF_FLAGS_$(MACH64)) $(DEBUGFORMAT)
 506 CTF_FLAGS       = $(CTF_FLAGS_32)
 507 
 508 #
 509 # Flags used with genoffsets
 510 #
 511 GOFLAGS = $(CALLSYMS) $(CDWARFSTR)
 512 
 513 OFFSETS_CREATE = $(GENOFFSETS) -s $(CTFSTABS) -r $(CTFCONVERT) \
 514         $(CW) --noecho $(CW_CC_COMPILERS) -- $(GOFLAGS) $(CFLAGS) $(CPPFLAGS)
 515 
 516 OFFSETS_CREATE64 = $(GENOFFSETS) -s $(CTFSTABS) -r $(CTFCONVERT) \
 517         $(CW) --noecho $(CW_CC_COMPILERS) -- $(GOFLAGS) $(CFLAGS64) $(CPPFLAGS)
 518 
 519 #
 520 # tradeoff time for space (smaller is better)
 521 #
 522 sparc_SPACEFLAG         = -xspace -W0,-Lt
 523 sparcv9_SPACEFLAG       = -xspace -W0,-Lt
 524 i386_SPACEFLAG          = -xspace
 525 amd64_SPACEFLAG         =
 526 
 527 SPACEFLAG               = $($(MACH)_SPACEFLAG)
 528 SPACEFLAG64             = $($(MACH64)_SPACEFLAG)
 529 
 530 #
 531 # The Sun Studio 11 compiler has changed the behaviour of integer


 552 # avoids stripping it.
 553 SOURCEDEBUG     = $(POUND_SIGN)
 554 SRCDBGBLD       = $(SOURCEDEBUG:yes=)
 555 
 556 #
 557 # These variables are intended ONLY for use by developers to safely pass extra
 558 # flags to the compilers without unintentionally overriding Makefile-set
 559 # flags.  They should NEVER be set to any value in a Makefile.
 560 #
 561 # They come last in the associated FLAGS variable such that they can
 562 # explicitly override things if necessary, there are gaps in this, but it's
 563 # the best we can manage.
 564 #
 565 CUSERFLAGS              =
 566 CUSERFLAGS64            = $(CUSERFLAGS)
 567 CCUSERFLAGS             =
 568 CCUSERFLAGS64           = $(CCUSERFLAGS)
 569 
 570 CSOURCEDEBUGFLAGS       =
 571 CCSOURCEDEBUGFLAGS      =
 572 $(SRCDBGBLD)CSOURCEDEBUGFLAGS   = -g -xs
 573 $(SRCDBGBLD)CCSOURCEDEBUGFLAGS  = -g -xs
 574 
 575 CFLAGS=         $(COPTFLAG) $($(MACH)_CFLAGS) $(SPACEFLAG) $(CCMODE) \
 576                 $(ILDOFF) $(CERRWARN) $(CSTD) $(CCUNBOUND) $(IROPTFLAG) \
 577                 $(CGLOBALSTATIC) $(CCNOAUTOINLINE) $(CCNOREORDER) \
 578                 $(CSOURCEDEBUGFLAGS) $(CUSERFLAGS)
 579 CFLAGS64=       $(COPTFLAG64) $($(MACH64)_CFLAGS) $(SPACEFLAG64) $(CCMODE64) \
 580                 $(ILDOFF) $(CERRWARN) $(CSTD) $(CCUNBOUND) $(IROPTFLAG64) \
 581                 $(CGLOBALSTATIC) $(CCNOAUTOINLINE) $(CCNOREORDER) \
 582                 $(CSOURCEDEBUGFLAGS) $(CUSERFLAGS64)
 583 #
 584 # Flags that are used to build parts of the code that are subsequently
 585 # run on the build machine (also known as the NATIVE_BUILD).
 586 #
 587 NATIVE_CFLAGS=  $(COPTFLAG) $($(NATIVE_MACH)_CFLAGS) $(CCMODE) \
 588                 $(ILDOFF) $(CERRWARN) $(CSTD) $($(NATIVE_MACH)_CCUNBOUND) \
 589                 $(IROPTFLAG) $(CGLOBALSTATIC) $(CCNOAUTOINLINE) \
 590                 $(CCNOREORDER) $(CSOURCEDEBUGFLAGS) $(CUSERFLAGS)
 591 
 592 DTEXTDOM=-DTEXT_DOMAIN=\"$(TEXT_DOMAIN)\"       # For messaging.
 593 DTS_ERRNO=-D_TS_ERRNO




 469 # When -g is used, the compiler globalizes static objects
 470 # (gives them a unique prefix). Disable that.
 471 CNOGLOBAL= -W0,-noglobal
 472 
 473 # Direct the Sun Studio compiler to use a static globalization prefix based on the
 474 # name of the module rather than something unique. Otherwise, objects
 475 # will not build deterministically, as subsequent compilations of identical
 476 # source will yeild objects that always look different.
 477 #
 478 # In the same spirit, this will also remove the date from the N_OPT stab.
 479 CGLOBALSTATIC= -W0,-xglobalstatic
 480 
 481 # Sometimes we want all symbols and types in debugging information even
 482 # if they aren't used.
 483 CALLSYMS=       -W0,-xdbggen=no%usedonly
 484 
 485 #
 486 # Default debug format for Sun Studio 11 is dwarf, so force it to
 487 # generate stabs.
 488 #
 489 DEBUGFORMAT=    -_cc=-xdebugformat=stabs -_gcc=-gdwarf-2
 490 
 491 #
 492 # Ask the compiler to include debugging information
 493 #
 494 CCGDEBUG= -g $(DEBUGFORMAT)
 495 
 496 #
 497 # Flags used to build in debug mode for ctf generation.  Bugs in the Devpro
 498 # compilers currently prevent us from building with cc-emitted DWARF.
 499 #
 500 CTF_FLAGS_sparc = $(CCGDEBUG) -Wc,-Qiselect-T1 $(CSTD) $(CNOGLOBAL)
 501 CTF_FLAGS_i386  = $(CCGDEBUG) $(CSTD) $(CNOGLOBAL)
 502 
 503 CTF_FLAGS_sparcv9       = $(CTF_FLAGS_sparc)
 504 CTF_FLAGS_amd64         = $(CTF_FLAGS_i386)
 505 
 506 # Sun Studio produces broken userland code when saving arguments.
 507 $(__GNUC)CTF_FLAGS_amd64 += $(SAVEARGS)
 508 
 509 CTF_FLAGS_32    = $(CTF_FLAGS_$(MACH))
 510 CTF_FLAGS_64    = $(CTF_FLAGS_$(MACH64))
 511 CTF_FLAGS       = $(CTF_FLAGS_32)
 512 
 513 #
 514 # Flags used with genoffsets
 515 #
 516 GOFLAGS = $(CALLSYMS)
 517 
 518 OFFSETS_CREATE = $(GENOFFSETS) -s $(CTFSTABS) -r $(CTFCONVERT) \
 519         $(CW) --noecho $(CW_CC_COMPILERS) -- $(GOFLAGS) $(CFLAGS) $(CPPFLAGS)
 520 
 521 OFFSETS_CREATE64 = $(GENOFFSETS) -s $(CTFSTABS) -r $(CTFCONVERT) \
 522         $(CW) --noecho $(CW_CC_COMPILERS) -- $(GOFLAGS) $(CFLAGS64) $(CPPFLAGS)
 523 
 524 #
 525 # tradeoff time for space (smaller is better)
 526 #
 527 sparc_SPACEFLAG         = -xspace -W0,-Lt
 528 sparcv9_SPACEFLAG       = -xspace -W0,-Lt
 529 i386_SPACEFLAG          = -xspace
 530 amd64_SPACEFLAG         =
 531 
 532 SPACEFLAG               = $($(MACH)_SPACEFLAG)
 533 SPACEFLAG64             = $($(MACH64)_SPACEFLAG)
 534 
 535 #
 536 # The Sun Studio 11 compiler has changed the behaviour of integer


 557 # avoids stripping it.
 558 SOURCEDEBUG     = $(POUND_SIGN)
 559 SRCDBGBLD       = $(SOURCEDEBUG:yes=)
 560 
 561 #
 562 # These variables are intended ONLY for use by developers to safely pass extra
 563 # flags to the compilers without unintentionally overriding Makefile-set
 564 # flags.  They should NEVER be set to any value in a Makefile.
 565 #
 566 # They come last in the associated FLAGS variable such that they can
 567 # explicitly override things if necessary, there are gaps in this, but it's
 568 # the best we can manage.
 569 #
 570 CUSERFLAGS              =
 571 CUSERFLAGS64            = $(CUSERFLAGS)
 572 CCUSERFLAGS             =
 573 CCUSERFLAGS64           = $(CCUSERFLAGS)
 574 
 575 CSOURCEDEBUGFLAGS       =
 576 CCSOURCEDEBUGFLAGS      =
 577 $(SRCDBGBLD)CSOURCEDEBUGFLAGS   = $(CCGDEBUG) -xs
 578 $(SRCDBGBLD)CCSOURCEDEBUGFLAGS  = $(CCGDEBUG) -xs
 579 
 580 CFLAGS=         $(COPTFLAG) $($(MACH)_CFLAGS) $(SPACEFLAG) $(CCMODE) \
 581                 $(ILDOFF) $(CERRWARN) $(CSTD) $(CCUNBOUND) $(IROPTFLAG) \
 582                 $(CGLOBALSTATIC) $(CCNOAUTOINLINE) $(CCNOREORDER) \
 583                 $(CSOURCEDEBUGFLAGS) $(CUSERFLAGS)
 584 CFLAGS64=       $(COPTFLAG64) $($(MACH64)_CFLAGS) $(SPACEFLAG64) $(CCMODE64) \
 585                 $(ILDOFF) $(CERRWARN) $(CSTD) $(CCUNBOUND) $(IROPTFLAG64) \
 586                 $(CGLOBALSTATIC) $(CCNOAUTOINLINE) $(CCNOREORDER) \
 587                 $(CSOURCEDEBUGFLAGS) $(CUSERFLAGS64)
 588 #
 589 # Flags that are used to build parts of the code that are subsequently
 590 # run on the build machine (also known as the NATIVE_BUILD).
 591 #
 592 NATIVE_CFLAGS=  $(COPTFLAG) $($(NATIVE_MACH)_CFLAGS) $(CCMODE) \
 593                 $(ILDOFF) $(CERRWARN) $(CSTD) $($(NATIVE_MACH)_CCUNBOUND) \
 594                 $(IROPTFLAG) $(CGLOBALSTATIC) $(CCNOAUTOINLINE) \
 595                 $(CCNOREORDER) $(CSOURCEDEBUGFLAGS) $(CUSERFLAGS)
 596 
 597 DTEXTDOM=-DTEXT_DOMAIN=\"$(TEXT_DOMAIN)\"       # For messaging.
 598 DTS_ERRNO=-D_TS_ERRNO