1 | # $Id: VBoxXGccAmd64LinuxGnu.kmk 98443 2023-02-02 13:03:05Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # VBox kBuild Tool Config - GCC Cross compiler for Debian 4.0 AMD64.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2013-2023 Oracle and/or its affiliates.
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox base platform packages, as
|
---|
10 | # available from https://www.virtualbox.org.
|
---|
11 | #
|
---|
12 | # This program is free software; you can redistribute it and/or
|
---|
13 | # modify it under the terms of the GNU General Public License
|
---|
14 | # as published by the Free Software Foundation, in version 3 of the
|
---|
15 | # License.
|
---|
16 | #
|
---|
17 | # This program is distributed in the hope that it will be useful, but
|
---|
18 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | # General Public License for more details.
|
---|
21 | #
|
---|
22 | # You should have received a copy of the GNU General Public License
|
---|
23 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | #
|
---|
25 | # SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | #
|
---|
27 |
|
---|
28 | TOOL_VBoxXGccAmd64LinuxGnu := GCC Cross compiler for Debian 4.0.
|
---|
29 |
|
---|
30 | # Tool Specific Properties:
|
---|
31 | ifndef TOOL_VBoxXGccAmd64LinuxGnu_PREFIX
|
---|
32 | TOOL_VBoxXGccAmd64LinuxGnu_PREFIX := x86_64-linux-gnu-
|
---|
33 | endif
|
---|
34 | ifndef PATH_TOOL_VBoxXGccAmd64LinuxGnu
|
---|
35 | PATH_TOOL_VBoxXGccAmd64LinuxGnu := $(lastword $(wildcard $(KBUILD_DEVTOOLS_HST)/x86_64-linux-gnu/*))
|
---|
36 | ifeq ($(PATH_TOOL_VBoxXGccAmd64LinuxGnu),)
|
---|
37 | PATH_TOOL_VBoxXGccAmd64LinuxGnu := $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS_HST_ALT)/x86_64-linux-gnu/*)))
|
---|
38 | endif
|
---|
39 | endif
|
---|
40 | TOOL_VBoxXGccAmd64LinuxGnu_PREFIX := $(PATH_TOOL_VBoxXGccAmd64LinuxGnu)/usr/bin/$(TOOL_VBoxXGccAmd64LinuxGnu_PREFIX)
|
---|
41 |
|
---|
42 | TOOL_VBoxXGccAmd64LinuxGnu_CC ?= $(TOOL_VBoxXGccAmd64LinuxGnu_PREFIX)gcc-4.1$(HOSTSUFF_EXE)
|
---|
43 | TOOL_VBoxXGccAmd64LinuxGnu_CXX ?= $(TOOL_VBoxXGccAmd64LinuxGnu_PREFIX)g++-4.1$(HOSTSUFF_EXE)
|
---|
44 | TOOL_VBoxXGccAmd64LinuxGnu_AS ?= $(TOOL_VBoxXGccAmd64LinuxGnu_PREFIX)gcc-4.1$(HOSTSUFF_EXE)
|
---|
45 | TOOL_VBoxXGccAmd64LinuxGnu_AR ?= $(TOOL_VBoxXGccAmd64LinuxGnu_PREFIX)ar$(HOSTSUFF_EXE)
|
---|
46 | TOOL_VBoxXGccAmd64LinuxGnu_LD ?= $(TOOL_VBoxXGccAmd64LinuxGnu_PREFIX)gcc-4.1$(HOSTSUFF_EXE)
|
---|
47 | TOOL_VBoxXGccAmd64LinuxGnu_LD_SYSMOD ?= $(TOOL_VBoxXGccAmd64LinuxGnu_PREFIX)ld$(HOSTSUFF_EXE)
|
---|
48 |
|
---|
49 | TOOL_VBoxXGccAmd64LinuxGnu_LD_SONAME ?= -Wl,-soname=$(firstword $($(1)_SONAME.$(KBUILD_TARGET).$(KBUILD_TYPE)) $($(1)_SONAME.$(KBUILD_TARGET)) $($(1)_SONAME.$(KBUILD_TYPE)) $($(1)_SONAME) $(notdir $(2)))
|
---|
50 | TOOL_VBoxXGccAmd64LinuxGnu_LD_MAP ?= -Wl,-Map -Wl,$(1)
|
---|
51 | TOOL_VBoxXGccAmd64LinuxGnu_LD_SYSMOD_MAP ?= -Map $(1)
|
---|
52 | TOOL_VBoxXGccAmd64LinuxGnu_LDFLAGS.dll ?= -shared
|
---|
53 | TOOL_VBoxXGccAmd64LinuxGnu_LDFLAGS.sysmod ?= -r
|
---|
54 |
|
---|
55 | ifdef SLKRUNS
|
---|
56 | TOOL_VBoxXGccAmd64LinuxGnu_CC += -fmessage-length=0
|
---|
57 | TOOL_VBoxXGccAmd64LinuxGnu_CXX += -fmessage-length=0
|
---|
58 | endif
|
---|
59 |
|
---|
60 | # General Properties used by kBuild:
|
---|
61 | TOOL_VBoxXGccAmd64LinuxGnu_COBJSUFF ?= .o
|
---|
62 | TOOL_VBoxXGccAmd64LinuxGnu_CFLAGS ?= -g
|
---|
63 | TOOL_VBoxXGccAmd64LinuxGnu_CFLAGS.debug ?= -O0
|
---|
64 | TOOL_VBoxXGccAmd64LinuxGnu_CFLAGS.release ?= -O2
|
---|
65 | TOOL_VBoxXGccAmd64LinuxGnu_CFLAGS.profile ?= -O2
|
---|
66 | TOOL_VBoxXGccAmd64LinuxGnu_CINCS ?=
|
---|
67 | TOOL_VBoxXGccAmd64LinuxGnu_CDEFS ?=
|
---|
68 |
|
---|
69 | TOOL_VBoxXGccAmd64LinuxGnu_CXXOBJSUFF ?= .o
|
---|
70 | TOOL_VBoxXGccAmd64LinuxGnu_CXXOBJSUFF ?= .o
|
---|
71 | TOOL_VBoxXGccAmd64LinuxGnu_CXXFLAGS ?= -g
|
---|
72 | TOOL_VBoxXGccAmd64LinuxGnu_CXXFLAGS.debug ?= -O0
|
---|
73 | TOOL_VBoxXGccAmd64LinuxGnu_CXXFLAGS.release ?= -O2
|
---|
74 | TOOL_VBoxXGccAmd64LinuxGnu_CXXFLAGS.profile ?= -O2
|
---|
75 | TOOL_VBoxXGccAmd64LinuxGnu_CXXINCS ?=
|
---|
76 | TOOL_VBoxXGccAmd64LinuxGnu_CXXDEFS ?=
|
---|
77 |
|
---|
78 | TOOL_VBoxXGccAmd64LinuxGnu_ASFLAGS ?= -g -x assembler-with-cpp
|
---|
79 | TOOL_VBoxXGccAmd64LinuxGnu_ASOBJSUFF ?= .o
|
---|
80 |
|
---|
81 | TOOL_VBoxXGccAmd64LinuxGnu_ARFLAGS ?= cr
|
---|
82 | TOOL_VBoxXGccAmd64LinuxGnu_ARLIBSUFF ?= .a
|
---|
83 |
|
---|
84 | TOOL_VBoxXGccAmd64LinuxGnu_LDFLAGS ?=
|
---|
85 | TOOL_VBoxXGccAmd64LinuxGnu_LDFLAGS.debug ?= -g
|
---|
86 | TOOL_VBoxXGccAmd64LinuxGnu_LDFLAGS.release ?= -s
|
---|
87 |
|
---|
88 | TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_C_OUTPUT =
|
---|
89 | TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_C_DEPEND =
|
---|
90 | TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_C_DEPORD =
|
---|
91 | define TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_C_CMDS
|
---|
92 | $(QUIET)$(TOOL_VBoxXGccAmd64LinuxGnu_CC) -c \
|
---|
93 | $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs)) \
|
---|
94 | -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP \
|
---|
95 | -o $(obj) \
|
---|
96 | $(abspath $(source))
|
---|
97 | endef
|
---|
98 |
|
---|
99 | TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_CXX_OUTPUT =
|
---|
100 | TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_CXX_DEPEND =
|
---|
101 | TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_CXX_DEPORD =
|
---|
102 | define TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_CXX_CMDS
|
---|
103 | $(QUIET)$(TOOL_VBoxXGccAmd64LinuxGnu_CXX) -c \
|
---|
104 | $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs)) \
|
---|
105 | -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP \
|
---|
106 | -o $(obj) \
|
---|
107 | $(abspath $(source))
|
---|
108 | endef
|
---|
109 |
|
---|
110 | TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_AS_OUTPUT =
|
---|
111 | TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_AS_DEPEND =
|
---|
112 | TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_AS_DEPORD =
|
---|
113 | define TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_AS_CMDS
|
---|
114 | $(QUIET)$(TOOL_VBoxXGccAmd64LinuxGnu_AS) -c \
|
---|
115 | $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs)) \
|
---|
116 | -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP \
|
---|
117 | -o $(obj) \
|
---|
118 | $(abspath $(source))
|
---|
119 | endef
|
---|
120 |
|
---|
121 | TOOL_VBoxXGccAmd64LinuxGnu_LINK_LIBRARY_OUTPUT = $(out).ar-script
|
---|
122 | TOOL_VBoxXGccAmd64LinuxGnu_LINK_LIBRARY_DEPEND = $(othersrc)
|
---|
123 | TOOL_VBoxXGccAmd64LinuxGnu_LINK_LIBRARY_DEPORD =
|
---|
124 | define TOOL_VBoxXGccAmd64LinuxGnu_LINK_LIBRARY_CMDS
|
---|
125 | $(QUIET)$(APPEND) $(out).ar-script 'CREATE $(out)'
|
---|
126 | $(QUIET)$(APPEND) -n $(out).ar-script \
|
---|
127 | $(foreach o,$(objs), 'ADDMOD $(o)') \
|
---|
128 | $(foreach o,$(othersrc), 'ADDLIB $(o)')
|
---|
129 | $(QUIET)$(APPEND) $(out).ar-script 'SAVE'
|
---|
130 | $(QUIET)$(APPEND) $(out).ar-script 'END'
|
---|
131 | $(QUIET)$(REDIRECT) -rti $(out).ar-script -- $(TOOL_VBoxXGccAmd64LinuxGnu_AR) -M
|
---|
132 | endef
|
---|
133 |
|
---|
134 | TOOL_VBoxXGccAmd64LinuxGnu_LINK_PROGRAM_OUTPUT = $(outbase).map
|
---|
135 | TOOL_VBoxXGccAmd64LinuxGnu_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
|
---|
136 | TOOL_VBoxXGccAmd64LinuxGnu_LINK_PROGRAM_DEPORD =
|
---|
137 | define TOOL_VBoxXGccAmd64LinuxGnu_LINK_PROGRAM_CMDS
|
---|
138 | $(QUIET)$(TOOL_VBoxXGccAmd64LinuxGnu_LD) $(flags) -o $(out) $(objs) \
|
---|
139 | $(foreach p,$(libpath), -L$(p)) \
|
---|
140 | $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) \
|
---|
141 | $(call TOOL_VBoxXGccAmd64LinuxGnu_LD_MAP,$(outbase).map)
|
---|
142 | endef
|
---|
143 |
|
---|
144 | TOOL_VBoxXGccAmd64LinuxGnu_LINK_DLL_OUTPUT = $(outbase).map
|
---|
145 | TOOL_VBoxXGccAmd64LinuxGnu_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
|
---|
146 | TOOL_VBoxXGccAmd64LinuxGnu_LINK_DLL_DEPORD =
|
---|
147 | define TOOL_VBoxXGccAmd64LinuxGnu_LINK_DLL_CMDS
|
---|
148 | $(QUIET)$(TOOL_VBoxXGccAmd64LinuxGnu_LD) $(TOOL_VBoxXGccAmd64LinuxGnu_LDFLAGS.dll) $(flags) -o $(out) \
|
---|
149 | $(if $(filter-out win32 os2, $(KBUILD_TARGET)),$(call TOOL_VBoxXGccAmd64LinuxGnu_LD_SONAME,$(target),$(out))) \
|
---|
150 | $(objs) \
|
---|
151 | $(foreach p,$(libpath), -L$(p)) \
|
---|
152 | $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) \
|
---|
153 | $(call TOOL_VBoxXGccAmd64LinuxGnu_LD_MAP,$(outbase).map)
|
---|
154 | endef
|
---|
155 |
|
---|
156 | TOOL_VBoxXGccAmd64LinuxGnu_LINK_SYSMOD_OUTPUT = $(outbase).map
|
---|
157 | TOOL_VBoxXGccAmd64LinuxGnu_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
|
---|
158 | TOOL_VBoxXGccAmd64LinuxGnu_LINK_SYSMOD_DEPORD =
|
---|
159 | define TOOL_VBoxXGccAmd64LinuxGnu_LINK_SYSMOD_CMDS
|
---|
160 | $(QUIET)$(TOOL_VBoxXGccAmd64LinuxGnu_LD_SYSMOD) $(TOOL_VBoxXGccAmd64LinuxGnu_LDFLAGS.sysmod) $(flags) -o $(out) $(objs) \
|
---|
161 | $(foreach p,$(libpath), -L$(p)) \
|
---|
162 | $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) \
|
---|
163 | $(call TOOL_VBoxXGccAmd64LinuxGnu_LD_SYSMOD_MAP,$(outbase).map)
|
---|
164 | endef
|
---|
165 |
|
---|