Index: /trunk/kBuild/tools/OPENWATCOM-16.kmk
===================================================================
--- /trunk/kBuild/tools/OPENWATCOM-16.kmk	(revision 2748)
+++ /trunk/kBuild/tools/OPENWATCOM-16.kmk	(revision 2749)
@@ -46,5 +46,5 @@
 TOOL_OPENWATCOM-16_COMPILE_AS_OUTPUT = $(obj).err
 define TOOL_OPENWATCOM-16_COMPILE_AS_CMDS
-	$(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_AS) \
+	$(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_AS) \
 		$(flags) \
 		$(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
@@ -61,5 +61,5 @@
 TOOL_OPENWATCOM-16_COMPILE_C_OUTPUT = $(obj).err
 define TOOL_OPENWATCOM-16_COMPILE_C_CMDS
-	$(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_CC16) \
+	$(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_CC16) \
 		$(flags) \
 		$(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
@@ -76,5 +76,5 @@
 TOOL_OPENWATCOM-16_COMPILE_CXX_OUTPUT = $(obj).err
 define TOOL_OPENWATCOM-16_COMPILE_CXX_CMDS
-	$(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_CXX16) \
+	$(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_CXX16) \
 		$(flags) \
 		$(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
@@ -105,5 +105,5 @@
 define TOOL_OPENWATCOM-16_LINK_LIBRARY_CMDS
 	$(QUIET)$(APPEND) -tn $(outbase).rsp $(foreach obj,$(call TOOL_OPENWATCOM_FIX_SLASHES,$(objs) $(othersrc)),'+"$(obj)"')
-	$(QUIET)$(TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_AR) $(flags) $(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) @$(outbase).rsp
+	$(QUIET)$(TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_AR) $(flags) $(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) @$(outbase).rsp
 endef
 
@@ -113,5 +113,5 @@
 TOOL_OPENWATCOM-16_LINK_PROGRAM_DEPORD =
 define TOOL_OPENWATCOM-16_LINK_PROGRAM_CMDS
-	$(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
+	$(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
 		$(TOOL_OPENWATCOM_LD16) \
 		$(flags) \
@@ -133,5 +133,5 @@
 TOOL_OPENWATCOM-16_LINK_DLL_DEPORD =
 define TOOL_OPENWATCOM-16_LINK_DLL_CMDS
-	$(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
+	$(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
 		$(TOOL_OPENWATCOM_LD16) \
 		$(flags) \
@@ -153,5 +153,5 @@
 TOOL_OPENWATCOM-16_LINK_SYSMOD_DEPORD =
 define TOOL_OPENWATCOM-16_LINK_SYSMOD_CMDS
-	$(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
+	$(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
 		$(TOOL_OPENWATCOM_LD16) \
 		$(flags) \
Index: /trunk/kBuild/tools/OPENWATCOM-WL.kmk
===================================================================
--- /trunk/kBuild/tools/OPENWATCOM-WL.kmk	(revision 2748)
+++ /trunk/kBuild/tools/OPENWATCOM-WL.kmk	(revision 2749)
@@ -55,5 +55,5 @@
         	$(foreach o,$(call TOOL_OPENWATCOM_FIX_SLASHES_SQ,$(filter-out %.res,$(objs)) $(othersrc)),'$(if $(filter %.lib %.a,$l),LIB,)File $o') \
 		$(foreach l,$(call TOOL_OPENWATCOM_FIX_SLASHES_SQ,$(libs)),'Library $l')
-	$(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
+	$(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD) \
 		$(TOOL_OPENWATCOM_WLINK) @$(outbase).rsp
 	$(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
Index: /trunk/kBuild/tools/OPENWATCOM.kmk
===================================================================
--- /trunk/kBuild/tools/OPENWATCOM.kmk	(revision 2748)
+++ /trunk/kBuild/tools/OPENWATCOM.kmk	(revision 2749)
@@ -148,4 +148,11 @@
 endif
 
+if $(KBUILD_KMK_REVISION) >= 2747
+ TOOL_OPENWATCOM_ENV_SETUP_BD ?= $(call TOOL_OPENWATCOM_ENV_SETUP,$1,$2 --wcc-brain-damage)
+else
+ TOOL_OPENWATCOM_ENV_SETUP_BD ?= $(call TOOL_OPENWATCOM_ENV_SETUP,$1,$2)
+endif
+
+
 # Functions for changing slashes (SQ = single quoted).
 if1of ($(KBUILD_HOST), os2 win)
@@ -203,5 +210,5 @@
 TOOL_OPENWATCOM_COMPILE_AS_OUTPUT = $(obj).err
 define TOOL_OPENWATCOM_COMPILE_AS_CMDS
-	$(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_AS) \
+	$(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_AS) \
 		$(flags) \
 		$(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
@@ -219,5 +226,5 @@
 TOOL_OPENWATCOM_COMPILE_C_OUTPUT = $(obj).err
 define TOOL_OPENWATCOM_COMPILE_C_CMDS
-	$(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_CC) \
+	$(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_CC) \
 		$(flags) \
 		$(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
@@ -234,5 +241,5 @@
 TOOL_OPENWATCOM_COMPILE_CXX_OUTPUT = $(obj).err
 define TOOL_OPENWATCOM_COMPILE_CXX_CMDS
-	$(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_CXX) \
+	$(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_CXX) \
 		$(flags) \
 		$(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
@@ -273,5 +280,5 @@
                --append $(outbase).rsp \
 	)
-	$(QUIET)$(TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_AR) $(flags) $(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) @$(outbase).rsp
+	$(QUIET)$(TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_AR) $(flags) $(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) @$(outbase).rsp
 endef
 
@@ -280,5 +287,5 @@
 TOOL_OPENWATCOM_LINK_PROGRAM_DEPORD =
 define TOOL_OPENWATCOM_LINK_PROGRAM_CMDS
-	$(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
+	$(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
 		$(TOOL_OPENWATCOM_LD) \
 		$(flags) \
@@ -299,5 +306,5 @@
 TOOL_OPENWATCOM_LINK_DLL_DEPORD =
 define TOOL_OPENWATCOM_LINK_DLL_CMDS
-	$(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
+	$(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
 		$(TOOL_OPENWATCOM_LD) \
 		$(flags) \
@@ -318,5 +325,5 @@
 TOOL_OPENWATCOM_LINK_SYSMOD_DEPORD =
 define TOOL_OPENWATCOM_LINK_SYSMOD_CMDS
-	$(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
+	$(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
 		$(TOOL_OPENWATCOM_LD) \
 		$(flags) \
Index: /trunk/kBuild/tools/WATCOMC11C-16.kmk
===================================================================
--- /trunk/kBuild/tools/WATCOMC11C-16.kmk	(revision 2748)
+++ /trunk/kBuild/tools/WATCOMC11C-16.kmk	(revision 2749)
@@ -45,5 +45,5 @@
 TOOL_WATCOMC11C-16_COMPILE_C_OUTPUT = $(obj).err
 define TOOL_WATCOMC11C-16_COMPILE_C_CMDS
-	$(QUIET) $(call TOOL_WATCOMC11C_ENV_SETUP) $(TOOL_WATCOMC11C_CC16) \
+	$(QUIET) $(call TOOL_WATCOMC11C_ENV_SETUP_BD) $(TOOL_WATCOMC11C_CC16) \
 		$(flags) \
 		$(addsuffix , $(addprefix -i=, $(subst /,\\,$(incs)))) \
@@ -60,5 +60,5 @@
 TOOL_WATCOMC11C-16_COMPILE_CXX_OUTPUT = $(obj).err
 define TOOL_WATCOMC11C-16_COMPILE_CXX_CMDS
-	$(QUIET) $(call TOOL_WATCOMC11C_ENV_SETUP) $(TOOL_WATCOMC11C_CXX16) \
+	$(QUIET) $(call TOOL_WATCOMC11C_ENV_SETUP_BD) $(TOOL_WATCOMC11C_CXX16) \
 		$(flags) \
 		$(addsuffix , $(addprefix -i=, $(subst /,\\,$(incs)))) \
@@ -89,5 +89,5 @@
 define TOOL_WATCOMC11C-16_LINK_LIBRARY_CMDS
 	$(QUIET)$(APPEND) -tn $(outbase).rsp $(foreach obj,$(subst /,\,$(objs) $(othersrc)),'+"$(obj)"')
-	$(QUIET)$(TOOL_WATCOMC11C_ENV_SETUP) $(TOOL_WATCOMC11C_AR) $(flags) $(subst /,\\,$(out)) @$(outbase).rsp
+	$(QUIET)$(TOOL_WATCOMC11C_ENV_SETUP_BD) $(TOOL_WATCOMC11C_AR) $(flags) $(subst /,\\,$(out)) @$(outbase).rsp
 endef
 
@@ -96,5 +96,5 @@
 TOOL_WATCOMC11C-16_LINK_PROGRAM_DEPORD =
 define TOOL_WATCOMC11C-16_LINK_PROGRAM_CMDS
-	$(QUIET)$(call TOOL_WATCOMC11C_ENV_SETUP,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
+	$(QUIET)$(call TOOL_WATCOMC11C_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
 		$(TOOL_WATCOMC11C_LD16) \
 		$(flags) \
@@ -115,5 +115,5 @@
 TOOL_WATCOMC11C-16_LINK_DLL_DEPORD =
 define TOOL_WATCOMC11C-16_LINK_DLL_CMDS
-	$(QUIET)$(call TOOL_WATCOMC11C_ENV_SETUP,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
+	$(QUIET)$(call TOOL_WATCOMC11C_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
 		$(TOOL_WATCOMC11C_LD16) \
 		$(flags) \
@@ -134,5 +134,5 @@
 TOOL_WATCOMC11C-16_LINK_SYSMOD_DEPORD =
 define TOOL_WATCOMC11C-16_LINK_SYSMOD_CMDS
-	$(QUIET)$(call TOOL_WATCOMC11C_ENV_SETUP,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
+	$(QUIET)$(call TOOL_WATCOMC11C_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
 		$(TOOL_WATCOMC11C_LD16) \
 		$(flags) \
Index: /trunk/kBuild/tools/WATCOMC11C-WL.kmk
===================================================================
--- /trunk/kBuild/tools/WATCOMC11C-WL.kmk	(revision 2748)
+++ /trunk/kBuild/tools/WATCOMC11C-WL.kmk	(revision 2749)
@@ -54,5 +54,5 @@
         $(foreach o,$(subst /,\,$(filter-out %.res,$(objs)) $(othersrc)),'$(if $(filter %.lib %.a,$l),LIB,)File $o') \
 		$(foreach l,$(subst /,\,$(libs)),'Library $l')
-	$(QUIET)$(call TOOL_WATCOMC11C_ENV_SETUP) \
+	$(QUIET)$(call TOOL_WATCOMC11C_ENV_SETUP_BD) \
 		$(TOOL_WATCOMC11C_WLINK) @$(outbase).rsp
 	$(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_WATCOMC11C_ENV_SETUP) \
Index: /trunk/kBuild/tools/WATCOMC11C.kmk
===================================================================
--- /trunk/kBuild/tools/WATCOMC11C.kmk	(revision 2748)
+++ /trunk/kBuild/tools/WATCOMC11C.kmk	(revision 2749)
@@ -114,4 +114,11 @@
 endif
 
+if $(KBUILD_KMK_REVISION) >= 2747
+ TOOL_WATCOMC11C_ENV_SETUP_BD ?= $(call TOOL_WATCOMC11C_ENV_SETUP,$1,$2 --wcc-brain-damage)
+else
+ TOOL_WATCOMC11C_ENV_SETUP_BD ?= $(call TOOL_WATCOMC11C_ENV_SETUP,$1,$2)
+endif
+
+
 # General Properties used by kBuild
 TOOL_WATCOMC11C_COBJSUFF         ?= .obj
@@ -152,5 +159,5 @@
 TOOL_WATCOMC11C_COMPILE_C_OUTPUT = $(obj).err
 define TOOL_WATCOMC11C_COMPILE_C_CMDS
-	$(QUIET) $(call TOOL_WATCOMC11C_ENV_SETUP) $(TOOL_WATCOMC11C_CC) \
+	$(QUIET) $(call TOOL_WATCOMC11C_ENV_SETUP_BD) $(TOOL_WATCOMC11C_CC) \
 		$(flags) \
 		$(addsuffix , $(addprefix -i=, $(subst /,\\,$(incs)))) \
@@ -167,5 +174,5 @@
 TOOL_WATCOMC11C_COMPILE_CXX_OUTPUT = $(obj).err
 define TOOL_WATCOMC11C_COMPILE_CXX_CMDS
-	$(QUIET) $(call TOOL_WATCOMC11C_ENV_SETUP) $(TOOL_WATCOMC11C_CXX) \
+	$(QUIET) $(call TOOL_WATCOMC11C_ENV_SETUP_BD) $(TOOL_WATCOMC11C_CXX) \
 		$(flags) \
 		$(addsuffix , $(addprefix -i=, $(subst /,\\,$(incs)))) \
@@ -196,5 +203,5 @@
 define TOOL_WATCOMC11C_LINK_LIBRARY_CMDS
 	$(QUIET)$(APPEND) -tn $(outbase).rsp $(foreach obj,$(subst /,\,$(objs) $(othersrc)),'+"$(obj)"')
-	$(QUIET)$(TOOL_WATCOMC11C_ENV_SETUP) $(TOOL_WATCOMC11C_AR) $(flags) $(subst /,\\,$(out)) @$(outbase).rsp
+	$(QUIET)$(TOOL_WATCOMC11C_ENV_SETUP_BD) $(TOOL_WATCOMC11C_AR) $(flags) $(subst /,\\,$(out)) @$(outbase).rsp
 endef
 
@@ -203,5 +210,5 @@
 TOOL_WATCOMC11C_LINK_PROGRAM_DEPORD =
 define TOOL_WATCOMC11C_LINK_PROGRAM_CMDS
-	$(QUIET)$(call TOOL_WATCOMC11C_ENV_SETUP,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
+	$(QUIET)$(call TOOL_WATCOMC11C_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
 		$(TOOL_WATCOMC11C_LD) \
 		$(flags) \
@@ -222,5 +229,5 @@
 TOOL_WATCOMC11C_LINK_DLL_DEPORD =
 define TOOL_WATCOMC11C_LINK_DLL_CMDS
-	$(QUIET)$(call TOOL_WATCOMC11C_ENV_SETUP,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
+	$(QUIET)$(call TOOL_WATCOMC11C_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
 		$(TOOL_WATCOMC11C_LD) \
 		$(flags) \
@@ -241,5 +248,5 @@
 TOOL_WATCOMC11C_LINK_SYSMOD_DEPORD =
 define TOOL_WATCOMC11C_LINK_SYSMOD_CMDS
-	$(QUIET)$(call TOOL_WATCOMC11C_ENV_SETUP,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
+	$(QUIET)$(call TOOL_WATCOMC11C_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
 		$(TOOL_WATCOMC11C_LD) \
 		$(flags) \
