VirtualBox

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

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

bs3-cpu-basic-2: conforming tests. generalized the xcpt #1 test so it isn't duplicated for each 16-bit template mode, but rather shared. saves ~16KB of code now.

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