VirtualBox

Changeset 2535 in kBuild


Ignore:
Timestamp:
Aug 2, 2011 7:05:34 PM (13 years ago)
Author:
bird
Message:

footer-pass2-compiling-targets.kmk,G??4MACHO.kmk: debug info splitting fixes (mac related + generic).

Location:
trunk/kBuild
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/footer-pass2-compiling-targets.kmk

    r2531 r2535  
    390390# @param    debug_dir           The directory name.
    391391define def_link_install_debug_dir_rule
    392 local dir := $(debug_inst_path)/$(debug_inst)$(debug_dir)
     392local dir := $(debug_inst_path)/$(debug_inst2)$(debug_dir)
    393393$$(call KB_FN_ASSERT_ABSPATH,dir)
    394394$$(dir): | $$$$(dir $$$$(patsubst %/,%,$$$$@))
     
    402402# @param    debug_file          Src=>Dst file pair.
    403403define def_link_install_debug_file_rule
    404 local dst := $(debug_inst_path)/$(debug_inst)$(word 2, $(subst =>,$(SP),$(debug_file)))
     404local dst := $(debug_inst_path)/$(debug_inst2)$(word 2, $(subst =>,$(SP),$(debug_file)))
    405405$$(call KB_FN_ASSERT_ABSPATH,dst)
    406406local src := $(word 1, $(subst =>,$(SP),$(debug_file)))
    407407$$(call KB_FN_ASSERT_ABSPATH,src)
    408408$$(dst): $$(src) | $$$$(dir $$$$@)
    409         %$$(call MSG_INST_FILE,$$@,$$<)
     409        %$$(call MSG_INST_FILE,$$<,$$@)
    410410        $$(QUIET)$(debug_install_cmd) $(if $(mode),-m $(mode)) $(if $(uid),-o $(uid)) $(if $(gid),-g $(gid)) -- $$< $$@
    411411$(target)_2_DEBUG_$(debug_var)_TARGET_FILES += $$(dst)
     
    418418if "$(substr $(debug_inst),-1,1)" == "/"
    419419 if "$(debug_inst)" == "./"
    420   local debug_inst :=
     420  local debug_inst2 :=
     421 else
     422  local debug_inst2 := $(debug_inst)
    421423 endif
    422424 local debug_dirs  := $(patsubst $($(target)_0_OUTDIR)/%,%,$($(target)_2_OUTPUT_DEBUG_DIRS))
     
    427429                        ,$($(target)_0_OUTDIR)/$(file)=>$(file))
    428430else
    429  local debug_files := $(call TOOL_$(tool)_$(tool_do)_DEBUG_INSTALL_FN,$(out),$(outbase),$(debug_inst))
     431 local debug_notdir:= $(notdir $(debug_inst))
     432 local debug_inst2 := $(dir $(debug_inst))
     433 local debug_files := $(call TOOL_$(tool)_$(tool_do)_DEBUG_INSTALL_FN,$(out),$(outbase),$(debug_notdir))
    430434 local debug_dirs  := $(filter     %/,$(debug_files))
    431435 local debug_files := $(filter-out %/,$(debug_files))
  • trunk/kBuild/tools/GCC4MACHO.kmk

    r2523 r2535  
    106106TOOL_GCC4MACHO_LDFLAGS.profile  ?= -g
    107107
     108TOOL_GCC4MACHO_STRIP_PROGRAM    ?= strip -SXxru
     109TOOL_GCC4MACHO_STRIP_DLL        ?= strip -Sxru
     110TOOL_GCC4MACHO_STRIP_SYSMOD     ?= strip -Sru
     111
    108112
    109113##
    110114# Calculate the files in the debug bundle.
    111115# @param    1           The whole output filename.
    112 # @param    2           The output filename sans suffix. 
     116# @param    2           The output filename sans suffix.
    113117TOOL_GCC4MACHO_DEBUG_BUNDLE_FN = \
    114118    $(1).dSYM/ \
     
    122126# Calculate the files in the debug bundle.
    123127# @param    1           The whole linker output filename.
    124 # @param    2           The linker output filename sans suffix. 
     128# @param    2           The linker output filename sans suffix.
    125129# @param    3           The desired install name (no dir slash).
     130# @remarks  The Info.plist has some reference to the original name, but gdb
     131#           does not care and only check for a symbol file in the DWARF
     132#           directory with the same name as the debugged module.
    126133TOOL_GCC4MACHO_DEBUG_INSTALL_FN= \
    127134    $(3).dSYM/ \
     
    130137    $(3).dSYM/Contents/Resources/DWARF/ \
    131138    $(1).dSYM/Contents/Info.plist=>$(3).dSYM/Contents/Info.plist \
    132     $(1).dSYM/Contents/Resources/DWARF/$(notdir $(1))=>$(3).dSYM/Contents/Resources/DWARF/$(notdir $(1))
     139    $(1).dSYM/Contents/Resources/DWARF/$(notdir $(1))=>$(3).dSYM/Contents/Resources/DWARF/$(notdir $(3))
    133140
    134141
     
    388395                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
    389396 ifeq ($(ld_debug),split)
    390         $(QUIET)$(TOOL_GCC4MACHO_DSYMUTIL) --verbose -o $(out).dSYM/ $(out)
     397        $(QUIET)$(TOOL_GCC4MACHO_DSYMUTIL) -o $(out).dSYM/ $(out)
     398        $(QUIET)$(TOOL_GCC4MACHO_STRIP_PROGRAM) $(out)
    391399 endif
    392400endef
     
    420428                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
    421429 ifeq ($(ld_debug),split)
    422         $(QUIET)$(TOOL_GCC4MACHO_DSYMUTIL) --verbose -o $(out).dSYM/ $(out)
     430        $(QUIET)$(TOOL_GCC4MACHO_DSYMUTIL) -o $(out).dSYM/ $(out)
     431        $(QUIET)$(TOOL_GCC4MACHO_STRIP_DLL) $(out)
    423432 endif
    424433endef
     
    450459                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
    451460 ifeq ($(ld_debug),split)
    452         $(QUIET)$(TOOL_GCC4MACHO_DSYMUTIL) --verbose -o $(out).dSYM/ $(out)
     461        $(QUIET)$(TOOL_GCC4MACHO_DSYMUTIL) -o $(out).dSYM/ $(out)
     462        $(QUIET)$(TOOL_GCC4MACHO_STRIP_SYSMOD) $(out)
    453463 endif
    454464endef
  • trunk/kBuild/tools/GXX4MACHO.kmk

    r2527 r2535  
    106106TOOL_GXX4MACHO_LDFLAGS.profile  ?= -g
    107107
     108TOOL_GXX4MACHO_STRIP_PROGRAM    ?= strip -SXxru
     109TOOL_GXX4MACHO_STRIP_DLL        ?= strip -Sxru
     110TOOL_GXX4MACHO_STRIP_SYSMOD     ?= strip -Sru
     111
    108112
    109113##
     
    124128# @param    2           The linker output filename sans suffix.
    125129# @param    3           The desired install name (no dir slash).
     130# @remarks  The Info.plist has some reference to the original name, but gdb
     131#           does not care and only check for a symbol file in the DWARF
     132#           directory with the same name as the debugged module.
    126133TOOL_GXX4MACHO_DEBUG_INSTALL_FN= \
    127134    $(3).dSYM/ \
     
    130137    $(3).dSYM/Contents/Resources/DWARF/ \
    131138    $(1).dSYM/Contents/Info.plist=>$(3).dSYM/Contents/Info.plist \
    132     $(1).dSYM/Contents/Resources/DWARF/$(notdir $(1))=>$(3).dSYM/Contents/Resources/DWARF/$(notdir $(1))
     139    $(1).dSYM/Contents/Resources/DWARF/$(notdir $(1))=>$(3).dSYM/Contents/Resources/DWARF/$(notdir $(3))
    133140
    134141
     
    388395                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
    389396 ifeq ($(ld_debug),split)
    390         $(QUIET)$(TOOL_GXX4MACHO_DSYMUTIL) --verbose -o $(out).dSYM/ $(out)
     397        $(QUIET)$(TOOL_GXX4MACHO_DSYMUTIL) -o $(out).dSYM/ $(out)
     398        $(QUIET)$(TOOL_GXX4MACHO_STRIP_PROGRAM) $(out)
    391399 endif
    392400endef
     
    419427                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
    420428 ifeq ($(ld_debug),split)
    421         $(QUIET)$(TOOL_GXX4MACHO_DSYMUTIL) --verbose -o $(out).dSYM/ $(out)
     429        $(QUIET)$(TOOL_GXX4MACHO_DSYMUTIL) -o $(out).dSYM/ $(out)
     430        $(QUIET)$(TOOL_GXX4MACHO_STRIP_DLL) $(out)
    422431 endif
    423432endef
     
    449458                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
    450459 ifeq ($(ld_debug),split)
    451         $(QUIET)$(TOOL_GXX4MACHO_DSYMUTIL) --verbose -o $(out).dSYM/ $(out)
     460        $(QUIET)$(TOOL_GXX4MACHO_DSYMUTIL) -o $(out).dSYM/ $(out)
     461        $(QUIET)$(TOOL_GXX4MACHO_STRIP_SYSMOD) $(out)
    452462 endif
    453463endef
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