VirtualBox

Changeset 100474 in vbox for trunk/tools


Ignore:
Timestamp:
Jul 10, 2023 3:58:55 PM (17 months ago)
Author:
vboxsync
Message:

tools: Add gcc cross compile toolchains for baremetal arm and arm64 in order to build UEFI images for arm on linux.amd64, bugref:10400 [scm fix]

Location:
trunk/tools/kBuildTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/kBuildTools/VBoxXGccArm64Elf.kmk

    r100472 r100474  
    134134TOOL_VBoxXGccArm64Elf_COMPILE_C_USES_KOBJCACHE = $(if-expr "$(use_objcache)" != "",1,)
    135135define TOOL_VBoxXGccArm64Elf_COMPILE_C_CMDS
    136 if "$(use_objcache)" != ""
     136 if "$(use_objcache)" != ""
    137137        $(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\
    138138                --kObjCache-cpp $(outbase).i\
     
    146146                -o $(obj)\
    147147                -
    148 else
     148 else
    149149        $(QUIET)$(TOOL_VBoxXGccArm64Elf_CC) -c\
    150150                $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
     
    152152                -o $(obj)\
    153153                $(abspath $(source))
    154 endif
     154 endif
    155155        $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
    156156endef
     
    174174TOOL_VBoxXGccArm64Elf_COMPILE_CXX_USES_KOBJCACHE = $(if-expr "$(use_objcache)" != "",1,)
    175175define TOOL_VBoxXGccArm64Elf_COMPILE_CXX_CMDS
    176 if "$(use_objcache)" != ""
     176 if "$(use_objcache)" != ""
    177177        $(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\
    178178                --kObjCache-cpp $(outbase).ii\
     
    187187                -o $(obj)\
    188188                -
    189 else
     189 else
    190190        $(QUIET)$(TOOL_VBoxXGccArm64Elf_CXX) -c\
    191191                $(flags) $(qaddprefix sh,-I, $($(target)_1_GCC_PCH_DIR) $(incs)) $(qaddprefix sh,-D, $(defs))\
     
    194194                ,-Winvalid-pch -include $(basename $($(target)_1_GCC_PCH_FILE)),) \
    195195                $(abspath $(source))
    196 endif
     196 endif
    197197        $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
    198198endef
     
    295295TOOL_VBoxXGccArm64Elf_LINK_PROGRAM_OUTPUT_DEBUG = $(outbase).debug
    296296TOOL_VBoxXGccArm64Elf_LINK_PROGRAM_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
    297 TOOL_VBoxXGccArm64Elf_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
    298                 $(filter %.def, $(othersrc))
     297TOOL_VBoxXGccArm64Elf_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) \
     298        $(filter %.def, $(othersrc))
    299299TOOL_VBoxXGccArm64Elf_LINK_PROGRAM_DEPORD =
    300300define TOOL_VBoxXGccArm64Elf_LINK_PROGRAM_CMDS
     
    302302                $(filter %.def, $(othersrc))\
    303303                $(foreach p,$(libpath), -L$(p))\
    304                 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
     304                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib))) \
    305305                $(call TOOL_VBoxXGccArm64Elf_LD_MAP,$(outbase).map)
    306306 ifeq ($(ld_debug),split)
     
    329329TOOL_VBoxXGccArm64Elf_LINK_DLL_OUTPUT_DEBUG = $(outbase).debug
    330330TOOL_VBoxXGccArm64Elf_LINK_DLL_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
    331 TOOL_VBoxXGccArm64Elf_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
    332                 $(filter %.def, $(othersrc))
     331TOOL_VBoxXGccArm64Elf_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) \
     332        $(filter %.def, $(othersrc))
    333333TOOL_VBoxXGccArm64Elf_LINK_DLL_DEPORD =
    334334define TOOL_VBoxXGccArm64Elf_LINK_DLL_CMDS
     
    338338                $(filter %.def, $(othersrc))\
    339339                $(foreach p,$(libpath), -L$(p))\
    340                 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
     340                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib))) \
    341341                $(call TOOL_VBoxXGccArm64Elf_LD_MAP,$(outbase).map)
    342342 ifeq ($(ld_debug),split)
     
    365365TOOL_VBoxXGccArm64Elf_LINK_SYSMOD_OUTPUT_DEBUG = $(outbase).debug
    366366TOOL_VBoxXGccArm64Elf_LINK_SYSMOD_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
    367 TOOL_VBoxXGccArm64Elf_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
    368                 $(filter %.def, $(othersrc))
     367TOOL_VBoxXGccArm64Elf_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) \
     368        $(filter %.def, $(othersrc))
    369369TOOL_VBoxXGccArm64Elf_LINK_SYSMOD_DEPORD =
    370370define TOOL_VBoxXGccArm64Elf_LINK_SYSMOD_CMDS
    371         $(QUIET)$(TOOL_VBoxXGccArm64Elf_LD_SYSMOD) $(TOOL_VBoxXGccArm64Elf_LDFLAGS.sysmod) $(flags) -o $(out) $(filter-out %.h.gch,$(objs))\
     371        $(QUIET)$(TOOL_VBoxXGccArm64Elf_LD_SYSMOD) $(TOOL_VBoxXGccArm64Elf_LDFLAGS.sysmod) $(flags) -o $(out) $(filter-out %.h.gch,$(objs)) \
    372372                $(filter %.def, $(othersrc))\
    373373                $(foreach p,$(libpath), -L$(p))\
  • trunk/tools/kBuildTools/VBoxXGccArmNoneEabi.kmk

    r100472 r100474  
    134134TOOL_VBoxXGccArmNoneEabi_COMPILE_C_USES_KOBJCACHE = $(if-expr "$(use_objcache)" != "",1,)
    135135define TOOL_VBoxXGccArmNoneEabi_COMPILE_C_CMDS
    136 if "$(use_objcache)" != ""
     136 if "$(use_objcache)" != ""
    137137        $(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\
    138138                --kObjCache-cpp $(outbase).i\
     
    146146                -o $(obj)\
    147147                -
    148 else
     148 else
    149149        $(QUIET)$(TOOL_VBoxXGccArmNoneEabi_CC) -c\
    150150                $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
     
    152152                -o $(obj)\
    153153                $(abspath $(source))
    154 endif
     154 endif
    155155        $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
    156156endef
     
    174174TOOL_VBoxXGccArmNoneEabi_COMPILE_CXX_USES_KOBJCACHE = $(if-expr "$(use_objcache)" != "",1,)
    175175define TOOL_VBoxXGccArmNoneEabi_COMPILE_CXX_CMDS
    176 if "$(use_objcache)" != ""
     176 if "$(use_objcache)" != ""
    177177        $(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\
    178178                --kObjCache-cpp $(outbase).ii\
     
    187187                -o $(obj)\
    188188                -
    189 else
     189 else
    190190        $(QUIET)$(TOOL_VBoxXGccArmNoneEabi_CXX) -c\
    191191                $(flags) $(qaddprefix sh,-I, $($(target)_1_GCC_PCH_DIR) $(incs)) $(qaddprefix sh,-D, $(defs))\
     
    194194                ,-Winvalid-pch -include $(basename $($(target)_1_GCC_PCH_FILE)),) \
    195195                $(abspath $(source))
    196 endif
     196 endif
    197197        $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
    198198endef
     
    270270                $(foreach o,$(filter-out %.def %.imp %.dll,$(othersrc)), 'ADDLIB $(o)')
    271271        $(if $(filter %.def %.imp %.dll,$(othersrc))\
    272                 ,$(TOOL_VBoxXGccArmNoneEabi_AR_IMP) -o $(outbase).imp.a $(filter %.def %.imp %.dll,$(othersrc))\
     272                ,$(TOOL_VBoxXGccArmNoneEabi_AR_IMP) -o $(outbase).imp.a $(filter %.def %.imp %.dll,$(othersrc)) \
    273273                 $(NL)$(TAB)$(QUIET)$(APPEND) $(out).ar-script 'ADDLIB $(outbase).imp.a')
    274274        $(QUIET)$(APPEND) $(out).ar-script 'SAVE'
     
    295295TOOL_VBoxXGccArmNoneEabi_LINK_PROGRAM_OUTPUT_DEBUG = $(outbase).debug
    296296TOOL_VBoxXGccArmNoneEabi_LINK_PROGRAM_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
    297 TOOL_VBoxXGccArmNoneEabi_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
    298                 $(filter %.def, $(othersrc))
     297TOOL_VBoxXGccArmNoneEabi_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) \
     298        $(filter %.def, $(othersrc))
    299299TOOL_VBoxXGccArmNoneEabi_LINK_PROGRAM_DEPORD =
    300300define TOOL_VBoxXGccArmNoneEabi_LINK_PROGRAM_CMDS
     
    302302                $(filter %.def, $(othersrc))\
    303303                $(foreach p,$(libpath), -L$(p))\
    304                 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
     304                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib))) \
    305305                $(call TOOL_VBoxXGccArmNoneEabi_LD_MAP,$(outbase).map)
    306306 ifeq ($(ld_debug),split)
     
    329329TOOL_VBoxXGccArmNoneEabi_LINK_DLL_OUTPUT_DEBUG = $(outbase).debug
    330330TOOL_VBoxXGccArmNoneEabi_LINK_DLL_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
    331 TOOL_VBoxXGccArmNoneEabi_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
    332                 $(filter %.def, $(othersrc))
     331TOOL_VBoxXGccArmNoneEabi_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) \
     332        $(filter %.def, $(othersrc))
    333333TOOL_VBoxXGccArmNoneEabi_LINK_DLL_DEPORD =
    334334define TOOL_VBoxXGccArmNoneEabi_LINK_DLL_CMDS
    335335        $(QUIET)$(TOOL_VBoxXGccArmNoneEabi_LD) $(TOOL_VBoxXGccArmNoneEabi_LDFLAGS.dll) $(flags) -o $(out)\
    336                 $(if $(filter-out win os2, $(KBUILD_TARGET)),$(call TOOL_VBoxXGccArmNoneEabi_LD_SONAME,$(target),$(out)))\
     336                $(if $(filter-out win os2, $(KBUILD_TARGET)),$(call TOOL_VBoxXGccArmNoneEabi_LD_SONAME,$(target),$(out))) \
    337337                $(filter-out %.h.gch,$(objs))\
    338338                $(filter %.def, $(othersrc))\
    339339                $(foreach p,$(libpath), -L$(p))\
    340                 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
     340                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib))) \
    341341                $(call TOOL_VBoxXGccArmNoneEabi_LD_MAP,$(outbase).map)
    342342 ifeq ($(ld_debug),split)
     
    365365TOOL_VBoxXGccArmNoneEabi_LINK_SYSMOD_OUTPUT_DEBUG = $(outbase).debug
    366366TOOL_VBoxXGccArmNoneEabi_LINK_SYSMOD_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
    367 TOOL_VBoxXGccArmNoneEabi_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
    368                 $(filter %.def, $(othersrc))
     367TOOL_VBoxXGccArmNoneEabi_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) \
     368        $(filter %.def, $(othersrc))
    369369TOOL_VBoxXGccArmNoneEabi_LINK_SYSMOD_DEPORD =
    370370define TOOL_VBoxXGccArmNoneEabi_LINK_SYSMOD_CMDS
    371         $(QUIET)$(TOOL_VBoxXGccArmNoneEabi_LD_SYSMOD) $(TOOL_VBoxXGccArmNoneEabi_LDFLAGS.sysmod) $(flags) -o $(out) $(filter-out %.h.gch,$(objs))\
     371        $(QUIET)$(TOOL_VBoxXGccArmNoneEabi_LD_SYSMOD) $(TOOL_VBoxXGccArmNoneEabi_LDFLAGS.sysmod) $(flags) -o $(out) $(filter-out %.h.gch,$(objs)) \
    372372                $(filter %.def, $(othersrc))\
    373373                $(foreach p,$(libpath), -L$(p))\
    374                 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
     374                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib))) \
    375375                $(call TOOL_VBoxXGccArmNoneEabi_LD_SYSMOD_MAP,$(outbase).map)
    376376 ifeq ($(ld_debug),split)
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