Ignore:
Timestamp:
Aug 3, 2011, 11:51:30 AM (14 years ago)
Author:
bird
Message:

tools/G*: debug splitting.

File:
1 edited

Legend:

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

    r2534 r2541  
    6666
    6767ifdef SLKRUNS
    68 TOOL_GXX64_CC  += -fmessage-length=0
    69 TOOL_GXX64_CXX += -fmessage-length=0
     68 TOOL_GXX64_CC  += -fmessage-length=0
     69 TOOL_GXX64_CXX += -fmessage-length=0
    7070endif
    7171
     
    266266        $(TOOL_GXX64_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
    267267        $(CHMOD) a-x $(outbase).debug
    268         $(TOOL_GXX64_OBJCOPY) --strip-debug $(out)
    269         $(TOOL_GXX64_OBJCOPY) --add-gnu-debuglink=$(outbase).debug $(out)
     268        $(TOOL_GXX64_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
    270269 endif
    271270endef
     
    287286TOOL_GXX64_LINK_DLL_OUTPUT =
    288287TOOL_GXX64_LINK_DLL_OUTPUT_MAYBE = $(outbase).map
     288TOOL_GXX64_LINK_DLL_OUTPUT_DEBUG = $(outbase).debug
     289TOOL_GXX64_LINK_DLL_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
    289290TOOL_GXX64_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
    290291TOOL_GXX64_LINK_DLL_DEPORD =
     
    296297                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
    297298                $(call TOOL_GXX64_LD_MAP,$(outbase).map)
     299 ifeq ($(ld_debug),split)
     300        $(TOOL_GXX64_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
     301        $(CHMOD) a-x $(outbase).debug
     302        $(TOOL_GXX64_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
     303 endif
    298304endef
    299305
     
    314320TOOL_GXX64_LINK_SYSMOD_OUTPUT =
    315321TOOL_GXX64_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).map
     322TOOL_GXX64_LINK_SYSMOD_OUTPUT_DEBUG = $(outbase).debug
     323TOOL_GXX64_LINK_SYSMOD_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
    316324TOOL_GXX64_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
    317325TOOL_GXX64_LINK_SYSMOD_DEPORD =
     
    321329                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
    322330                $(call TOOL_GXX64_LD_SYSMOD_MAP,$(outbase).map)
    323 endef
    324 
     331 ifeq ($(ld_debug),split)
     332        $(TOOL_GXX64_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
     333        $(CHMOD) a-x $(outbase).debug
     334        $(TOOL_GXX64_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
     335 endif
     336endef
     337
Note: See TracChangeset for help on using the changeset viewer.