Index: trunk/kBuild/tools/GCC.kmk
===================================================================
--- trunk/kBuild/tools/GCC.kmk	(revision 1257)
+++ trunk/kBuild/tools/GCC.kmk	(revision 1259)
@@ -195,5 +195,5 @@
 define TOOL_GCC_LINK_PROGRAM_CMDS
 	$(QUIET)$(TOOL_GCC_LD) $(flags) -o $(out) $(objs) \
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
 endef
 
@@ -217,5 +217,5 @@
 define TOOL_GCC_LINK_DLL_CMDS
 	$(QUIET)$(TOOL_GCC_LD) $(TOOL_GCC_LDFLAGS.dll) $(flags) -o $(out) $(objs) \
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
-endef
-
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
+endef
+
Index: trunk/kBuild/tools/GCC3.kmk
===================================================================
--- trunk/kBuild/tools/GCC3.kmk	(revision 1257)
+++ trunk/kBuild/tools/GCC3.kmk	(revision 1259)
@@ -249,5 +249,5 @@
 		$(filter %.def, $(othersrc))\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GCC3_LD_MAP,$(outbase).map)
 endef
@@ -278,5 +278,5 @@
 		$(filter %.def, $(othersrc))\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GCC3_LD_MAP,$(outbase).map)
 endef
@@ -305,5 +305,5 @@
 		$(filter %.def, $(othersrc))\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GCC3_LD_SYSMOD_MAP,$(outbase).map)
 endef
Index: trunk/kBuild/tools/GCC32.kmk
===================================================================
--- trunk/kBuild/tools/GCC32.kmk	(revision 1257)
+++ trunk/kBuild/tools/GCC32.kmk	(revision 1259)
@@ -242,5 +242,5 @@
 	$(QUIET)$(TOOL_GCC32_LD) $(flags) -o $(out) $(objs)\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GCC32_LD_MAP,$(outbase).map)
 endef
@@ -269,5 +269,5 @@
 		$(objs)\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GCC32_LD_MAP,$(outbase).map)
 endef
@@ -294,5 +294,5 @@
 	$(QUIET)$(TOOL_GCC32_LD_SYSMOD) $(TOOL_GCC32_LDFLAGS.sysmod) $(flags) -o $(out) $(objs)\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GCC32_LD_SYSMOD_MAP,$(outbase).map)
 endef
Index: trunk/kBuild/tools/GCC3OMF.kmk
===================================================================
--- trunk/kBuild/tools/GCC3OMF.kmk	(revision 1257)
+++ trunk/kBuild/tools/GCC3OMF.kmk	(revision 1259)
@@ -238,5 +238,5 @@
 		$(foreach p,$(libpath), -L$(p))\
 		$(othersrc)\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		-Zmap=$(outbase).map
 	$(QUIET)$(TOOL_GCC3OMF_LD) @$(outbase).rsp
@@ -269,5 +269,5 @@
 		$(foreach p,$(libpath), -L$(p))\
 		$(othersrc)\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		-Zmap=$(outbase).map
 	$(TOOL_GCC3OMF_LD) @$(outbase).rsp
@@ -300,5 +300,5 @@
 		$(foreach p,$(libpath), -L$(p))\
 		$(othersrc)\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		-Zmap=$(outbase).map
 	$(QUIET)$(TOOL_GCC3OMF_LD_SYSMOD) @$(outbase).rsp
Index: trunk/kBuild/tools/GCC3PLAIN.kmk
===================================================================
--- trunk/kBuild/tools/GCC3PLAIN.kmk	(revision 1257)
+++ trunk/kBuild/tools/GCC3PLAIN.kmk	(revision 1259)
@@ -245,5 +245,5 @@
 		$(filter %.def, $(othersrc))\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
 endef
 
@@ -273,10 +273,10 @@
 		$(filter %.def, $(othersrc))\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
 endef
 
 
 ## Link system module (windows aka driver, linux aka kernel module)
-# This tool target might not work everywhere, but is provided for the 
+# This tool target might not work everywhere, but is provided for the
 # platforms where it works (Solaris, etc).
 #
@@ -304,5 +304,5 @@
 		$(filter %.def, $(othersrc))\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GCC3PLAIN_LD_SYSMOD_MAP.$(bld_trg),$(outbase).map)
 endef
Index: trunk/kBuild/tools/GCC4MACHO.kmk
===================================================================
--- trunk/kBuild/tools/GCC4MACHO.kmk	(revision 1257)
+++ trunk/kBuild/tools/GCC4MACHO.kmk	(revision 1259)
@@ -289,5 +289,5 @@
 		-filelist $(outbase).rsp\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
 endef
 
@@ -315,5 +315,5 @@
 		-filelist $(outbase).rsp\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
 endef
 
@@ -340,5 +340,5 @@
 		-filelist $(outbase).rsp\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
-endef
-
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
+endef
+
Index: trunk/kBuild/tools/GCC64.kmk
===================================================================
--- trunk/kBuild/tools/GCC64.kmk	(revision 1257)
+++ trunk/kBuild/tools/GCC64.kmk	(revision 1259)
@@ -242,5 +242,5 @@
 	$(QUIET)$(TOOL_GCC64_LD) $(flags) -o $(out) $(objs)\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GCC64_LD_MAP,$(outbase).map)
 endef
@@ -269,5 +269,5 @@
 		$(objs)\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GCC64_LD_MAP,$(outbase).map)
 endef
@@ -294,5 +294,5 @@
 	$(QUIET)$(TOOL_GCC64_LD_SYSMOD) $(TOOL_GCC64_LDFLAGS.sysmod) $(flags) -o $(out) $(objs)\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GCC64_LD_SYSMOD_MAP,$(outbase).map)
 endef
Index: trunk/kBuild/tools/GXX.kmk
===================================================================
--- trunk/kBuild/tools/GXX.kmk	(revision 1257)
+++ trunk/kBuild/tools/GXX.kmk	(revision 1259)
@@ -195,5 +195,5 @@
 define TOOL_GXX_LINK_PROGRAM_CMDS
 	$(QUIET)$(TOOL_GXX_LD) $(flags) -o $(out) $(objs) \
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
 endef
 
@@ -217,5 +217,5 @@
 define TOOL_GXX_LINK_DLL_CMDS
 	$(QUIET)$(TOOL_GXX_LD) $(TOOL_GXX_LDFLAGS.dll) $(flags) -o $(out) $(objs) \
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
-endef
-
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
+endef
+
Index: trunk/kBuild/tools/GXX3.kmk
===================================================================
--- trunk/kBuild/tools/GXX3.kmk	(revision 1257)
+++ trunk/kBuild/tools/GXX3.kmk	(revision 1259)
@@ -249,5 +249,5 @@
 		$(filter %.def, $(othersrc))\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GXX3_LD_MAP,$(outbase).map)
 endef
@@ -278,5 +278,5 @@
 		$(filter %.def, $(othersrc))\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GXX3_LD_MAP,$(outbase).map)
 endef
@@ -305,5 +305,5 @@
 		$(filter %.def, $(othersrc))\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GXX3_LD_SYSMOD_MAP,$(outbase).map)
 endef
Index: trunk/kBuild/tools/GXX32.kmk
===================================================================
--- trunk/kBuild/tools/GXX32.kmk	(revision 1257)
+++ trunk/kBuild/tools/GXX32.kmk	(revision 1259)
@@ -254,5 +254,5 @@
 	$(QUIET)$(TOOL_GXX32_LD) $(flags) -o $(out) $(objs)\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GXX32_LD_MAP,$(outbase).map)
 endef
@@ -281,5 +281,5 @@
 		$(objs)\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GXX32_LD_MAP,$(outbase).map)
 endef
@@ -306,5 +306,5 @@
 	$(QUIET)$(TOOL_GXX32_LD_SYSMOD) $(TOOL_GXX32_LDFLAGS.sysmod) $(flags) -o $(out) $(objs)\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GXX32_LD_SYSMOD_MAP,$(outbase).map)
 endef
Index: trunk/kBuild/tools/GXX3OMF.kmk
===================================================================
--- trunk/kBuild/tools/GXX3OMF.kmk	(revision 1257)
+++ trunk/kBuild/tools/GXX3OMF.kmk	(revision 1259)
@@ -238,5 +238,5 @@
 		$(foreach p,$(libpath), -L$(p))\
 		$(othersrc)\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		-Zmap=$(outbase).map
 	$(QUIET)$(TOOL_GXX3OMF_LD) @$(outbase).rsp
@@ -269,5 +269,5 @@
 		$(foreach p,$(libpath), -L$(p))\
 		$(othersrc)\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		-Zmap=$(outbase).map
 	$(TOOL_GXX3OMF_LD) @$(outbase).rsp
@@ -300,5 +300,5 @@
 		$(foreach p,$(libpath), -L$(p))\
 		$(othersrc)\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		-Zmap=$(outbase).map
 	$(QUIET)$(TOOL_GXX3OMF_LD_SYSMOD) @$(outbase).rsp
Index: trunk/kBuild/tools/GXX3PLAIN.kmk
===================================================================
--- trunk/kBuild/tools/GXX3PLAIN.kmk	(revision 1257)
+++ trunk/kBuild/tools/GXX3PLAIN.kmk	(revision 1259)
@@ -245,5 +245,5 @@
 		$(filter %.def, $(othersrc))\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
 endef
 
@@ -273,10 +273,10 @@
 		$(filter %.def, $(othersrc))\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
 endef
 
 
 ## Link system module (windows aka driver, linux aka kernel module)
-# This tool target might not work everywhere, but is provided for the 
+# This tool target might not work everywhere, but is provided for the
 # platforms where it works (Solaris, etc).
 #
@@ -304,5 +304,5 @@
 		$(filter %.def, $(othersrc))\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GXX3PLAIN_LD_SYSMOD_MAP.$(bld_trg),$(outbase).map)
 endef
Index: trunk/kBuild/tools/GXX4MACHO.kmk
===================================================================
--- trunk/kBuild/tools/GXX4MACHO.kmk	(revision 1257)
+++ trunk/kBuild/tools/GXX4MACHO.kmk	(revision 1259)
@@ -289,5 +289,5 @@
 		-filelist $(outbase).rsp\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
 endef
 
@@ -315,5 +315,5 @@
 		-filelist $(outbase).rsp\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
 endef
 
@@ -340,5 +340,5 @@
 		-filelist $(outbase).rsp\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
-endef
-
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
+endef
+
Index: trunk/kBuild/tools/GXX64.kmk
===================================================================
--- trunk/kBuild/tools/GXX64.kmk	(revision 1257)
+++ trunk/kBuild/tools/GXX64.kmk	(revision 1259)
@@ -254,5 +254,5 @@
 	$(QUIET)$(TOOL_GXX64_LD) $(flags) -o $(out) $(objs)\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GXX64_LD_MAP,$(outbase).map)
 endef
@@ -281,5 +281,5 @@
 		$(objs)\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GXX64_LD_MAP,$(outbase).map)
 endef
@@ -306,5 +306,5 @@
 	$(QUIET)$(TOOL_GXX64_LD_SYSMOD) $(TOOL_GXX64_LDFLAGS.sysmod) $(flags) -o $(out) $(objs)\
 		$(foreach p,$(libpath), -L$(p))\
-		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
 		$(call TOOL_GXX64_LD_SYSMOD_MAP,$(outbase).map)
 endef
