1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
|
# $Id$
## @file
# kBuild Tool Config - GCC Cross compiler for CentOS 3 x86.
#
#
# Copyright (C) 2013-2016 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# you can redistribute it and/or modify it under the terms of the GNU
# General Public License (GPL) as published by the Free Software
# Foundation, in version 2 as it comes in the "COPYING" file of the
# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
#
TOOL_VBoxXGccX86RedHatLinux := GCC Cross compiler for CentOS 3 x86.
# Tool Specific Properties:
ifndef TOOL_VBoxXGccX86RedHatLinux_PREFIX
TOOL_VBoxXGccX86RedHatLinux_PREFIX := i386-redhat-linux-
endif
ifndef PATH_TOOL_VBoxXGccX86RedHatLinux
PATH_TOOL_VBoxXGccX86RedHatLinux := $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS_HST)/i386-redhat-linux/*)))
ifeq ($(PATH_TOOL_VBoxXGccX86RedHatLinux),)
PATH_TOOL_VBoxXGccX86RedHatLinux := $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS_HST_ALT)/i386-redhat-linux/*)))
endif
endif
TOOL_VBoxXGccX86RedHatLinux_PREFIX := $(REDIRECT) -E COMPILER_PATH=$(PATH_TOOL_VBoxXGccX86RedHatLinux)/bin/ -- $(PATH_TOOL_VBoxXGccX86RedHatLinux)/bin/$(TOOL_VBoxXGccX86RedHatLinux_PREFIX)
TOOL_VBoxXGccX86RedHatLinux_CC ?= $(TOOL_VBoxXGccX86RedHatLinux_PREFIX)gcc$(HOSTSUFF_EXE)
TOOL_VBoxXGccX86RedHatLinux_CXX ?= $(TOOL_VBoxXGccX86RedHatLinux_PREFIX)g++$(HOSTSUFF_EXE)
TOOL_VBoxXGccX86RedHatLinux_AS ?= $(TOOL_VBoxXGccX86RedHatLinux_PREFIX)gcc$(HOSTSUFF_EXE)
TOOL_VBoxXGccX86RedHatLinux_AR ?= $(TOOL_VBoxXGccX86RedHatLinux_PREFIX)ar$(HOSTSUFF_EXE)
TOOL_VBoxXGccX86RedHatLinux_LD ?= $(TOOL_VBoxXGccX86RedHatLinux_PREFIX)gcc$(HOSTSUFF_EXE) -Wl,-rpath-link,$(PATH_TOOL_VBoxXGccX86RedHatLinux)/i386-redhat-linux/lib
TOOL_VBoxXGccX86RedHatLinux_LD_SYSMOD ?= $(TOOL_VBoxXGccX86RedHatLinux_PREFIX)ld$(HOSTSUFF_EXE)
TOOL_VBoxXGccX86RedHatLinux_LD_SONAME ?= -Wl,-soname=$(firstword $($(1)_SONAME.$(KBUILD_TARGET).$(KBUILD_TYPE)) $($(1)_SONAME.$(KBUILD_TARGET)) $($(1)_SONAME.$(KBUILD_TYPE)) $($(1)_SONAME) $(notdir $(2)))
TOOL_VBoxXGccX86RedHatLinux_LD_MAP ?= -Wl,-Map -Wl,$(1) -Wl,--cref
TOOL_VBoxXGccX86RedHatLinux_LD_SYSMOD_MAP ?= -Map $(1) --cref
TOOL_VBoxXGccX86RedHatLinux_LDFLAGS.dll ?= -shared
TOOL_VBoxXGccX86RedHatLinux_LDFLAGS.sysmod ?= -r
ifdef SLKRUNS
TOOL_VBoxXGccX86RedHatLinux_CC += -fmessage-length=0
TOOL_VBoxXGccX86RedHatLinux_CXX += -fmessage-length=0
endif
# General Properties used by kBuild:
TOOL_VBoxXGccX86RedHatLinux_COBJSUFF ?= .o
TOOL_VBoxXGccX86RedHatLinux_CFLAGS ?= -g
TOOL_VBoxXGccX86RedHatLinux_CFLAGS.debug ?= -O0
TOOL_VBoxXGccX86RedHatLinux_CFLAGS.release ?= -O2
TOOL_VBoxXGccX86RedHatLinux_CFLAGS.profile ?= -O2
TOOL_VBoxXGccX86RedHatLinux_CINCS ?=
TOOL_VBoxXGccX86RedHatLinux_CDEFS ?=
TOOL_VBoxXGccX86RedHatLinux_CXXOBJSUFF ?= .o
TOOL_VBoxXGccX86RedHatLinux_CXXOBJSUFF ?= .o
TOOL_VBoxXGccX86RedHatLinux_CXXFLAGS ?= -g
TOOL_VBoxXGccX86RedHatLinux_CXXFLAGS.debug ?= -O0
TOOL_VBoxXGccX86RedHatLinux_CXXFLAGS.release ?= -O2
TOOL_VBoxXGccX86RedHatLinux_CXXFLAGS.profile ?= -O2
TOOL_VBoxXGccX86RedHatLinux_CXXINCS ?=
TOOL_VBoxXGccX86RedHatLinux_CXXDEFS ?=
TOOL_VBoxXGccX86RedHatLinux_ASFLAGS ?= -g -x assembler-with-cpp
TOOL_VBoxXGccX86RedHatLinux_ASOBJSUFF ?= .o
TOOL_VBoxXGccX86RedHatLinux_ARFLAGS ?= cr
TOOL_VBoxXGccX86RedHatLinux_ARLIBSUFF ?= .a
TOOL_VBoxXGccX86RedHatLinux_LDFLAGS ?=
TOOL_VBoxXGccX86RedHatLinux_LDFLAGS.debug ?= -g
TOOL_VBoxXGccX86RedHatLinux_LDFLAGS.release ?= -s
TOOL_VBoxXGccX86RedHatLinux_COMPILE_C_OUTPUT =
TOOL_VBoxXGccX86RedHatLinux_COMPILE_C_DEPEND =
TOOL_VBoxXGccX86RedHatLinux_COMPILE_C_DEPORD =
define TOOL_VBoxXGccX86RedHatLinux_COMPILE_C_CMDS
$(QUIET)$(TOOL_VBoxXGccX86RedHatLinux_CC) -c \
$(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs)) \
-Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP \
-o $(obj) \
$(abspath $(source))
endef
TOOL_VBoxXGccX86RedHatLinux_COMPILE_CXX_OUTPUT =
TOOL_VBoxXGccX86RedHatLinux_COMPILE_CXX_DEPEND =
TOOL_VBoxXGccX86RedHatLinux_COMPILE_CXX_DEPORD =
define TOOL_VBoxXGccX86RedHatLinux_COMPILE_CXX_CMDS
$(QUIET)$(TOOL_VBoxXGccX86RedHatLinux_CXX) -c \
$(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs)) \
-Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP \
-o $(obj) \
$(abspath $(source))
endef
TOOL_VBoxXGccX86RedHatLinux_COMPILE_AS_OUTPUT =
TOOL_VBoxXGccX86RedHatLinux_COMPILE_AS_DEPEND =
TOOL_VBoxXGccX86RedHatLinux_COMPILE_AS_DEPORD =
define TOOL_VBoxXGccX86RedHatLinux_COMPILE_AS_CMDS
$(QUIET)$(TOOL_VBoxXGccX86RedHatLinux_AS) -c \
$(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs)) \
-Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP \
-o $(obj) \
$(abspath $(source))
endef
TOOL_VBoxXGccX86RedHatLinux_LINK_LIBRARY_OUTPUT = $(out).ar-script
TOOL_VBoxXGccX86RedHatLinux_LINK_LIBRARY_DEPEND = $(othersrc)
TOOL_VBoxXGccX86RedHatLinux_LINK_LIBRARY_DEPORD =
define TOOL_VBoxXGccX86RedHatLinux_LINK_LIBRARY_CMDS
$(QUIET)$(APPEND) $(out).ar-script 'CREATE $(out)'
$(QUIET)$(APPEND) -n $(out).ar-script \
$(foreach o,$(objs), 'ADDMOD $(o)') \
$(foreach o,$(othersrc), 'ADDLIB $(o)')
$(QUIET)$(APPEND) $(out).ar-script 'SAVE'
$(QUIET)$(APPEND) $(out).ar-script 'END'
$(QUIET)$(REDIRECT) -rti $(out).ar-script -- $(TOOL_VBoxXGccX86RedHatLinux_AR) -M
endef
TOOL_VBoxXGccX86RedHatLinux_LINK_PROGRAM_OUTPUT = $(outbase).map
TOOL_VBoxXGccX86RedHatLinux_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
TOOL_VBoxXGccX86RedHatLinux_LINK_PROGRAM_DEPORD =
define TOOL_VBoxXGccX86RedHatLinux_LINK_PROGRAM_CMDS
$(QUIET)$(TOOL_VBoxXGccX86RedHatLinux_LD) $(flags) -o $(out) $(objs) \
$(foreach p,$(libpath), -L$(p)) \
$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) \
$(call TOOL_VBoxXGccX86RedHatLinux_LD_MAP,$(outbase).map)
endef
TOOL_VBoxXGccX86RedHatLinux_LINK_DLL_OUTPUT = $(outbase).map
TOOL_VBoxXGccX86RedHatLinux_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
TOOL_VBoxXGccX86RedHatLinux_LINK_DLL_DEPORD =
define TOOL_VBoxXGccX86RedHatLinux_LINK_DLL_CMDS
$(QUIET)$(TOOL_VBoxXGccX86RedHatLinux_LD) $(TOOL_VBoxXGccX86RedHatLinux_LDFLAGS.dll) $(flags) -o $(out) \
$(if $(filter-out win32 os2, $(KBUILD_TARGET)),$(call TOOL_VBoxXGccX86RedHatLinux_LD_SONAME,$(target),$(out))) \
$(objs) \
$(foreach p,$(libpath), -L$(p)) \
$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) \
$(call TOOL_VBoxXGccX86RedHatLinux_LD_MAP,$(outbase).map)
endef
TOOL_VBoxXGccX86RedHatLinux_LINK_SYSMOD_OUTPUT = $(outbase).map
TOOL_VBoxXGccX86RedHatLinux_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
TOOL_VBoxXGccX86RedHatLinux_LINK_SYSMOD_DEPORD =
define TOOL_VBoxXGccX86RedHatLinux_LINK_SYSMOD_CMDS
$(QUIET)$(TOOL_VBoxXGccX86RedHatLinux_LD_SYSMOD) $(TOOL_VBoxXGccX86RedHatLinux_LDFLAGS.sysmod) $(flags) -o $(out) $(objs) \
$(foreach p,$(libpath), -L$(p)) \
$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) \
$(call TOOL_VBoxXGccX86RedHatLinux_LD_SYSMOD_MAP,$(outbase).map)
endef
|