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

Split Close
Expand all
Collapse all
          --- old/usr/src/Makefile.master
          +++ new/usr/src/Makefile.master
↓ open down ↓ 478 lines elided ↑ open up ↑
 479  479  CGLOBALSTATIC= -W0,-xglobalstatic
 480  480  
 481  481  # Sometimes we want all symbols and types in debugging information even
 482  482  # if they aren't used.
 483  483  CALLSYMS=       -W0,-xdbggen=no%usedonly
 484  484  
 485  485  #
 486  486  # Default debug format for Sun Studio 11 is dwarf, so force it to
 487  487  # generate stabs.
 488  488  #
 489      -DEBUGFORMAT=    -xdebugformat=stabs
      489 +DEBUGFORMAT=    -_cc=-xdebugformat=stabs -_gcc=-gdwarf-2
      490 +
      491 +#
      492 +# Ask the compiler to include debugging information
      493 +#
      494 +CCGDEBUG= -g $(DEBUGFORMAT)
 490  495  
 491  496  #
 492  497  # Flags used to build in debug mode for ctf generation.  Bugs in the Devpro
 493  498  # compilers currently prevent us from building with cc-emitted DWARF.
 494  499  #
 495      -CTF_FLAGS_sparc = -g -Wc,-Qiselect-T1 $(CSTD) $(CNOGLOBAL) $(CDWARFSTR)
 496      -CTF_FLAGS_i386  = -g $(CSTD) $(CNOGLOBAL) $(CDWARFSTR)
      500 +CTF_FLAGS_sparc = $(CCGDEBUG) -Wc,-Qiselect-T1 $(CSTD) $(CNOGLOBAL)
      501 +CTF_FLAGS_i386  = $(CCGDEBUG) $(CSTD) $(CNOGLOBAL)
 497  502  
 498  503  CTF_FLAGS_sparcv9       = $(CTF_FLAGS_sparc)
 499  504  CTF_FLAGS_amd64         = $(CTF_FLAGS_i386)
 500  505  
 501  506  # Sun Studio produces broken userland code when saving arguments.
 502  507  $(__GNUC)CTF_FLAGS_amd64 += $(SAVEARGS)
 503  508  
 504      -CTF_FLAGS_32    = $(CTF_FLAGS_$(MACH)) $(DEBUGFORMAT)
 505      -CTF_FLAGS_64    = $(CTF_FLAGS_$(MACH64)) $(DEBUGFORMAT)
      509 +CTF_FLAGS_32    = $(CTF_FLAGS_$(MACH))
      510 +CTF_FLAGS_64    = $(CTF_FLAGS_$(MACH64))
 506  511  CTF_FLAGS       = $(CTF_FLAGS_32)
 507  512  
 508  513  #
 509  514  # Flags used with genoffsets
 510  515  #
 511      -GOFLAGS = $(CALLSYMS) $(CDWARFSTR)
      516 +GOFLAGS = $(CALLSYMS)
 512  517  
 513  518  OFFSETS_CREATE = $(GENOFFSETS) -s $(CTFSTABS) -r $(CTFCONVERT) \
 514  519          $(CW) --noecho $(CW_CC_COMPILERS) -- $(GOFLAGS) $(CFLAGS) $(CPPFLAGS)
 515  520  
 516  521  OFFSETS_CREATE64 = $(GENOFFSETS) -s $(CTFSTABS) -r $(CTFCONVERT) \
 517  522          $(CW) --noecho $(CW_CC_COMPILERS) -- $(GOFLAGS) $(CFLAGS64) $(CPPFLAGS)
 518  523  
 519  524  #
 520  525  # tradeoff time for space (smaller is better)
 521  526  #
↓ open down ↓ 40 lines elided ↑ open up ↑
 562  567  # explicitly override things if necessary, there are gaps in this, but it's
 563  568  # the best we can manage.
 564  569  #
 565  570  CUSERFLAGS              =
 566  571  CUSERFLAGS64            = $(CUSERFLAGS)
 567  572  CCUSERFLAGS             =
 568  573  CCUSERFLAGS64           = $(CCUSERFLAGS)
 569  574  
 570  575  CSOURCEDEBUGFLAGS       =
 571  576  CCSOURCEDEBUGFLAGS      =
 572      -$(SRCDBGBLD)CSOURCEDEBUGFLAGS   = -g -xs
 573      -$(SRCDBGBLD)CCSOURCEDEBUGFLAGS  = -g -xs
      577 +$(SRCDBGBLD)CSOURCEDEBUGFLAGS   = $(CCGDEBUG) -xs
      578 +$(SRCDBGBLD)CCSOURCEDEBUGFLAGS  = $(CCGDEBUG) -xs
 574  579  
 575  580  CFLAGS=         $(COPTFLAG) $($(MACH)_CFLAGS) $(SPACEFLAG) $(CCMODE) \
 576  581                  $(ILDOFF) $(CERRWARN) $(CSTD) $(CCUNBOUND) $(IROPTFLAG) \
 577  582                  $(CGLOBALSTATIC) $(CCNOAUTOINLINE) $(CCNOREORDER) \
 578  583                  $(CSOURCEDEBUGFLAGS) $(CUSERFLAGS)
 579  584  CFLAGS64=       $(COPTFLAG64) $($(MACH64)_CFLAGS) $(SPACEFLAG64) $(CCMODE64) \
 580  585                  $(ILDOFF) $(CERRWARN) $(CSTD) $(CCUNBOUND) $(IROPTFLAG64) \
 581  586                  $(CGLOBALSTATIC) $(CCNOAUTOINLINE) $(CCNOREORDER) \
 582  587                  $(CSOURCEDEBUGFLAGS) $(CUSERFLAGS64)
 583  588  #
↓ open down ↓ 616 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX