VirtualBox

Ignore:
Timestamp:
Nov 10, 2015 12:27:52 PM (9 years ago)
Author:
vboxsync
Message:

bs3kit: Use elf cross compiler on darwin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk

    r58630 r58632  
    5858        echo "cannot use this template for linking"
    5959        exit 1
     60endef
     61
     62# elf cross compiling 64-bit gcc (mac): sudo port install x86_64-elf-gcc
     63TOOL_Bs3Gcc64Elf64 := AMD64/ELF64 gcc/g++ cross compiler for mac.
     64TOOL_Bs3Gcc64Elf64_CC  ?= x86_64-elf-gcc$(HOSTSUFF_EXE) -m64
     65TOOL_Bs3Gcc64Elf64_CXX ?= x86_64-elf-g++$(HOSTSUFF_EXE) -m64
     66ifdef SLKRUNS
     67 TOOL_Bs3Gcc64Elf64_CC  += -fmessage-length=0
     68 TOOL_Bs3Gcc64Elf64_CXX += -fmessage-length=0
     69endif
     70TOOL_Bs3Gcc64Elf64_COBJSUFF         ?= .o
     71TOOL_Bs3Gcc64Elf64_CFLAGS           ?=
     72TOOL_Bs3Gcc64Elf64_CFLAGS.debug     ?= -g
     73TOOL_Bs3Gcc64Elf64_CFLAGS.profile   ?= -O2 #-g -pg
     74TOOL_Bs3Gcc64Elf64_CFLAGS.release   ?= -O2
     75TOOL_Bs3Gcc64Elf64_CINCS            ?=
     76TOOL_Bs3Gcc64Elf64_CDEFS            ?=
     77TOOL_Bs3Gcc64Elf64_COMPILE_C_DEPEND =
     78TOOL_Bs3Gcc64Elf64_COMPILE_C_DEPORD =
     79TOOL_Bs3Gcc64Elf64_COMPILE_C_OUTPUT =
     80define TOOL_Bs3Gcc64Elf64_COMPILE_C_CMDS
     81        $(QUIET)$(TOOL_Bs3Gcc64Elf64_CC) -c\
     82                $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
     83                -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
     84                -o $(obj)\
     85                $(abspath $(source))
     86        $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
     87endef
     88
     89TOOL_Bs3Gcc64Elf64_CXXOBJSUFF       ?= .o
     90TOOL_Bs3Gcc64Elf64_CXXOBJSUFF       ?= .o
     91TOOL_Bs3Gcc64Elf64_CXXFLAGS         ?=
     92TOOL_Bs3Gcc64Elf64_CXXFLAGS.debug   ?= -g0 # no debug info, thank you
     93TOOL_Bs3Gcc64Elf64_CXXFLAGS.profile ?= -O2 #-g -pg
     94TOOL_Bs3Gcc64Elf64_CXXFLAGS.release ?= -O2
     95TOOL_Bs3Gcc64Elf64_CXXINCS          ?=
     96TOOL_Bs3Gcc64Elf64_CXXDEFS          ?=
     97TOOL_Bs3Gcc64Elf64_COMPILE_CXX_DEPEND =
     98TOOL_Bs3Gcc64Elf64_COMPILE_CXX_DEPORD =
     99TOOL_Bs3Gcc64Elf64_COMPILE_CXX_OUTPUT =
     100define TOOL_Bs3Gcc64Elf64_COMPILE_CXX_CMDS
     101        $(QUIET)$(TOOL_Bs3Gcc64Elf64_CXX) -c\
     102                $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
     103                -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
     104                -o $(obj)\
     105                $(abspath $(source))
     106        $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
    60107endef
    61108
     
    162209 TEMPLATE_VBoxBS3KitImg64_CXXFLAGS    = -O1 -Oi -GF -GS- -Gy -Gs65536
    163210else
    164  TEMPLATE_VBoxBS3KitImg64_CTOOL      := $(VBOX_GCC_TOOL)
    165  TEMPLATE_VBoxBS3KitImg64_CXXTOOL    := $(VBOX_GCC_TOOL)
     211 if1of ($(KBUILD_HOST), darwin)
     212  TEMPLATE_VBoxBS3KitImg64_CTOOL     := Bs3Gcc64Elf64
     213  TEMPLATE_VBoxBS3KitImg64_CXXTOOL   := Bs3Gcc64Elf64
     214 else
     215  TEMPLATE_VBoxBS3KitImg64_CTOOL     := $(VBOX_GCC_TOOL)
     216  TEMPLATE_VBoxBS3KitImg64_CXXTOOL   := $(VBOX_GCC_TOOL)
     217 endif
    166218 TEMPLATE_VBoxBS3KitImg64_CFLAGS      = -m64 -maccumulate-outgoing-args -g0 -Os -fno-omit-frame-pointer $(VBOX_GCC_WARN_PEDANTIC_C)
    167219 TEMPLATE_VBoxBS3KitImg64_CXXFLAGS    = -m64 -maccumulate-outgoing-args -g0 -Os -fno-omit-frame-pointer $(VBOX_GCC_WARN_PEDANTIC_CXX)
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