--- VirtualBox-7.0.18/kBuild/tools/GCC3PLAIN.kmk.orig +++ VirtualBox-7.0.18/kBuild/tools/GCC3PLAIN.kmk @@ -95,6 +95,9 @@ TOOL_GCC3PLAIN_LDFLAGS ?= +TOOL_CTFMERGE ?= /opt/onbld/bin/i386/ctfmerge +TOOL_CTFCONVERT ?= /opt/onbld/bin/i386/ctfconvert +TOOL_STRIP ?= /usr/bin/strip ## Compile C source. # @param $(target) Normalized main target name. @@ -126,6 +129,8 @@ $(flags) -fpreprocessed -x c\ -o $(obj)\ - + $(QUIET)cp $(obj) $(obj).ctf + -$(QUIET)$(TOOL_CTFCONVERT) -X -f -l vbox $(obj).ctf && cp $(obj).ctf $(obj) $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" "" endef else # !KBUILD_USE_KOBJCACHE @@ -136,6 +141,8 @@ -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\ -o $(obj)\ $(abspath $(source)) + $(QUIET)cp $(obj) $(obj).ctf + -$(QUIET)$(TOOL_CTFCONVERT) -X -f -l vbox $(obj).ctf && cp $(obj).ctf $(obj) $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" "" endef endif # !KBUILD_USE_KOBJCACHE @@ -170,6 +177,8 @@ $(flags) -fpreprocessed -x c++\ -o $(obj)\ - + $(QUIET)cp $(obj) $(obj).ctf + -$(QUIET)$(TOOL_CTFCONVERT) -X -f -l vbox $(obj).ctf && cp $(obj).ctf $(obj) $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" "" endef else # !KBUILD_USE_KOBJCACHE @@ -180,6 +189,8 @@ -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\ -o $(obj)\ $(abspath $(source)) + $(QUIET)cp $(obj) $(obj).ctf + -$(QUIET)$(TOOL_CTFCONVERT) -X -f -l vbox $(obj).ctf && cp $(obj).ctf $(obj) $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" "" endef endif # !KBUILD_USE_KOBJCACHE @@ -261,6 +272,10 @@ $(filter %.def, $(othersrc))\ $(foreach p,$(libpath), -L$(p))\ $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib))) + $(QUIET)cp $(out) $(out).ctf + -$(QUIET)$(TOOL_CTFMERGE) -m -l vbox -o $(out).ctf $(objs) && \ + cp $(out).ctf $(out) + $(QUIET)$(TOOL_STRIP) -x $(out) endef @@ -320,5 +335,9 @@ $(filter %.def, $(othersrc))\ $(foreach p,$(libpath), -L$(p))\ $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib))) + $(QUIET)cp $(out) $(out).ctf + -$(QUIET)$(TOOL_CTFMERGE) -m -l vbox -o $(out).ctf $(objs) && \ + cp $(out).ctf $(out) + $(QUIET)$(TOOL_STRIP) -x $(out) endef --- VirtualBox-7.0.18/kBuild/tools/GXX3PLAIN.kmk.orig +++ VirtualBox-7.0.18/kBuild/tools/GXX3PLAIN.kmk @@ -103,6 +103,9 @@ TOOL_GXX3PLAIN_LDFLAGS ?= +TOOL_CTFMERGE ?= /opt/onbld/bin/i386/ctfmerge +TOOL_CTFCONVERT ?= /opt/onbld/bin/i386/ctfconvert +TOOL_STRIP ?= /usr/bin/strip ## Compile C source. # @param $(target) Normalized main target name. @@ -141,6 +144,8 @@ -o $(obj)\ $(abspath $(source)) endif + $(QUIET)cp $(obj) $(obj).ctf + -$(QUIET)$(TOOL_CTFCONVERT) -X -f -l vbox $(obj).ctf && cp $(obj).ctf $(obj) $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" "" endef @@ -183,6 +188,8 @@ ,-Winvalid-pch -include $(basename $($(target)_1_GCC_PCH_FILE)),) \ $(abspath $(source)) endif + $(QUIET)cp $(obj) $(obj).ctf + -$(QUIET)$(TOOL_CTFCONVERT) -X -f -l vbox $(obj).ctf && cp $(obj).ctf $(obj) $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" "" endef @@ -289,6 +296,10 @@ $(filter %.def, $(othersrc))\ $(foreach p,$(libpath), -L$(p))\ $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib))) + $(QUIET)cp $(out) $(out).ctf + -$(QUIET)$(TOOL_CTFMERGE) -m -l vbox -o $(out).ctf $(objs) && \ + cp $(out).ctf $(out) + $(QUIET)$(TOOL_STRIP) -x $(out) endef @@ -348,5 +359,9 @@ $(filter %.def, $(othersrc))\ $(foreach p,$(libpath), -L$(p))\ $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib))) + $(QUIET)cp $(out) $(out).ctf + -$(QUIET)$(TOOL_CTFMERGE) -m -l vbox -o $(out).ctf $(objs) && \ + cp $(out).ctf $(out) + $(QUIET)$(TOOL_STRIP) -x $(out) endef