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/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
Note: See TracChangeset for help on using the changeset viewer.