Index: trunk/kBuild/tools/GCC3OMF.kmk
===================================================================
--- trunk/kBuild/tools/GCC3OMF.kmk	(revision 2533)
+++ trunk/kBuild/tools/GCC3OMF.kmk	(revision 2534)
@@ -253,4 +253,7 @@
 		-Zmap=$(outbase).map
 	$(QUIET)$(TOOL_GCC3OMF_LD) @$(outbase).rsp
+if1of ($(ld_debug), split)
+ $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GCC3OMF.)
+endif
 endef
 
@@ -284,4 +287,7 @@
 		-Zmap=$(outbase).map
 	$(TOOL_GCC3OMF_LD) @$(outbase).rsp
+if1of ($(ld_debug), split)
+ $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GCC3OMF.)
+endif
 endef
 
@@ -315,4 +321,7 @@
 		-Zmap=$(outbase).map
 	$(QUIET)$(TOOL_GCC3OMF_LD_SYSMOD) @$(outbase).rsp
-endef
-
+if1of ($(ld_debug), split)
+ $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GCC3OMF.)
+endif
+endef
+
Index: trunk/kBuild/tools/GCC3PLAIN.kmk
===================================================================
--- trunk/kBuild/tools/GCC3PLAIN.kmk	(revision 2533)
+++ trunk/kBuild/tools/GCC3PLAIN.kmk	(revision 2534)
@@ -258,4 +258,7 @@
 		$(foreach p,$(libpath), -L$(p))\
 		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
+if1of ($(ld_debug), split)
+ $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GCC3PLAIN.)
+endif
 endef
 
@@ -286,4 +289,7 @@
 		$(foreach p,$(libpath), -L$(p))\
 		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
+if1of ($(ld_debug), split)
+ $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GCC3PLAIN.)
+endif
 endef
 
@@ -317,4 +323,7 @@
 		$(foreach p,$(libpath), -L$(p))\
 		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
-endef
-
+if1of ($(ld_debug), split)
+ $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GCC3PLAIN.)
+endif
+endef
+
Index: trunk/kBuild/tools/GXX3.kmk
===================================================================
--- trunk/kBuild/tools/GXX3.kmk	(revision 2533)
+++ trunk/kBuild/tools/GXX3.kmk	(revision 2534)
@@ -64,4 +64,10 @@
  TOOL_GXX3_LD_SYSMOD_MAP ?=
 endif
+if1of ($(KBUILD_HOST), solaris)
+ TOOL_GXX3_OBJCOPY ?= gobjcopy$(HOSTSUFF_EXE)
+else
+ TOOL_GXX3_OBJCOPY ?= objcopy$(HOSTSUFF_EXE)
+endif
+
 ifdef SLKRUNS
  TOOL_GXX3_CC  += -fmessage-length=0
@@ -257,4 +263,6 @@
 TOOL_GXX3_LINK_PROGRAM_OUTPUT =
 TOOL_GXX3_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).map
+TOOL_GXX3_LINK_PROGRAM_OUTPUT_DEBUG = $(outbase).debug
+TOOL_GXX3_LINK_PROGRAM_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
 TOOL_GXX3_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
 		$(filter %.def, $(othersrc))
@@ -266,4 +274,9 @@
 		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GXX3_LD_MAP,$(outbase).map)
+ ifeq ($(ld_debug),split)
+	$(TOOL_GXX32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
+	$(CHMOD) a-x $(outbase).debug
+	$(TOOL_GXX32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
+ endif
 endef
 
@@ -284,4 +297,6 @@
 TOOL_GXX3_LINK_DLL_OUTPUT =
 TOOL_GXX3_LINK_DLL_OUTPUT_MAYBE = $(outbase).map
+TOOL_GXX3_LINK_DLL_OUTPUT_DEBUG = $(outbase).debug
+TOOL_GXX3_LINK_DLL_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
 TOOL_GXX3_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
 		$(filter %.def, $(othersrc))
@@ -295,4 +310,9 @@
 		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GXX3_LD_MAP,$(outbase).map)
+ ifeq ($(ld_debug),split)
+	$(TOOL_GXX32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
+	$(CHMOD) a-x $(outbase).debug
+	$(TOOL_GXX32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
+ endif
 endef
 
@@ -313,4 +333,6 @@
 TOOL_GXX3_LINK_SYSMOD_OUTPUT =
 TOOL_GXX3_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).map
+TOOL_GXX3_LINK_SYSMOD_OUTPUT_DEBUG = $(outbase).debug
+TOOL_GXX3_LINK_SYSMOD_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
 TOOL_GXX3_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
 		$(filter %.def, $(othersrc))
@@ -322,4 +344,9 @@
 		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GXX3_LD_SYSMOD_MAP,$(outbase).map)
-endef
-
+ ifeq ($(ld_debug),split)
+	$(TOOL_GXX32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
+	$(CHMOD) a-x $(outbase).debug
+	$(TOOL_GXX32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
+ endif
+endef
+
Index: trunk/kBuild/tools/GXX32.kmk
===================================================================
--- trunk/kBuild/tools/GXX32.kmk	(revision 2533)
+++ trunk/kBuild/tools/GXX32.kmk	(revision 2534)
@@ -59,7 +59,13 @@
 TOOL_GXX32_LD_SYSMOD_MAP ?=
 endif
+if1of ($(KBUILD_HOST), solaris)
+ TOOL_GXX32_OBJCOPY ?= gobjcopy$(HOSTSUFF_EXE)
+else
+ TOOL_GXX32_OBJCOPY ?= objcopy$(HOSTSUFF_EXE)
+endif
+
 ifdef SLKRUNS
-TOOL_GXX32_CC  += -fmessage-length=0
-TOOL_GXX32_CXX += -fmessage-length=0
+ TOOL_GXX32_CC  += -fmessage-length=0
+ TOOL_GXX32_CXX += -fmessage-length=0
 endif
 
@@ -93,4 +99,5 @@
 TOOL_GXX32_LDFLAGS.debug    ?= -g
 TOOL_GXX32_LDFLAGS.profile  ?= -g
+
 
 
@@ -169,4 +176,5 @@
 		-o $(obj)\
 		-
+	$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
 endef
 else # !KBUILD_USE_KOBJCACHE
@@ -178,4 +186,5 @@
 		-o $(obj)\
 		$(abspath $(source))
+	$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
 endef
 endif # !KBUILD_USE_KOBJCACHE
@@ -204,4 +213,5 @@
 		-o $(obj)\
 		$(abspath $(source))
+	$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
 endef
 
@@ -245,4 +255,6 @@
 TOOL_GXX32_LINK_PROGRAM_OUTPUT =
 TOOL_GXX32_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).map
+TOOL_GXX32_LINK_PROGRAM_OUTPUT_DEBUG = $(outbase).debug
+TOOL_GXX32_LINK_PROGRAM_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
 TOOL_GXX32_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
 TOOL_GXX32_LINK_PROGRAM_DEPORD =
@@ -252,4 +264,10 @@
 		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GXX32_LD_MAP,$(outbase).map)
+ ifeq ($(ld_debug),split)
+	$(TOOL_GXX32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
+	$(CHMOD) a-x $(outbase).debug
+	$(TOOL_GXX32_OBJCOPY) --strip-debug $(out)
+	$(TOOL_GXX32_OBJCOPY) --add-gnu-debuglink=$(outbase).debug $(out)
+ endif
 endef
 
Index: trunk/kBuild/tools/GXX3OMF.kmk
===================================================================
--- trunk/kBuild/tools/GXX3OMF.kmk	(revision 2533)
+++ trunk/kBuild/tools/GXX3OMF.kmk	(revision 2534)
@@ -253,4 +253,7 @@
 		-Zmap=$(outbase).map
 	$(QUIET)$(TOOL_GXX3OMF_LD) @$(outbase).rsp
+if1of ($(ld_debug), split)
+ $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GXX3OMF.)
+endif
 endef
 
@@ -284,4 +287,7 @@
 		-Zmap=$(outbase).map
 	$(TOOL_GXX3OMF_LD) @$(outbase).rsp
+if1of ($(ld_debug), split)
+ $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GXX3OMF.)
+endif
 endef
 
@@ -315,4 +321,7 @@
 		-Zmap=$(outbase).map
 	$(QUIET)$(TOOL_GXX3OMF_LD_SYSMOD) @$(outbase).rsp
-endef
-
+if1of ($(ld_debug), split)
+ $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GXX3OMF.)
+endif
+endef
+
Index: trunk/kBuild/tools/GXX3PLAIN.kmk
===================================================================
--- trunk/kBuild/tools/GXX3PLAIN.kmk	(revision 2533)
+++ trunk/kBuild/tools/GXX3PLAIN.kmk	(revision 2534)
@@ -258,4 +258,7 @@
 		$(foreach p,$(libpath), -L$(p))\
 		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
+if1of ($(ld_debug), split)
+ $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GXX3PLAIN.)
+endif
 endef
 
@@ -286,4 +289,7 @@
 		$(foreach p,$(libpath), -L$(p))\
 		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
+if1of ($(ld_debug), split)
+ $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GXX3PLAIN.)
+endif
 endef
 
@@ -317,4 +323,7 @@
 		$(foreach p,$(libpath), -L$(p))\
 		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
-endef
-
+if1of ($(ld_debug), split)
+ $(warning kBuild: Debug splitting is requrested for $(target), but this feature is not supported by GXX3PLAIN.)
+endif
+endef
+
Index: trunk/kBuild/tools/GXX64.kmk
===================================================================
--- trunk/kBuild/tools/GXX64.kmk	(revision 2533)
+++ trunk/kBuild/tools/GXX64.kmk	(revision 2534)
@@ -59,4 +59,10 @@
 TOOL_GXX64_LD_SYSMOD_MAP ?=
 endif
+if1of ($(KBUILD_HOST), solaris)
+ TOOL_GXX64_OBJCOPY ?= gobjcopy$(HOSTSUFF_EXE)
+else
+ TOOL_GXX64_OBJCOPY ?= objcopy$(HOSTSUFF_EXE)
+endif
+
 ifdef SLKRUNS
 TOOL_GXX64_CC  += -fmessage-length=0
@@ -248,4 +254,6 @@
 TOOL_GXX64_LINK_PROGRAM_OUTPUT =
 TOOL_GXX64_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).map
+TOOL_GXX64_LINK_PROGRAM_OUTPUT_DEBUG = $(outbase).debug
+TOOL_GXX64_LINK_PROGRAM_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
 TOOL_GXX64_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
 TOOL_GXX64_LINK_PROGRAM_DEPORD =
@@ -255,4 +263,10 @@
 		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GXX64_LD_MAP,$(outbase).map)
+ ifeq ($(ld_debug),split)
+	$(TOOL_GXX64_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
+	$(CHMOD) a-x $(outbase).debug
+	$(TOOL_GXX64_OBJCOPY) --strip-debug $(out)
+	$(TOOL_GXX64_OBJCOPY) --add-gnu-debuglink=$(outbase).debug $(out)
+ endif
 endef
 
