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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.