VirtualBox

Changeset 2541 in kBuild


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

tools/G*: debug splitting.

Location:
trunk/kBuild/tools
Files:
10 edited

Legend:

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

    r2431 r2541  
    206206        $(QUIET)$(TOOL_GCC_LD) $(flags) -o $(out) $(objs) \
    207207                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
     208if1of ($(ld_debug), split)
     209 $(warning kBuild: Debug splitting is requested for $(target), but this feature is not supported by GCC.)
     210endif
    208211endef
    209212
     
    228231        $(QUIET)$(TOOL_GCC_LD) $(TOOL_GCC_LDFLAGS.dll) $(flags) -o $(out) $(objs) \
    229232                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
    230 endef
    231 
     233if1of ($(ld_debug), split)
     234 $(warning kBuild: Debug splitting is requested for $(target), but this feature is not supported by GCC.)
     235endif
     236endef
     237
  • trunk/kBuild/tools/GCC3.kmk

    r2431 r2541  
    6464 TOOL_GCC3_LD_SYSMOD_MAP ?=
    6565endif
     66if1of ($(KBUILD_HOST), solaris)
     67 TOOL_GCC3_OBJCOPY ?= gobjcopy$(HOSTSUFF_EXE)
     68else
     69 TOOL_GCC3_OBJCOPY ?= objcopy$(HOSTSUFF_EXE)
     70endif
     71
    6672ifdef SLKRUNS
    6773 TOOL_GCC3_CC  += -fmessage-length=0
     
    257263TOOL_GCC3_LINK_PROGRAM_OUTPUT =
    258264TOOL_GCC3_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).map
     265TOOL_GCC3_LINK_PROGRAM_OUTPUT_DEBUG = $(outbase).debug
     266TOOL_GCC3_LINK_PROGRAM_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
    259267TOOL_GCC3_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_GCC3_LD_MAP,$(outbase).map)
     276 ifeq ($(ld_debug),split)
     277        $(TOOL_GCC3_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
     278        $(CHMOD) a-x $(outbase).debug
     279        $(TOOL_GCC3_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
     280 endif
    268281endef
    269282
     
    284297TOOL_GCC3_LINK_DLL_OUTPUT =
    285298TOOL_GCC3_LINK_DLL_OUTPUT_MAYBE = $(outbase).map
     299TOOL_GCC3_LINK_DLL_OUTPUT_DEBUG = $(outbase).debug
     300TOOL_GCC3_LINK_DLL_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
    286301TOOL_GCC3_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
    287302                $(filter %.def, $(othersrc))
     
    289304define TOOL_GCC3_LINK_DLL_CMDS
    290305        $(QUIET)$(TOOL_GCC3_LD) $(TOOL_GCC3_LDFLAGS.dll) $(flags) -o $(out)\
    291                 $(if $(filter-out win32 os2, $(KBUILD_TARGET)),$(call TOOL_GCC3_LD_SONAME,$(target),$(out)))\
     306                $(if $(filter-out win os2, $(KBUILD_TARGET)),$(call TOOL_GCC3_LD_SONAME,$(target),$(out)))\
    292307                $(objs)\
    293308                $(filter %.def, $(othersrc))\
     
    295310                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
    296311                $(call TOOL_GCC3_LD_MAP,$(outbase).map)
     312 ifeq ($(ld_debug),split)
     313        $(TOOL_GCC3_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
     314        $(CHMOD) a-x $(outbase).debug
     315        $(TOOL_GCC3_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
     316 endif
    297317endef
    298318
     
    313333TOOL_GCC3_LINK_SYSMOD_OUTPUT =
    314334TOOL_GCC3_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).map
     335TOOL_GCC3_LINK_SYSMOD_OUTPUT_DEBUG = $(outbase).debug
     336TOOL_GCC3_LINK_SYSMOD_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
    315337TOOL_GCC3_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_GCC3_LD_SYSMOD_MAP,$(outbase).map)
    324 endef
    325 
     346 ifeq ($(ld_debug),split)
     347        $(TOOL_GCC3_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
     348        $(CHMOD) a-x $(outbase).debug
     349        $(TOOL_GCC3_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
     350 endif
     351endef
     352
  • trunk/kBuild/tools/GCC32.kmk

    r2431 r2541  
    5959TOOL_GCC32_LD_SYSMOD_MAP ?=
    6060endif
     61if1of ($(KBUILD_HOST), solaris)
     62 TOOL_GCC32_OBJCOPY ?= gobjcopy$(HOSTSUFF_EXE)
     63else
     64 TOOL_GCC32_OBJCOPY ?= objcopy$(HOSTSUFF_EXE)
     65endif
     66
    6167ifdef SLKRUNS
    62 TOOL_GCC32_CC  += -fmessage-length=0
    63 TOOL_GCC32_CXX += -fmessage-length=0
     68 TOOL_GCC32_CC  += -fmessage-length=0
     69 TOOL_GCC32_CXX += -fmessage-length=0
    6470endif
    6571
     
    227233        $(QUIET)$(APPEND) -n $(out).ar-script \
    228234                $(foreach o,$(objs), 'ADDMOD $(o)') \
    229                 $(foreach o,$(othersrc), 'ADDLIB $(o)')
     235                $(foreach o,$(filter-out %.def %.imp,$(othersrc)), 'ADDLIB $(o)')
     236        $(if $(filter %.def %.imp,$(othersrc))\
     237                ,$(TOOL_GCC32_AR_IMP) -o $(outbase).imp.a $(filter %.def %.imp,$(othersrc))\
     238                 $(NL)$(TAB)$(QUIET)$(APPEND) $(out).ar-script 'ADDLIB $(outbase).imp.a')
    230239        $(QUIET)$(APPEND) $(out).ar-script 'SAVE'
    231240        $(QUIET)$(APPEND) $(out).ar-script 'END'
     
    249258TOOL_GCC32_LINK_PROGRAM_OUTPUT =
    250259TOOL_GCC32_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).map
    251 TOOL_GCC32_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
     260TOOL_GCC32_LINK_PROGRAM_OUTPUT_DEBUG = $(outbase).debug
     261TOOL_GCC32_LINK_PROGRAM_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
     262TOOL_GCC32_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
     263                $(filter %.def, $(othersrc))
    252264TOOL_GCC32_LINK_PROGRAM_DEPORD =
    253265define TOOL_GCC32_LINK_PROGRAM_CMDS
     
    256268                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
    257269                $(call TOOL_GCC32_LD_MAP,$(outbase).map)
     270 ifeq ($(ld_debug),split)
     271        $(TOOL_GCC32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
     272        $(CHMOD) a-x $(outbase).debug
     273        $(TOOL_GCC32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
     274 endif
    258275endef
    259276
     
    274291TOOL_GCC32_LINK_DLL_OUTPUT =
    275292TOOL_GCC32_LINK_DLL_OUTPUT_MAYBE = $(outbase).map
    276 TOOL_GCC32_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
     293TOOL_GCC32_LINK_DLL_OUTPUT_DEBUG = $(outbase).debug
     294TOOL_GCC32_LINK_DLL_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
     295TOOL_GCC32_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
     296                $(filter %.def, $(othersrc))
    277297TOOL_GCC32_LINK_DLL_DEPORD =
    278298define TOOL_GCC32_LINK_DLL_CMDS
     
    283303                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
    284304                $(call TOOL_GCC32_LD_MAP,$(outbase).map)
     305 ifeq ($(ld_debug),split)
     306        $(TOOL_GCC32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
     307        $(CHMOD) a-x $(outbase).debug
     308        $(TOOL_GCC32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
     309 endif
    285310endef
    286311
     
    301326TOOL_GCC32_LINK_SYSMOD_OUTPUT =
    302327TOOL_GCC32_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).map
    303 TOOL_GCC32_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
     328TOOL_GCC32_LINK_SYSMOD_OUTPUT_DEBUG = $(outbase).debug
     329TOOL_GCC32_LINK_SYSMOD_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
     330TOOL_GCC32_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
     331                $(filter %.def, $(othersrc))
    304332TOOL_GCC32_LINK_SYSMOD_DEPORD =
    305333define TOOL_GCC32_LINK_SYSMOD_CMDS
    306334        $(QUIET)$(TOOL_GCC32_LD_SYSMOD) $(TOOL_GCC32_LDFLAGS.sysmod) $(flags) -o $(out) $(objs)\
     335                $(filter %.def, $(othersrc))\
    307336                $(foreach p,$(libpath), -L$(p))\
    308337                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
    309338                $(call TOOL_GCC32_LD_SYSMOD_MAP,$(outbase).map)
    310 endef
    311 
     339 ifeq ($(ld_debug),split)
     340        $(TOOL_GCC32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
     341        $(CHMOD) a-x $(outbase).debug
     342        $(TOOL_GCC32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
     343 endif
     344endef
     345
  • trunk/kBuild/tools/GCC3PLAIN.kmk

    r2534 r2541  
    259259                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
    260260if1of ($(ld_debug), split)
    261  $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GCC3PLAIN.)
     261 $(warning kBuild: Debug splitting is requested for $(target), but this feature is not supported by GCC3PLAIN.)
    262262endif
    263263endef
     
    290290                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
    291291if1of ($(ld_debug), split)
    292  $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GCC3PLAIN.)
     292 $(warning kBuild: Debug splitting is requested for $(target), but this feature is not supported by GCC3PLAIN.)
    293293endif
    294294endef
     
    324324                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
    325325if1of ($(ld_debug), split)
    326  $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GCC3PLAIN.)
    327 endif
    328 endef
    329 
     326 $(warning kBuild: Debug splitting is requested for $(target), but this feature is not supported by GCC3PLAIN.)
     327endif
     328endef
     329
  • trunk/kBuild/tools/GCC64.kmk

    r2431 r2541  
    5959TOOL_GCC64_LD_SYSMOD_MAP ?=
    6060endif
     61if1of ($(KBUILD_HOST), solaris)
     62 TOOL_GCC64_OBJCOPY ?= gobjcopy$(HOSTSUFF_EXE)
     63else
     64 TOOL_GCC64_OBJCOPY ?= objcopy$(HOSTSUFF_EXE)
     65endif
     66
    6167ifdef SLKRUNS
    62 TOOL_GCC64_CC  += -fmessage-length=0
    63 TOOL_GCC64_CXX += -fmessage-length=0
     68 TOOL_GCC64_CC  += -fmessage-length=0
     69 TOOL_GCC64_CXX += -fmessage-length=0
    6470endif
    6571
     
    172178endef
    173179else # !KBUILD_USE_KOBJCACHE
    174 
    175180TOOL_GCC64_COMPILE_CXX_OUTPUT =
    176181define TOOL_GCC64_COMPILE_CXX_CMDS
     
    249254TOOL_GCC64_LINK_PROGRAM_OUTPUT =
    250255TOOL_GCC64_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).map
     256TOOL_GCC64_LINK_PROGRAM_OUTPUT_DEBUG = $(outbase).debug
     257TOOL_GCC64_LINK_PROGRAM_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
    251258TOOL_GCC64_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
    252259TOOL_GCC64_LINK_PROGRAM_DEPORD =
     
    256263                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
    257264                $(call TOOL_GCC64_LD_MAP,$(outbase).map)
     265 ifeq ($(ld_debug),split)
     266        $(TOOL_GCC64_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
     267        $(CHMOD) a-x $(outbase).debug
     268        $(TOOL_GCC64_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
     269 endif
    258270endef
    259271
     
    274286TOOL_GCC64_LINK_DLL_OUTPUT =
    275287TOOL_GCC64_LINK_DLL_OUTPUT_MAYBE = $(outbase).map
     288TOOL_GCC64_LINK_DLL_OUTPUT_DEBUG = $(outbase).debug
     289TOOL_GCC64_LINK_DLL_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
    276290TOOL_GCC64_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
    277291TOOL_GCC64_LINK_DLL_DEPORD =
     
    283297                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
    284298                $(call TOOL_GCC64_LD_MAP,$(outbase).map)
     299 ifeq ($(ld_debug),split)
     300        $(TOOL_GCC64_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
     301        $(CHMOD) a-x $(outbase).debug
     302        $(TOOL_GCC64_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
     303 endif
    285304endef
    286305
     
    301320TOOL_GCC64_LINK_SYSMOD_OUTPUT =
    302321TOOL_GCC64_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).map
     322TOOL_GCC64_LINK_SYSMOD_OUTPUT_DEBUG = $(outbase).debug
     323TOOL_GCC64_LINK_SYSMOD_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
    303324TOOL_GCC64_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
    304325TOOL_GCC64_LINK_SYSMOD_DEPORD =
     
    308329                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
    309330                $(call TOOL_GCC64_LD_SYSMOD_MAP,$(outbase).map)
    310 endef
    311 
     331 ifeq ($(ld_debug),split)
     332        $(TOOL_GCC64_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
     333        $(CHMOD) a-x $(outbase).debug
     334        $(TOOL_GCC64_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
     335 endif
     336endef
     337
  • trunk/kBuild/tools/GXX.kmk

    r2431 r2541  
    206206        $(QUIET)$(TOOL_GXX_LD) $(flags) -o $(out) $(objs) \
    207207                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
     208if1of ($(ld_debug), split)
     209 $(warning kBuild: Debug splitting is requested for $(target), but this feature is not supported by GXX.)
     210endif
    208211endef
    209212
     
    228231        $(QUIET)$(TOOL_GXX_LD) $(TOOL_GXX_LDFLAGS.dll) $(flags) -o $(out) $(objs) \
    229232                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
    230 endef
    231 
     233if1of ($(ld_debug), split)
     234 $(warning kBuild: Debug splitting is requested for $(target), but this feature is not supported by GXX.)
     235endif
     236endef
     237
  • trunk/kBuild/tools/GXX3.kmk

    r2534 r2541  
    275275                $(call TOOL_GXX3_LD_MAP,$(outbase).map)
    276276 ifeq ($(ld_debug),split)
    277         $(TOOL_GXX32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
     277        $(TOOL_GXX3_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
    278278        $(CHMOD) a-x $(outbase).debug
    279         $(TOOL_GXX32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
     279        $(TOOL_GXX3_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
    280280 endif
    281281endef
     
    304304define TOOL_GXX3_LINK_DLL_CMDS
    305305        $(QUIET)$(TOOL_GXX3_LD) $(TOOL_GXX3_LDFLAGS.dll) $(flags) -o $(out)\
    306                 $(if $(filter-out win32 os2, $(KBUILD_TARGET)),$(call TOOL_GXX3_LD_SONAME,$(target),$(out)))\
     306                $(if $(filter-out win os2, $(KBUILD_TARGET)),$(call TOOL_GXX3_LD_SONAME,$(target),$(out)))\
    307307                $(objs)\
    308308                $(filter %.def, $(othersrc))\
     
    311311                $(call TOOL_GXX3_LD_MAP,$(outbase).map)
    312312 ifeq ($(ld_debug),split)
    313         $(TOOL_GXX32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
     313        $(TOOL_GXX3_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
    314314        $(CHMOD) a-x $(outbase).debug
    315         $(TOOL_GXX32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
     315        $(TOOL_GXX3_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
    316316 endif
    317317endef
     
    345345                $(call TOOL_GXX3_LD_SYSMOD_MAP,$(outbase).map)
    346346 ifeq ($(ld_debug),split)
    347         $(TOOL_GXX32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
     347        $(TOOL_GXX3_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
    348348        $(CHMOD) a-x $(outbase).debug
    349         $(TOOL_GXX32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
     349        $(TOOL_GXX3_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
    350350 endif
    351351endef
  • trunk/kBuild/tools/GXX32.kmk

    r2534 r2541  
    101101
    102102
    103 
    104103## Compile C source.
    105104# @param    $(target)   Normalized main target name.
     
    233232        $(QUIET)$(APPEND) -n $(out).ar-script \
    234233                $(foreach o,$(objs), 'ADDMOD $(o)') \
    235                 $(foreach o,$(othersrc), 'ADDLIB $(o)')
     234                $(foreach o,$(filter-out %.def %.imp,$(othersrc)), 'ADDLIB $(o)')
     235        $(if $(filter %.def %.imp,$(othersrc))\
     236                ,$(TOOL_GXX3_AR_IMP) -o $(outbase).imp.a $(filter %.def %.imp,$(othersrc))\
     237                 $(NL)$(TAB)$(QUIET)$(APPEND) $(out).ar-script 'ADDLIB $(outbase).imp.a')
    236238        $(QUIET)$(APPEND) $(out).ar-script 'SAVE'
    237239        $(QUIET)$(APPEND) $(out).ar-script 'END'
     
    257259TOOL_GXX32_LINK_PROGRAM_OUTPUT_DEBUG = $(outbase).debug
    258260TOOL_GXX32_LINK_PROGRAM_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
    259 TOOL_GXX32_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
     261TOOL_GXX32_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
     262                $(filter %.def, $(othersrc))
    260263TOOL_GXX32_LINK_PROGRAM_DEPORD =
    261264define TOOL_GXX32_LINK_PROGRAM_CMDS
     
    267270        $(TOOL_GXX32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
    268271        $(CHMOD) a-x $(outbase).debug
    269         $(TOOL_GXX32_OBJCOPY) --strip-debug $(out)
    270         $(TOOL_GXX32_OBJCOPY) --add-gnu-debuglink=$(outbase).debug $(out)
     272        $(TOOL_GXX32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
    271273 endif
    272274endef
     
    288290TOOL_GXX32_LINK_DLL_OUTPUT =
    289291TOOL_GXX32_LINK_DLL_OUTPUT_MAYBE = $(outbase).map
    290 TOOL_GXX32_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
     292TOOL_GXX32_LINK_DLL_OUTPUT_DEBUG = $(outbase).debug
     293TOOL_GXX32_LINK_DLL_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
     294TOOL_GXX32_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
     295                $(filter %.def, $(othersrc))
    291296TOOL_GXX32_LINK_DLL_DEPORD =
    292297define TOOL_GXX32_LINK_DLL_CMDS
     
    297302                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
    298303                $(call TOOL_GXX32_LD_MAP,$(outbase).map)
     304 ifeq ($(ld_debug),split)
     305        $(TOOL_GXX32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
     306        $(CHMOD) a-x $(outbase).debug
     307        $(TOOL_GXX32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
     308 endif
    299309endef
    300310
     
    315325TOOL_GXX32_LINK_SYSMOD_OUTPUT =
    316326TOOL_GXX32_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).map
    317 TOOL_GXX32_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
     327TOOL_GXX32_LINK_SYSMOD_OUTPUT_DEBUG = $(outbase).debug
     328TOOL_GXX32_LINK_SYSMOD_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
     329TOOL_GXX32_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
     330                $(filter %.def, $(othersrc))
    318331TOOL_GXX32_LINK_SYSMOD_DEPORD =
    319332define TOOL_GXX32_LINK_SYSMOD_CMDS
    320333        $(QUIET)$(TOOL_GXX32_LD_SYSMOD) $(TOOL_GXX32_LDFLAGS.sysmod) $(flags) -o $(out) $(objs)\
     334                $(filter %.def, $(othersrc))\
    321335                $(foreach p,$(libpath), -L$(p))\
    322336                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
    323337                $(call TOOL_GXX32_LD_SYSMOD_MAP,$(outbase).map)
    324 endef
    325 
     338 ifeq ($(ld_debug),split)
     339        $(TOOL_GXX32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
     340        $(CHMOD) a-x $(outbase).debug
     341        $(TOOL_GXX32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
     342 endif
     343endef
     344
  • trunk/kBuild/tools/GXX3PLAIN.kmk

    r2534 r2541  
    259259                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
    260260if1of ($(ld_debug), split)
    261  $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GXX3PLAIN.)
     261 $(warning kBuild: Debug splitting is requested for $(target), but this feature is not supported by GXX3PLAIN.)
    262262endif
    263263endef
     
    290290                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
    291291if1of ($(ld_debug), split)
    292  $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GXX3PLAIN.)
     292 $(warning kBuild: Debug splitting is requested for $(target), but this feature is not supported by GXX3PLAIN.)
    293293endif
    294294endef
     
    324324                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
    325325if1of ($(ld_debug), split)
    326  $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GXX3PLAIN.)
    327 endif
    328 endef
    329 
     326 $(warning kBuild: Debug splitting is requested for $(target), but this feature is not supported by GXX3PLAIN.)
     327endif
     328endef
     329
  • 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.

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