VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/bootsectors/Config.kmk@ 60422

Last change on this file since 60422 was 60319, checked in by vboxsync, 9 years ago

bs3kit: 386 and 486 fixes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 30.3 KB
Line 
1# $Id: Config.kmk 60319 2016-04-04 22:02:21Z vboxsync $
2## @file
3# kBuild Configuration file for VirtualBox Boot Sector Kit 3.
4#
5
6#
7# Copyright (C) 2010-2016 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17# The contents of this file may alternatively be used under the terms
18# of the Common Development and Distribution License Version 1.0
19# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20# VirtualBox OSE distribution, in which case the provisions of the
21# CDDL are applicable instead of those of the GPL.
22#
23# You may elect to license modified versions of this file under the
24# terms and conditions of either the GPL or the CDDL or both.
25#
26
27VBOX_BOOTSECTORS_CONFIG_KMK_INCLUDED = 1
28
29# Include the parent configure file.
30ifndef VBOX_VALIDATIONKIT_CONFIG_KMK_INCLUDED
31 include $(PATH_ROOT)/src/VBox/ValidationKit/Config.kmk
32endif
33
34# Add our 32-bit and 64-bit C properties.
35KBUILD_COMPILE_CATEGTORIES += C32 C64
36PROPS_TOOLS += C32TOOL C64TOOL
37PROPS_SINGLE += C32TOOL C64TOOL C32OBJSUFF C64OBJSUFF
38PROPS_ACCUMULATE_R += C32FLAGS C64FLAGS C32DEFS C64DEFS
39PROPS_ACCUMULATE_L += C32INCS C64INCS
40
41if 0 # Adding as few as possible new properties.
42KBUILD_COMPILE_CATEGTORIES += C16
43PROPS_TOOLS += C16TOOL
44PROPS_SINGLE += C16TOOL C16OBJSUFF
45PROPS_ACCUMULATE_R += C16FLAGS C16DEFS
46PROPS_ACCUMULATE_L += C16INCS
47endif
48
49# Add noarch to the architectures list (will be there by default in a new kBuild).
50KBUILD_ARCHES += noarch
51
52
53# The bs3kit source directory.
54VBOX_PATH_BS3KIT_SRC = $(VBOX_PATH_VALIDATIONKIT_SRC)/bootsectors/bs3kit
55
56# Dummy CP "linker" tool.
57TOOL_VBoxBsCpLd = Dummy copy linker.
58TOOL_VBoxBsCpLd_LINK_MISCBIN_OUTPUT =
59TOOL_VBoxBsCpLd_LINK_MISCBIN_DEPEND =
60TOOL_VBoxBsCpLd_LINK_MISCBIN_DEPORD =
61define TOOL_VBoxBsCpLd_LINK_MISCBIN_CMDS
62 $(CP) -- $(objs) $(othersrc) "$(out)"
63endef
64
65# Dummy exit 1 "linker" tool.
66TOOL_VBoxBsUnusedLd = Dummy unused linker.
67TOOL_VBoxBsUnusedLd_LINK_MISCBIN_OUTPUT =
68TOOL_VBoxBsUnusedLd_LINK_MISCBIN_DEPEND =
69TOOL_VBoxBsUnusedLd_LINK_MISCBIN_DEPORD =
70define TOOL_VBoxBsUnusedLd_LINK_MISCBIN_CMDS
71 echo "cannot use this template for linking"
72 exit 1
73endef
74
75# NASM tool with dependency workarounds (change dir to force consistent results; add -MP).
76# Requires http://permalink.gmane.org/gmane.comp.lang.nasm.devel/3704 to work.
77include $(KBUILD_PATH)/tools/NASM.kmk
78TOOL_VBoxNasm = Our version of the NASM tool
79ifndef TOOL_VBoxNasm_PATH
80 TOOL_VBoxNasm_PATH := $(firstword $(rsort $(wildcard $(KBUILD_DEVTOOLS_HST)/nasm/v*.*)))
81 if "$(TOOL_VBoxNasm_PATH)" == "" && "$(KBUILD_DEVTOOLS_HST_ALT)" != ""
82 TOOL_VBoxNasm_PATH := $(firstword $(rsort $(wildcard $(KBUILD_DEVTOOLS_HST_ALT)/nasm/v*.*)))
83 endif
84endif
85ifneq ($(TOOL_VBoxNasm_PATH),)
86 TOOL_VBoxNasm_AS ?= $(TOOL_VBoxNasm_PATH)/nasm$(HOSTSUFF_EXE)
87else
88 TOOL_VBoxNasm_AS ?= nasm$(HOSTSUFF_EXE)
89endif
90TOOL_VBoxNasm_ASFLAGS ?= $(TOOL_NASM_ASFLAGS)
91TOOL_VBoxNasm_COMPILE_AS_OUTPUT = $(outbase).lst
92TOOL_VBoxNasm_COMPILE_AS_DEPEND = $(VBoxBs3ObjConverter_1_TARGET)
93TOOL_VBoxNasm_COMPILE_AS_DEPORD =
94define TOOL_VBoxNasm_COMPILE_AS_CMDS
95 $(QUIET)$(REDIRECT) -C $(PATH_OUT_BASE) -- $(TOOL_VBoxNasm_AS)\
96 $(flags) $(addsuffix /,$(addprefix -i, $(incs))) $(addprefix -D, $(defs))\
97 -l $(outbase).lst\
98 -o $(obj)\
99 $(abspath $(source))
100 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
101 $(QUIET)$(REDIRECT) -C $(PATH_OUT_BASE) -wo $(dep) -- $(TOOL_VBoxNasm_AS)\
102 $(flags) $(addsuffix /,$(addprefix -i, $(incs))) $(addprefix -D, $(defs))\
103 -l $(outbase).lst\
104 -o $(obj)\
105 $(abspath $(source)) \
106 -M -MP
107endef
108
109# Dropped by the time 2.12 rc7 got out. Just struggling rebuilding nasm.
110if "$(KBUILD_TARGET)" == "darwin"
111 BS3KIT_NASM_allow_64_bit = --allow-64-bit
112endif
113
114#
115# ELF 64-bit compiler tool with object conversion.
116#
117# Mac needs cross compiler: sudo port install x86_64-elf-gcc
118#
119TOOL_Bs3Gcc64Elf64 := AMD64/ELF64 gcc/g++ (cross) compiler.
120ifeq ($(KBUILD_HOST),darwin)
121 TOOL_Bs3Gcc64Elf64_CC ?= x86_64-elf-gcc$(HOSTSUFF_EXE) -m64
122 TOOL_Bs3Gcc64Elf64_CXX ?= x86_64-elf-g++$(HOSTSUFF_EXE) -m64
123else
124 TOOL_Bs3Gcc64Elf64_CC ?= gcc$(HOSTSUFF_EXE) -m64
125 TOOL_Bs3Gcc64Elf64_CXX ?= g++$(HOSTSUFF_EXE) -m64
126endif
127ifdef SLKRUNS
128 TOOL_Bs3Gcc64Elf64_CC += -fmessage-length=0
129 TOOL_Bs3Gcc64Elf64_CXX += -fmessage-length=0
130endif
131TOOL_Bs3Gcc64Elf64_COBJSUFF = .o64
132TOOL_Bs3Gcc64Elf64_CFLAGS = -x c
133TOOL_Bs3Gcc64Elf64_CFLAGS.debug = -g
134TOOL_Bs3Gcc64Elf64_CFLAGS.profile = -O2 #-g -pg
135TOOL_Bs3Gcc64Elf64_CFLAGS.release = -O2
136TOOL_Bs3Gcc64Elf64_CINCS =
137TOOL_Bs3Gcc64Elf64_CDEFS =
138TOOL_Bs3Gcc64Elf64_COMPILE_C_DEPEND = $(VBoxBs3ObjConverter_1_TARGET)
139TOOL_Bs3Gcc64Elf64_COMPILE_C_DEPORD =
140TOOL_Bs3Gcc64Elf64_COMPILE_C_OUTPUT =
141TOOL_Bs3Gcc64Elf64_COMPILE_C_OUTPUT_MAYBE = $(obj).orignal
142define TOOL_Bs3Gcc64Elf64_COMPILE_C_CMDS
143 $(QUIET)$(TOOL_Bs3Gcc64Elf64_CC) -c\
144 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
145 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
146 -o $(obj)\
147 $(abspath $(source))
148 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
149 $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
150endef
151
152TOOL_Bs3Gcc64Elf64_C64OBJSUFF = $(TOOL_Bs3Gcc64Elf64_COBJSUFF)
153TOOL_Bs3Gcc64Elf64_C64FLAGS = $(TOOL_Bs3Gcc64Elf64_CFLAGS)
154TOOL_Bs3Gcc64Elf64_C64FLAGS.debug = $(TOOL_Bs3Gcc64Elf64_CFLAGS.debug)
155TOOL_Bs3Gcc64Elf64_C64FLAGS.profile = $(TOOL_Bs3Gcc64Elf64_CFLAGS.profile)
156TOOL_Bs3Gcc64Elf64_C64FLAGS.release = $(TOOL_Bs3Gcc64Elf64_CFLAGS.release)
157TOOL_Bs3Gcc64Elf64_C64INCS = $(TOOL_Bs3Gcc64Elf64_CINCS)
158TOOL_Bs3Gcc64Elf64_C64DEFS = $(TOOL_Bs3Gcc64Elf64_CDEFS)
159TOOL_Bs3Gcc64Elf64_COMPILE_C64_DEPEND = $(TOOL_Bs3Gcc64Elf64_COMPILE_C_DEPEND)
160TOOL_Bs3Gcc64Elf64_COMPILE_C64_DEPORD = $(TOOL_Bs3Gcc64Elf64_COMPILE_C_DEPORD)
161TOOL_Bs3Gcc64Elf64_COMPILE_C64_OUTPUT = $(TOOL_Bs3Gcc64Elf64_COMPILE_C_OUTPUT)
162TOOL_Bs3Gcc64Elf64_COMPILE_C64_OUTPUT_MAYBE = $(TOOL_Bs3Gcc64Elf64_COMPILE_C_OUTPUT_MAYBE)
163define TOOL_Bs3Gcc64Elf64_COMPILE_C64_CMDS
164$(TOOL_Bs3Gcc64Elf64_COMPILE_C_CMDS)
165endef
166
167TOOL_Bs3Gcc64Elf64_CXXOBJSUFF ?= .o
168TOOL_Bs3Gcc64Elf64_CXXFLAGS ?=
169TOOL_Bs3Gcc64Elf64_CXXFLAGS.debug ?= -g0 # no debug info, thank you
170TOOL_Bs3Gcc64Elf64_CXXFLAGS.profile ?= -O2 #-g -pg
171TOOL_Bs3Gcc64Elf64_CXXFLAGS.release ?= -O2
172TOOL_Bs3Gcc64Elf64_CXXINCS ?=
173TOOL_Bs3Gcc64Elf64_CXXDEFS ?=
174TOOL_Bs3Gcc64Elf64_COMPILE_CXX_DEPEND = $(VBoxBs3ObjConverter_1_TARGET)
175TOOL_Bs3Gcc64Elf64_COMPILE_CXX_DEPORD =
176TOOL_Bs3Gcc64Elf64_COMPILE_CXX_OUTPUT =
177TOOL_Bs3Gcc64Elf64_COMPILE_CXX_OUTPUT_MAYBE = $(obj).orignal
178define TOOL_Bs3Gcc64Elf64_COMPILE_CXX_CMDS
179 $(QUIET)$(TOOL_Bs3Gcc64Elf64_CXX) -c\
180 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
181 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
182 -o $(obj)\
183 $(abspath $(source))
184 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
185 $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
186endef
187
188#
189# Visual C++ tool variant that runs the object converter afterwards.
190#
191TOOL_Bs3Vcc64 := Visual C++ 64-bit
192TOOL_Bs3Vcc64_CC = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CC)
193TOOL_Bs3Vcc64_CXX = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CXX)
194TOOL_Bs3Vcc64_COBJSUFF = .o64
195TOOL_Bs3Vcc64_CFLAGS = $(filter-out -TC,$(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CFLAGS)) -TC
196TOOL_Bs3Vcc64_CFLAGS.debug =
197TOOL_Bs3Vcc64_CFLAGS.dbgopt = -O1
198TOOL_Bs3Vcc64_CFLAGS.profile = -O1
199TOOL_Bs3Vcc64_CFLAGS.release = -O1
200TOOL_Bs3Vcc64_CINCS = $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_INC)
201TOOL_Bs3Vcc64_CDEFS =
202TOOL_Bs3Vcc64_COMPILE_C_DEPEND = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)
203TOOL_Bs3Vcc64_COMPILE_C_DEPORD = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_DEPORD)
204TOOL_Bs3Vcc64_COMPILE_C_OUTPUT = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_OUTPUT)
205TOOL_Bs3Vcc64_COMPILE_C_OUTPUT_MAYBE = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_OUTPUT_MAYBE) $(obj).orignal
206define TOOL_Bs3Vcc64_COMPILE_C_CMDS
207$(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_CMDS)
208 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
209endef
210
211TOOL_Bs3Vcc64_C64OBJSUFF = $(TOOL_Bs3Vcc64_COBJSUFF)
212TOOL_Bs3Vcc64_C64FLAGS = $(TOOL_Bs3Vcc64_CFLAGS)
213TOOL_Bs3Vcc64_C64FLAGS.debug = $(TOOL_Bs3Vcc64_CFLAGS.debug)
214TOOL_Bs3Vcc64_C64FLAGS.dbgopt = $(TOOL_Bs3Vcc64_CFLAGS.dbgopt)
215TOOL_Bs3Vcc64_C64FLAGS.profile = $(TOOL_Bs3Vcc64_CFLAGS.profile)
216TOOL_Bs3Vcc64_C64FLAGS.release = $(TOOL_Bs3Vcc64_CFLAGS.release)
217TOOL_Bs3Vcc64_C64INCS = $(TOOL_Bs3Vcc64_CINCS)
218TOOL_Bs3Vcc64_C64DEFS = $(TOOL_Bs3Vcc64_CDEFS)
219TOOL_Bs3Vcc64_COMPILE_C64_DEPEND = $(TOOL_Bs3Vcc64_COMPILE_C_DEPEND)
220TOOL_Bs3Vcc64_COMPILE_C64_DEPORD = $(TOOL_Bs3Vcc64_COMPILE_C_DEPORD)
221TOOL_Bs3Vcc64_COMPILE_C64_OUTPUT = $(TOOL_Bs3Vcc64_COMPILE_C_OUTPUT)
222TOOL_Bs3Vcc64_COMPILE_C64_OUTPUT_MAYBE = $(TOOL_Bs3Vcc64_COMPILE_C_OUTPUT_MAYBE)
223define TOOL_Bs3Vcc64_COMPILE_C64_CMDS
224$(TOOL_Bs3Vcc64_COMPILE_C_CMDS)
225endef
226
227TOOL_Bs3Vcc64_CXXOBJSUFF = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CXXOBJSUFF)
228TOOL_Bs3Vcc64_CXXFLAGS = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CXXFLAGS) -TP
229TOOL_Bs3Vcc64_CXXFLAGS.debug =
230TOOL_Bs3Vcc64_CXXFLAGS.dbgopt = -O1
231TOOL_Bs3Vcc64_CXXFLAGS.profile = -O1
232TOOL_Bs3Vcc64_CXXFLAGS.release = -O1
233TOOL_Bs3Vcc64_CXXINCS = $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_INC)
234TOOL_Bs3Vcc64_CXXDEFS =
235TOOL_Bs3Vcc64_COMPILE_CXX_DEPEND = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)
236TOOL_Bs3Vcc64_COMPILE_CXX_DEPORD = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_DEPORD)
237TOOL_Bs3Vcc64_COMPILE_CXX_OUTPUT = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_OUTPUT)
238TOOL_Bs3Vcc64_COMPILE_CXX_OUTPUT_MAYBE = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_OUTPUT_MAYBE) $(obj).orignal
239define TOOL_Bs3Vcc64_COMPILE_CXX_CMDS
240$(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_CMDS)
241 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
242endef
243
244#
245# 32-bit OpenWatcom C/C++ tool variant that runs the object converter afterwards
246# to rename intrinsic functions so they don't clash with the 16-bit compiler.
247#
248TOOL_Bs3Ow32 := OpenWatcom C/C++ 32-bit with object convertsion
249TOOL_Bs3Ow32_CC = $(TOOL_OPENWATCOM_CC)
250TOOL_Bs3Ow32_CXX = $(TOOL_OPENWATCOM_CXX)
251TOOL_Bs3Ow32_COBJSUFF = .o32
252TOOL_Bs3Ow32_CFLAGS = $(TOOL_OPENWATCOM_CFLAGS)
253# -adfs \ - This is too complicated and it doesn't support stubbing files (svn rename fun.h pain.h). Use kDepObj instead.
254# -ad=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(dep)) \
255# -adt=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
256# -add=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source))) \
257# -adhp=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(dir $(abspath $(source))))
258TOOL_Bs3Ow32_CFLAGS.debug = $(TOOL_OPENWATCOM_CFLAGS.debug)
259TOOL_Bs3Ow32_CFLAGS.dbgopt = $(TOOL_OPENWATCOM_CFLAGS.dbgopt)
260TOOL_Bs3Ow32_CFLAGS.profile = $(TOOL_OPENWATCOM_CFLAGS.profile)
261TOOL_Bs3Ow32_CFLAGS.release = $(TOOL_OPENWATCOM_CFLAGS.release)
262TOOL_Bs3Ow32_CINCS = $(TOOL_OPENWATCOM_CINCS)
263TOOL_Bs3Ow32_CDEFS =
264TOOL_Bs3Ow32_COMPILE_C_DEPEND = $(TOOL_OPENWATCOM_COMPILE_C_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)
265TOOL_Bs3Ow32_COMPILE_C_DEPORD = $(TOOL_OPENWATCOM_COMPILE_C_DEPORD)
266TOOL_Bs3Ow32_COMPILE_C_OUTPUT = $(TOOL_OPENWATCOM_COMPILE_C_OUTPUT)
267TOOL_Bs3Ow32_COMPILE_C_OUTPUT_MAYBE = $(TOOL_OPENWATCOM_COMPILE_C_OUTPUT_MAYBE) $(obj).orignal
268define TOOL_Bs3Ow32_COMPILE_C_CMDS
269$(TOOL_OPENWATCOM_COMPILE_C_CMDS)
270 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
271 $(QUIET)$(REDIRECT) -wo /dev/null -- $(KBUILD_BIN_PATH)/kDepObj$(HOSTSUFF_EXE) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)"
272endef
273
274TOOL_Bs3Ow32_C32OBJSUFF = $(TOOL_Bs3Ow32_COBJSUFF)
275TOOL_Bs3Ow32_C32FLAGS = $(TOOL_Bs3Ow32_CFLAGS)
276TOOL_Bs3Ow32_C32FLAGS.debug = $(TOOL_Bs3Ow32_CFLAGS.debug)
277TOOL_Bs3Ow32_C32FLAGS.dbgopt = $(TOOL_Bs3Ow32_CFLAGS.dbgopt)
278TOOL_Bs3Ow32_C32FLAGS.profile = $(TOOL_Bs3Ow32_CFLAGS.profile)
279TOOL_Bs3Ow32_C32FLAGS.release = $(TOOL_Bs3Ow32_CFLAGS.release)
280TOOL_Bs3Ow32_C32INCS = $(TOOL_Bs3Ow32_CINCS)
281TOOL_Bs3Ow32_C32DEFS =
282TOOL_Bs3Ow32_COMPILE_C32_DEPEND = $(TOOL_Bs3Ow32_COMPILE_C_DEPEND)
283TOOL_Bs3Ow32_COMPILE_C32_DEPORD = $(TOOL_Bs3Ow32_COMPILE_C_DEPORD)
284TOOL_Bs3Ow32_COMPILE_C32_OUTPUT = $(TOOL_Bs3Ow32_COMPILE_C_OUTPUT)
285TOOL_Bs3Ow32_COMPILE_C32_OUTPUT_MAYBE = $(TOOL_Bs3Ow32_COMPILE_C_OUTPUT_MAYBE)
286define TOOL_Bs3Ow32_COMPILE_C32_CMDS
287$(TOOL_Bs3Ow32_COMPILE_C_CMDS)
288endef
289
290TOOL_Bs3Ow32_CXXOBJSUFF = $(TOOL_OPENWATCOM_CXXOBJSUFF)
291TOOL_Bs3Ow32_CXXFLAGS = $(TOOL_OPENWATCOM_CXXFLAGS) -ad=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(dep)) -adfs
292TOOL_Bs3Ow32_CXXFLAGS.debug = $(TOOL_OPENWATCOM_CXXFLAGS.debug)
293TOOL_Bs3Ow32_CXXFLAGS.dbgopt = $(TOOL_OPENWATCOM_CXXFLAGS.dbgopt)
294TOOL_Bs3Ow32_CXXFLAGS.profile = $(TOOL_OPENWATCOM_CXXFLAGS.profile)
295TOOL_Bs3Ow32_CXXFLAGS.release = $(TOOL_OPENWATCOM_CXXFLAGS.release)
296TOOL_Bs3Ow32_CXXINCS = $(TOOL_OPENWATCOM_CXXINCS)
297TOOL_Bs3Ow32_CXXDEFS =
298TOOL_Bs3Ow32_COMPILE_CXX_DEPEND = $(TOOL_OPENWATCOM_COMPILE_CXX_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)
299TOOL_Bs3Ow32_COMPILE_CXX_DEPORD = $(TOOL_OPENWATCOM_COMPILE_CXX_DEPORD)
300TOOL_Bs3Ow32_COMPILE_CXX_OUTPUT = $(TOOL_OPENWATCOM_COMPILE_CXX_OUTPUT)
301TOOL_Bs3Ow32_COMPILE_CXX_OUTPUT_MAYBE = $(TOOL_OPENWATCOM_COMPILE_CXX_OUTPUT_MAYBE) $(obj).orignal
302define TOOL_Bs3Ow32_COMPILE_CXX_CMDS
303$(TOOL_OPENWATCOM_COMPILE_CXX_CMDS)
304 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
305 $(QUIET)$(REDIRECT) -wo /dev/null -- $(KBUILD_BIN_PATH)/kDepObj$(HOSTSUFF_EXE) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)"
306endef
307
308
309#
310# 16-bit OpenWatcom C/C++ tool variant that runs the object converter afterwards
311# to rename intrinsic functions so they don't clash with the 16-bit compiler.
312#
313TOOL_Bs3Ow16 := OpenWatcom C/C++ 16-bit with object convertsion
314TOOL_Bs3Ow16_CC = $(TOOL_OPENWATCOM-16_CC)
315TOOL_Bs3Ow16_CXX = $(TOOL_OPENWATCOM-16_CXX)
316TOOL_Bs3Ow16_COBJSUFF = .o16
317TOOL_Bs3Ow16_CFLAGS = $(TOOL_OPENWATCOM-16_CFLAGS)
318TOOL_Bs3Ow16_CFLAGS.debug = $(TOOL_OPENWATCOM-16_CFLAGS.debug)
319TOOL_Bs3Ow16_CFLAGS.dbgopt = $(TOOL_OPENWATCOM-16_CFLAGS.dbgopt)
320TOOL_Bs3Ow16_CFLAGS.profile = $(TOOL_OPENWATCOM-16_CFLAGS.profile)
321TOOL_Bs3Ow16_CFLAGS.release = $(TOOL_OPENWATCOM-16_CFLAGS.release)
322TOOL_Bs3Ow16_CINCS = $(TOOL_OPENWATCOM-16_CINCS)
323TOOL_Bs3Ow16_CDEFS =
324TOOL_Bs3Ow16_COMPILE_C_DEPEND = $(TOOL_OPENWATCOM-16_COMPILE_C_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)
325TOOL_Bs3Ow16_COMPILE_C_DEPORD = $(TOOL_OPENWATCOM-16_COMPILE_C_DEPORD)
326TOOL_Bs3Ow16_COMPILE_C_OUTPUT = $(TOOL_OPENWATCOM-16_COMPILE_C_OUTPUT)
327TOOL_Bs3Ow16_COMPILE_C_OUTPUT_MAYBE = $(TOOL_OPENWATCOM-16_COMPILE_C_OUTPUT_MAYBE)
328define TOOL_Bs3Ow16_COMPILE_C_CMDS
329$(TOOL_OPENWATCOM-16_COMPILE_C_CMDS)
330 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
331 $(QUIET)$(REDIRECT) -wo /dev/null -- $(KBUILD_BIN_PATH)/kDepObj$(HOSTSUFF_EXE) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)"
332endef
333
334TOOL_Bs3Ow16_C16OBJSUFF = $(TOOL_Bs3Ow16_C16OBJSUFF)
335TOOL_Bs3Ow16_C16FLAGS = $(TOOL_Bs3Ow16_C16FLAGS)
336TOOL_Bs3Ow16_C16FLAGS.debug = $(TOOL_Bs3Ow16_C16FLAGS.debug)
337TOOL_Bs3Ow16_C16FLAGS.dbgopt = $(TOOL_Bs3Ow16_C16FLAGS.dbgopt)
338TOOL_Bs3Ow16_C16FLAGS.profile = $(TOOL_Bs3Ow16_C16FLAGS.profile)
339TOOL_Bs3Ow16_C16FLAGS.release = $(TOOL_Bs3Ow16_C16FLAGS.release)
340TOOL_Bs3Ow16_C16INCS = $(TOOL_Bs3Ow16_C16INCS)
341TOOL_Bs3Ow16_C16DEFS = $(TOOL_Bs3Ow16_C16DEFS)
342TOOL_Bs3Ow16_COMPILE_C16_DEPEND = $(TOOL_Bs3Ow16_COMPILE_C16_DEPEND)
343TOOL_Bs3Ow16_COMPILE_C16_DEPORD = $(TOOL_Bs3Ow16_COMPILE_C16_DEPORD)
344TOOL_Bs3Ow16_COMPILE_C16_OUTPUT = $(TOOL_Bs3Ow16_COMPILE_C16_OUTPUT)
345TOOL_Bs3Ow16_COMPILE_C16_OUTPUT_MAYBE = $(TOOL_Bs3Ow16_COMPILE_C16_OUTPUT_MAYBE)
346define TOOL_Bs3Ow16_COMPILE_C16_CMDS
347$(TOOL_Bs3Ow16_COMPILE_C_CMDS)
348endef
349
350TOOL_Bs3Ow16_CXXOBJSUFF = $(TOOL_OPENWATCOM-16_CXXOBJSUFF)
351TOOL_Bs3Ow16_CXXFLAGS = $(TOOL_OPENWATCOM-16_CXXFLAGS)
352TOOL_Bs3Ow16_CXXFLAGS.debug = $(TOOL_OPENWATCOM-16_CXXFLAGS.debug)
353TOOL_Bs3Ow16_CXXFLAGS.dbgopt = $(TOOL_OPENWATCOM-16_CXXFLAGS.dbgopt)
354TOOL_Bs3Ow16_CXXFLAGS.profile = $(TOOL_OPENWATCOM-16_CXXFLAGS.profile)
355TOOL_Bs3Ow16_CXXFLAGS.release = $(TOOL_OPENWATCOM-16_CXXFLAGS.release)
356TOOL_Bs3Ow16_CXXINCS = $(TOOL_OPENWATCOM-16_CXXINCS)
357TOOL_Bs3Ow16_CXXDEFS =
358TOOL_Bs3Ow16_COMPILE_CXX_DEPEND = $(TOOL_OPENWATCOM-16_COMPILE_CXX_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)
359TOOL_Bs3Ow16_COMPILE_CXX_DEPORD = $(TOOL_OPENWATCOM-16_COMPILE_CXX_DEPORD)
360TOOL_Bs3Ow16_COMPILE_CXX_OUTPUT = $(TOOL_OPENWATCOM-16_COMPILE_CXX_OUTPUT)
361TOOL_Bs3Ow16_COMPILE_CXX_OUTPUT_MAYBE = $(TOOL_OPENWATCOM-16_COMPILE_CXX_OUTPUT_MAYBE)
362define TOOL_Bs3Ow16_COMPILE_CXX_CMDS
363$(TOOL_OPENWATCOM-16_COMPILE_CXX_CMDS)
364 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
365 $(QUIET)$(REDIRECT) -wo /dev/null -- $(KBUILD_BIN_PATH)/kDepObj$(HOSTSUFF_EXE) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)"
366endef
367
368# Debug info format depends on what we use for 64-bit.
369if1of ($(KBUILD_HOST), win)
370 BS3_OW_DBG_OPT = -hc -d1+
371 #BS3_OW_DBG_OPT = -hd -d1+
372 BS3_OW_DBG_LDOPT = codeview
373else
374 BS3_OW_DBG_OPT = -hd -d1+
375 BS3_OW_DBG_LDOPT = dwarf
376endif
377
378#
379# Source handlers for .c16, .c32 and .c64
380#
381define VBoxBs3KitImgSrcHandler_16bit_c
382local type := C
383 $(kb-src-one 2)
384endef
385
386C32TOOL = Bs3Ow32
387define VBoxBs3KitImgSrcHandler_32bit_c
388local type := C32
389 $(kb-src-one 2)
390endef
391
392define VBoxBs3KitImgSrcHandler_64bit_c
393local type := C64
394 $(kb-src-one 2)
395endef
396
397
398#
399# BS3Kit template for assembly and 16-bit code.
400#
401# Note! Using -d1 as -d1+ and -d2 causes suboptimal code to be generated (strlen
402# reloading string pointer argument all the time).
403# Update! -d1+ is required for line number information in code living in include
404# files and any DWARF stuff at all. So, we'll ignore poor code quality.
405# Note! Optimization options should come after debug stuff as -d2 for instance
406# disables all optimziations.
407# Note! We use BS3CLASS16CODE because of wdis code detection heuristics requires the class
408# of a code segment to be exactly 'CODE', or ending with 'CODE' or 'TEXT' (more
409# recent wdis have a -c=<clsnm> option, but not the one we currently use ).
410#
411#
412# Compiler options explained:
413# -nt=xxxx Sets the text segment name.
414# -nc=xxxx Sets the text segment class name.
415# -nd=xxxx Sets the data segment name.
416# -ecc Sets the default calling convension to __cdecl
417# Update: We don't use this in 16-bit code as it causes unfavorable reloading of DS before calling
418# inlined functions (e.g. iprt/asm.h). Instead we use -ecw and __cdecl where needed.
419# Update: With -zdp the DS reloading is gone. Code is slightly larger, but seems to cure stability
420# issues in bs3CpuBasic2_RaiseXcpt1 (workers ending up with default calling convention).
421# -ecw Sets the default calling convension to __watcall ()
422# -q Quiet, no logos or stuff.
423# -0 Use 8086 instruction set (16-bit only).
424# -3 Use 386 instruction set (16-bit only).
425# -wx Maxium warning level.
426# -zl Don't emit default library information.
427# -zdp DS pegged to BS3DATA16_GROUP.
428# -zu Assume SS != DS.
429# -mc Compact memory model, far data, small code.
430# -mf Flat memory model (32-bit).
431# -d+ Enabled better /dVAR=XXX parsing, using space as delimiter instead of alpha-numerical/whatever.
432# -d1 Debug info: Globals and line numbers.
433# -s No stack overflow checks.
434# -oa Relaxed aliasing constraints.
435# -ob Branch prediction.
436# -of Generate stack frames when needed.
437# -oi Inline instrinsics functions.
438# -ol Loop optimizations.
439# -or Reorder for best pipeline.
440# -os Favor size over speed.
441#
442TEMPLATE_VBoxBS3KitImg = Template for building BS3Kit test images.
443TEMPLATE_VBoxBS3KitImg_BLD_TRG = os-agnostic
444TEMPLATE_VBoxBS3KitImg_BLD_TRG_ARCH = noarch
445TEMPLATE_VBoxBS3KitImg_INST = $(INST_VALIDATIONKIT)bootsectors/
446TEMPLATE_VBoxBS3KitImg_BINSUFF = .img
447TEMPLATE_VBoxBS3KitImg_MODE = 0644
448TEMPLATE_VBoxBS3KitImg_SRC_HANDLERS = \
449 .c16:VBoxBs3KitImgSrcHandler_16bit_c \
450 .c32:VBoxBs3KitImgSrcHandler_32bit_c \
451 .c64:VBoxBs3KitImgSrcHandler_64bit_c
452TEMPLATE_VBoxBS3KitImg_ASOBJSUFF = .o16
453TEMPLATE_VBoxBS3KitImg_ASTOOL = VBoxNasm
454TEMPLATE_VBoxBS3KitImg_ASFLAGS = -f obj -g $(BS3KIT_NASM_allow_64_bit) -w+orphan-labels
455TEMPLATE_VBoxBS3KitImg_ASDEFS = ASM_FORMAT_OMF RT_NOINC_SEGMENTS __NASM__ ARCH_BITS=16 RT_ARCH_X86
456TEMPLATE_VBoxBS3KitImg_DEFS = IN_BS3KIT
457TEMPLATE_VBoxBS3KitImg_DEFS.debug = BS3_STRICT
458
459TEMPLATE_VBoxBS3KitImg_ARTOOL = OPENWATCOM-16
460
461TEMPLATE_VBoxBS3KitImg_CTOOL = Bs3Ow16
462TEMPLATE_VBoxBS3KitImg_CXXTOOL = Bs3Ow16
463TEMPLATE_VBoxBS3KitImg_CFLAGS = \
464 -nt=BS3TEXT16 -nd=BS3DATA16 -nc=BS3CLASS16CODE -ecc -q -0 -wx -zl -zdp -zu -mc $(BS3_OW_DBG_OPT) -s -oa -ob -of -oi -ol -or -os -d+
465TEMPLATE_VBoxBS3KitImg_CXXFLAGS = \
466 -nt=BS3TEXT16 -nd=BS3DATA16 -nc=BS3CLASS16CODE -ecc -q -0 -wx -zl -zdp -zu -mc $(BS3_OW_DBG_OPT) -s -oa -ob -of -oi -ol -or -os -d+
467TEMPLATE_VBoxBS3KitImg_CDEFS = ARCH_BITS=16 RT_ARCH_X86
468
469TEMPLATE_VBoxBS3KitImg_TOOL = $(NO_SUCH_VARIABLE)
470TEMPLATE_VBoxBS3KitImg_C16TOOL = $(TEMPLATE_VBoxBS3KitImg_CTOOL)
471TEMPLATE_VBoxBS3KitImg_C16FLAGS = $(TEMPLATE_VBoxBS3KitImg_CFLAGS)
472TEMPLATE_VBoxBS3KitImg_C16DEFS = $(TEMPLATE_VBoxBS3KitImg_CDEFS)
473TEMPLATE_VBoxBS3KitImg_C32TOOL := Bs3Ow32
474TEMPLATE_VBoxBS3KitImg_C32FLAGS = $(TEMPLATE_VBoxBS3KitImg32_CFLAGS)
475TEMPLATE_VBoxBS3KitImg_C32DEFS = ARCH_BITS=32 RT_ARCH_X86
476TEMPLATE_VBoxBS3KitImg_C64TOOL = $(TEMPLATE_VBoxBS3KitImg64_CTOOL)
477TEMPLATE_VBoxBS3KitImg_C64FLAGS = $(TEMPLATE_VBoxBS3KitImg64_CFLAGS)
478TEMPLATE_VBoxBS3KitImg_C64DEFS = ARCH_BITS=64 RT_ARCH_AMD64
479
480TEMPLATE_VBoxBS3KitImg_INCS = $(VBOX_PATH_BS3KIT_SRC) .
481TEMPLATE_VBoxBS3KitImg_LDTOOL = OPENWATCOM-WL
482# option quiet, nofarcalls\
483# disable 1014, 1023, 2120, 1080
484
485# linker options:
486# system dos: Link a 16-bit DOS binary.
487# output raw ...: Produce a raw DOS binary for loading at flat address 10000h.
488# The following is for ordering segments.
489# option start=_start: The start symbol in bs3-first-xxx.asm.
490# debug codeview/dwarf all: Full debug information either in codeview or dwarf.
491# option symfile: Produce a separate symbol file with the debug info.
492# option map: Produce a map file.
493# option statics: ?
494# option verbose: Verbose map file?
495# option disable 1014: Disable warning about
496# option disable 1080: Disable warning about
497# option disable 1150: Disable warning about
498#
499# Note! We're pushing DATA16 to 0x20000 because it's impossible to force wlink
500# to give us a real-mode + GDT compatible alignment (0ffffff80h), i.e.
501# real-mode address on the form 0fff8:0000.
502TEMPLATE_VBoxBS3KitImg_LDFLAGS = system dos \
503 debug $(BS3_OW_DBG_LDOPT) all \
504 option quiet, map, statics, verbose, symfile, start=_start \
505 disable 1014, 1080, 1150 \
506 \
507 output raw offset=0x10000 \
508 order \
509 clname BS3FLAT segaddr=0x0000 \
510 segment BS3FLAT segaddr=0x0000 \
511 clname BS3CLASS16CODE segaddr=0x1000 \
512 segment BS3TEXT16 \
513 segment BS3TEXT16_END \
514 clname BS3SYSTEM16 segaddr=0x2000 \
515 segment BS3SYSTEM16 \
516 clname FAR_DATA \
517 segment BS3DATA16 segaddr=0x2900 \
518 segment BS3DATA16CONST \
519 segment BS3DATA16CONST2 \
520 segment BS3DATA16_DATA \
521 segment BS3DATA16_END \
522 segment BS3DATA32 \
523 segment BS3DATA32CONST \
524 segment BS3DATA32CONST2 \
525 segment BS3DATA32_DATA \
526 segment DATA32 \
527 segment BS3DATA32_END \
528 segment BS3DATA64 \
529 segment DATA64 \
530 segment .data \
531 segment DATA64_END \
532 clname BS3CLASS32CODE \
533 segment BS3TEXT32 \
534 segment TEXT32 \
535 clname BS3CLASS64CODE \
536 segment BS3TEXT64 \
537 segment TEXT64 \
538 segment .text \
539 segment .rdata \
540
541TEMPLATE_VBoxBS3KitImg_LNK_DEPS = \
542 $(bs3-bootsector_1_TARGET) \
543 $(VBoxBs3Linker_1_TARGET)
544TEMPLATE_VBoxBS3KitImg_POST_CMDS = $(if $(eq $(tool_do),LINK_LIBRARY)\
545 ,,$(QUIET)$(MV_EXT) -f -- "$(out)" "$(out).tmp" \
546 $$(NLTAB)$(QUIET)$(VBoxBs3Linker_1_TARGET) -o $(out) $(bs3-bootsector_1_TARGET) $(out).tmp \
547 $$(NLTAB)$(QUIET)$(RM_EXT) -f -- "$(out).tmp")
548
549TEMPLATE_VBoxBS3KitImg_LIBS = \
550 $(PATH_OBJ)/bs3kit-common-16/bs3kit-common-16.lib \
551 $(PATH_OBJ)/bs3kit-common-32/bs3kit-common-32.lib \
552 $(PATH_OBJ)/bs3kit-common-64/bs3kit-common-64.lib \
553 \
554 $(PATH_OBJ)/bs3kit-rm/bs3kit-rm.lib \
555 $(PATH_OBJ)/bs3kit-pe16/bs3kit-pe16.lib \
556 $(PATH_OBJ)/bs3kit-pe16_32/bs3kit-pe16_32.lib \
557 $(PATH_OBJ)/bs3kit-pe16_v86/bs3kit-pe16_v86.lib \
558 $(PATH_OBJ)/bs3kit-pe32/bs3kit-pe32.lib \
559 $(PATH_OBJ)/bs3kit-pe32_16/bs3kit-pe32_16.lib \
560 $(PATH_OBJ)/bs3kit-pev86/bs3kit-pev86.lib \
561 $(PATH_OBJ)/bs3kit-pp16/bs3kit-pp16.lib \
562 $(PATH_OBJ)/bs3kit-pp16_32/bs3kit-pp16_32.lib \
563 $(PATH_OBJ)/bs3kit-pp16_v86/bs3kit-pp16_v86.lib \
564 $(PATH_OBJ)/bs3kit-pp32/bs3kit-pp32.lib \
565 $(PATH_OBJ)/bs3kit-pp32_16/bs3kit-pp32_16.lib \
566 $(PATH_OBJ)/bs3kit-ppv86/bs3kit-ppv86.lib \
567 $(PATH_OBJ)/bs3kit-pae16/bs3kit-pae16.lib \
568 $(PATH_OBJ)/bs3kit-pae16_32/bs3kit-pae16_32.lib \
569 $(PATH_OBJ)/bs3kit-pae16_v86/bs3kit-pae16_v86.lib \
570 $(PATH_OBJ)/bs3kit-pae32/bs3kit-pae32.lib \
571 $(PATH_OBJ)/bs3kit-pae32_16/bs3kit-pae32_16.lib \
572 $(PATH_OBJ)/bs3kit-paev86/bs3kit-paev86.lib \
573 $(PATH_OBJ)/bs3kit-lm16/bs3kit-lm16.lib \
574 $(PATH_OBJ)/bs3kit-lm32/bs3kit-lm32.lib \
575 $(PATH_OBJ)/bs3kit-lm64/bs3kit-lm64.lib
576
577# BS3Kit template for 32-bit code.
578TEMPLATE_VBoxBS3KitImg32 = Template for building BS3Kit test images.
579TEMPLATE_VBoxBS3KitImg32_BLD_TRG = os-agnostic
580TEMPLATE_VBoxBS3KitImg32_BLD_TRG_ARCH = x86
581TEMPLATE_VBoxBS3KitImg32_INSTTYPE = none
582TEMPLATE_VBoxBS3KitImg32_ASTOOL = VBoxNasm
583TEMPLATE_VBoxBS3KitImg32_ASOBJSUFF = .o32
584TEMPLATE_VBoxBS3KitImg32_ASFLAGS = -f obj -g $(BS3KIT_NASM_allow_64_bit) -w+orphan-labels
585TEMPLATE_VBoxBS3KitImg32_ASDEFS = ASM_FORMAT_OMF RT_NOINC_SEGMENTS __NASM__
586TEMPLATE_VBoxBS3KitImg32_DEFS = ARCH_BITS=32 IN_BS3KIT
587TEMPLATE_VBoxBS3KitImg32_DEFS.debug = BS3_STRICT
588TEMPLATE_VBoxBS3KitImg32_ARTOOL = OPENWATCOM
589TEMPLATE_VBoxBS3KitImg32_CTOOL = Bs3Ow32
590TEMPLATE_VBoxBS3KitImg32_CXXTOOL = Bs3Ow32
591TEMPLATE_VBoxBS3KitImg32_CFLAGS = \
592 -nt=BS3TEXT32 -nd=BS3DATA32 -nc=BS3CLASS32CODE -ecc -q -wx -zl -mf $(BS3_OW_DBG_OPT) -s -oa -ob -of -oi -ol -or -os -d+
593TEMPLATE_VBoxBS3KitImg32_CXXFLAGS = \
594 -nt=BS3TEXT32 -nd=BS3DATA32 -nc=BS3CLASS32CODE -ecc -q -wx -zl -mf $(BS3_OW_DBG_OPT) -s -oa -ob -of -oi -ol -or -os -d+
595TEMPLATE_VBoxBS3KitImg32_INCS = $(VBOX_PATH_BS3KIT_SRC) .
596TEMPLATE_VBoxBS3KitImg32_LDTOOL = VBoxBsUnusedLd
597
598# BS3Kit template for 64-bit code.
599TEMPLATE_VBoxBS3KitImg64 = Template for building BS3Kit test images.
600TEMPLATE_VBoxBS3KitImg64_BLD_TRG = os-agnostic
601TEMPLATE_VBoxBS3KitImg64_BLD_TRG_ARCH = amd64
602TEMPLATE_VBoxBS3KitImg64_INSTTYPE = none
603TEMPLATE_VBoxBS3KitImg64_ASTOOL = VBoxNasm
604TEMPLATE_VBoxBS3KitImg64_ASOBJSUFF = .o64
605TEMPLATE_VBoxBS3KitImg64_ASFLAGS = -f obj -g $(BS3KIT_NASM_allow_64_bit) -w+orphan-labels
606TEMPLATE_VBoxBS3KitImg64_ASDEFS = ASM_FORMAT_OMF ASM_CALL64_MSC RT_NOINC_SEGMENTS __NASM__
607TEMPLATE_VBoxBS3KitImg64_DEFS = IN_BS3KIT ARCH_BITS=64
608TEMPLATE_VBoxBS3KitImg64_DEFS.debug = BS3_STRICT
609TEMPLATE_VBoxBS3KitImg64_ARTOOL = OPENWATCOM
610TEMPLATE_VBoxBS3KitImg64_INCS = $(VBOX_PATH_BS3KIT_SRC) .
611if1of ($(KBUILD_HOST), win)
612 ifndef TOOL_VCC100AMD64 # For win.x86 builds.
613 include $(KBUILD_PATH)/tools/$(VBOX_VCC_TOOL_STEM)AMD64.kmk
614 endif
615 TEMPLATE_VBoxBS3KitImg64_CTOOL := Bs3Vcc64
616 TEMPLATE_VBoxBS3KitImg64_CXXTOOL := Bs3Vcc64
617 TEMPLATE_VBoxBS3KitImg64_CFLAGS = -Z7 -O1 -Oi -GF -GS- -Gy- -Gs65536
618 TEMPLATE_VBoxBS3KitImg64_CXXFLAGS = -Z7 -O1 -Oi -GF -GS- -Gy- -Gs65536
619else
620 TEMPLATE_VBoxBS3KitImg64_CTOOL := Bs3Gcc64Elf64
621 TEMPLATE_VBoxBS3KitImg64_CXXTOOL := Bs3Gcc64Elf64
622 # Note! -mx32 would be exactly what we needed here, however it causes internal compiler errors with 4.8.4 on gentoo.
623 TEMPLATE_VBoxBS3KitImg64_CFLAGS = -m64 -maccumulate-outgoing-args -g -Os -fno-omit-frame-pointer $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_WARN_PEDANTIC_C)
624 TEMPLATE_VBoxBS3KitImg64_CXXFLAGS = -m64 -maccumulate-outgoing-args -g -Os -fno-omit-frame-pointer $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_WARN_PEDANTIC_CXX)
625endif
626TEMPLATE_VBoxBS3KitImg64_LDTOOL = VBoxBsUnusedLd
627
628# BS3Kit template for the bootsector.
629TEMPLATE_VBoxBS3KitBS = Template for building BS3Kit test images.
630TEMPLATE_VBoxBS3KitBS_BLD_TRG = os-agnostic
631TEMPLATE_VBoxBS3KitBS_BLD_TRG_ARCH = x86
632TEMPLATE_VBoxBS3KitBS_INST = $(INST_VALIDATIONKIT)bootsectors/
633TEMPLATE_VBoxBS3KitBS_INSTTYPE = none
634TEMPLATE_VBoxBS3KitBS_BINSUFF = .img
635TEMPLATE_VBoxBS3KitBS_MODE = 0644
636TEMPLATE_VBoxBS3KitBS_ASTOOL = YASM
637TEMPLATE_VBoxBS3KitBS_ASFLAGS = -f bin --mapfile
638TEMPLATE_VBoxBS3KitBS_ASDEFS = ASM_FORMAT_BIN RT_NOINC_SEGMENTS ARCH_BITS=16 __YASM__
639TEMPLATE_VBoxBS3KitBS_INCS = $(VBOX_PATH_BS3KIT_SRC) .
640TEMPLATE_VBoxBS3KitBS_LDTOOL = VBoxBsCpLd
641
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette