VirtualBox

Changeset 2534 in kBuild


Ignore:
Timestamp:
Aug 2, 2011 2:13:06 PM (13 years ago)
Author:
bird
Message:

tools/G*: split debug info - work in progress.

Location:
trunk/kBuild/tools
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/tools/GCC3OMF.kmk

    r2431 r2534  
    253253                -Zmap=$(outbase).map
    254254        $(QUIET)$(TOOL_GCC3OMF_LD) @$(outbase).rsp
     255if1of ($(ld_debug), split)
     256 $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GCC3OMF.)
     257endif
    255258endef
    256259
     
    284287                -Zmap=$(outbase).map
    285288        $(TOOL_GCC3OMF_LD) @$(outbase).rsp
     289if1of ($(ld_debug), split)
     290 $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GCC3OMF.)
     291endif
    286292endef
    287293
     
    315321                -Zmap=$(outbase).map
    316322        $(QUIET)$(TOOL_GCC3OMF_LD_SYSMOD) @$(outbase).rsp
    317 endef
    318 
     323if1of ($(ld_debug), split)
     324 $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GCC3OMF.)
     325endif
     326endef
     327
  • trunk/kBuild/tools/GCC3PLAIN.kmk

    r2431 r2534  
    258258                $(foreach p,$(libpath), -L$(p))\
    259259                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
     260if1of ($(ld_debug), split)
     261 $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GCC3PLAIN.)
     262endif
    260263endef
    261264
     
    286289                $(foreach p,$(libpath), -L$(p))\
    287290                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
     291if1of ($(ld_debug), split)
     292 $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GCC3PLAIN.)
     293endif
    288294endef
    289295
     
    317323                $(foreach p,$(libpath), -L$(p))\
    318324                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
    319 endef
    320 
     325if1of ($(ld_debug), split)
     326 $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GCC3PLAIN.)
     327endif
     328endef
     329
  • trunk/kBuild/tools/GXX3.kmk

    r2431 r2534  
    6464 TOOL_GXX3_LD_SYSMOD_MAP ?=
    6565endif
     66if1of ($(KBUILD_HOST), solaris)
     67 TOOL_GXX3_OBJCOPY ?= gobjcopy$(HOSTSUFF_EXE)
     68else
     69 TOOL_GXX3_OBJCOPY ?= objcopy$(HOSTSUFF_EXE)
     70endif
     71
    6672ifdef SLKRUNS
    6773 TOOL_GXX3_CC  += -fmessage-length=0
     
    257263TOOL_GXX3_LINK_PROGRAM_OUTPUT =
    258264TOOL_GXX3_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).map
     265TOOL_GXX3_LINK_PROGRAM_OUTPUT_DEBUG = $(outbase).debug
     266TOOL_GXX3_LINK_PROGRAM_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
    259267TOOL_GXX3_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
    260268                $(filter %.def, $(othersrc))
     
    266274                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
    267275                $(call TOOL_GXX3_LD_MAP,$(outbase).map)
     276 ifeq ($(ld_debug),split)
     277        $(TOOL_GXX32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
     278        $(CHMOD) a-x $(outbase).debug
     279        $(TOOL_GXX32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
     280 endif
    268281endef
    269282
     
    284297TOOL_GXX3_LINK_DLL_OUTPUT =
    285298TOOL_GXX3_LINK_DLL_OUTPUT_MAYBE = $(outbase).map
     299TOOL_GXX3_LINK_DLL_OUTPUT_DEBUG = $(outbase).debug
     300TOOL_GXX3_LINK_DLL_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
    286301TOOL_GXX3_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
    287302                $(filter %.def, $(othersrc))
     
    295310                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
    296311                $(call TOOL_GXX3_LD_MAP,$(outbase).map)
     312 ifeq ($(ld_debug),split)
     313        $(TOOL_GXX32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
     314        $(CHMOD) a-x $(outbase).debug
     315        $(TOOL_GXX32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
     316 endif
    297317endef
    298318
     
    313333TOOL_GXX3_LINK_SYSMOD_OUTPUT =
    314334TOOL_GXX3_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).map
     335TOOL_GXX3_LINK_SYSMOD_OUTPUT_DEBUG = $(outbase).debug
     336TOOL_GXX3_LINK_SYSMOD_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
    315337TOOL_GXX3_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
    316338                $(filter %.def, $(othersrc))
     
    322344                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
    323345                $(call TOOL_GXX3_LD_SYSMOD_MAP,$(outbase).map)
    324 endef
    325 
     346 ifeq ($(ld_debug),split)
     347        $(TOOL_GXX32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
     348        $(CHMOD) a-x $(outbase).debug
     349        $(TOOL_GXX32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
     350 endif
     351endef
     352
  • trunk/kBuild/tools/GXX32.kmk

    r2431 r2534  
    5959TOOL_GXX32_LD_SYSMOD_MAP ?=
    6060endif
     61if1of ($(KBUILD_HOST), solaris)
     62 TOOL_GXX32_OBJCOPY ?= gobjcopy$(HOSTSUFF_EXE)
     63else
     64 TOOL_GXX32_OBJCOPY ?= objcopy$(HOSTSUFF_EXE)
     65endif
     66
    6167ifdef SLKRUNS
    62 TOOL_GXX32_CC  += -fmessage-length=0
    63 TOOL_GXX32_CXX += -fmessage-length=0
     68 TOOL_GXX32_CC  += -fmessage-length=0
     69 TOOL_GXX32_CXX += -fmessage-length=0
    6470endif
    6571
     
    9399TOOL_GXX32_LDFLAGS.debug    ?= -g
    94100TOOL_GXX32_LDFLAGS.profile  ?= -g
     101
    95102
    96103
     
    169176                -o $(obj)\
    170177                -
     178        $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
    171179endef
    172180else # !KBUILD_USE_KOBJCACHE
     
    178186                -o $(obj)\
    179187                $(abspath $(source))
     188        $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
    180189endef
    181190endif # !KBUILD_USE_KOBJCACHE
     
    204213                -o $(obj)\
    205214                $(abspath $(source))
     215        $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
    206216endef
    207217
     
    245255TOOL_GXX32_LINK_PROGRAM_OUTPUT =
    246256TOOL_GXX32_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).map
     257TOOL_GXX32_LINK_PROGRAM_OUTPUT_DEBUG = $(outbase).debug
     258TOOL_GXX32_LINK_PROGRAM_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
    247259TOOL_GXX32_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
    248260TOOL_GXX32_LINK_PROGRAM_DEPORD =
     
    252264                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
    253265                $(call TOOL_GXX32_LD_MAP,$(outbase).map)
     266 ifeq ($(ld_debug),split)
     267        $(TOOL_GXX32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
     268        $(CHMOD) a-x $(outbase).debug
     269        $(TOOL_GXX32_OBJCOPY) --strip-debug $(out)
     270        $(TOOL_GXX32_OBJCOPY) --add-gnu-debuglink=$(outbase).debug $(out)
     271 endif
    254272endef
    255273
  • trunk/kBuild/tools/GXX3OMF.kmk

    r2431 r2534  
    253253                -Zmap=$(outbase).map
    254254        $(QUIET)$(TOOL_GXX3OMF_LD) @$(outbase).rsp
     255if1of ($(ld_debug), split)
     256 $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GXX3OMF.)
     257endif
    255258endef
    256259
     
    284287                -Zmap=$(outbase).map
    285288        $(TOOL_GXX3OMF_LD) @$(outbase).rsp
     289if1of ($(ld_debug), split)
     290 $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GXX3OMF.)
     291endif
    286292endef
    287293
     
    315321                -Zmap=$(outbase).map
    316322        $(QUIET)$(TOOL_GXX3OMF_LD_SYSMOD) @$(outbase).rsp
    317 endef
    318 
     323if1of ($(ld_debug), split)
     324 $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GXX3OMF.)
     325endif
     326endef
     327
  • trunk/kBuild/tools/GXX3PLAIN.kmk

    r2431 r2534  
    258258                $(foreach p,$(libpath), -L$(p))\
    259259                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
     260if1of ($(ld_debug), split)
     261 $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GXX3PLAIN.)
     262endif
    260263endef
    261264
     
    286289                $(foreach p,$(libpath), -L$(p))\
    287290                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
     291if1of ($(ld_debug), split)
     292 $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GXX3PLAIN.)
     293endif
    288294endef
    289295
     
    317323                $(foreach p,$(libpath), -L$(p))\
    318324                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
    319 endef
    320 
     325if1of ($(ld_debug), split)
     326 $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GXX3PLAIN.)
     327endif
     328endef
     329
  • trunk/kBuild/tools/GXX64.kmk

    r2431 r2534  
    5959TOOL_GXX64_LD_SYSMOD_MAP ?=
    6060endif
     61if1of ($(KBUILD_HOST), solaris)
     62 TOOL_GXX64_OBJCOPY ?= gobjcopy$(HOSTSUFF_EXE)
     63else
     64 TOOL_GXX64_OBJCOPY ?= objcopy$(HOSTSUFF_EXE)
     65endif
     66
    6167ifdef SLKRUNS
    6268TOOL_GXX64_CC  += -fmessage-length=0
     
    248254TOOL_GXX64_LINK_PROGRAM_OUTPUT =
    249255TOOL_GXX64_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).map
     256TOOL_GXX64_LINK_PROGRAM_OUTPUT_DEBUG = $(outbase).debug
     257TOOL_GXX64_LINK_PROGRAM_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
    250258TOOL_GXX64_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
    251259TOOL_GXX64_LINK_PROGRAM_DEPORD =
     
    255263                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
    256264                $(call TOOL_GXX64_LD_MAP,$(outbase).map)
     265 ifeq ($(ld_debug),split)
     266        $(TOOL_GXX64_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
     267        $(CHMOD) a-x $(outbase).debug
     268        $(TOOL_GXX64_OBJCOPY) --strip-debug $(out)
     269        $(TOOL_GXX64_OBJCOPY) --add-gnu-debuglink=$(outbase).debug $(out)
     270 endif
    257271endef
    258272
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette