[46390] | 1 | # $Id: VBoxXGccX86RedHatLinux.kmk 98108 2023-01-17 23:40:56Z vboxsync $
|
---|
| 2 | ## @file
|
---|
| 3 | # kBuild Tool Config - GCC Cross compiler for CentOS 3 x86.
|
---|
| 4 | #
|
---|
| 5 |
|
---|
| 6 | #
|
---|
[98108] | 7 | # Copyright (C) 2013-2023 Oracle and/or its affiliates.
|
---|
[46390] | 8 | #
|
---|
[96416] | 9 | # This file is part of VirtualBox base platform packages, as
|
---|
| 10 | # available from https://www.virtualbox.org.
|
---|
[46390] | 11 | #
|
---|
[96416] | 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 | #
|
---|
[46390] | 27 |
|
---|
[46564] | 28 | TOOL_VBoxXGccX86RedHatLinux := GCC Cross compiler for CentOS 3 x86.
|
---|
[46390] | 29 |
|
---|
| 30 | # Tool Specific Properties:
|
---|
[46564] | 31 | ifndef TOOL_VBoxXGccX86RedHatLinux_PREFIX
|
---|
| 32 | TOOL_VBoxXGccX86RedHatLinux_PREFIX := i386-redhat-linux-
|
---|
[46390] | 33 | endif
|
---|
[46564] | 34 | ifndef PATH_TOOL_VBoxXGccX86RedHatLinux
|
---|
| 35 | PATH_TOOL_VBoxXGccX86RedHatLinux := $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS_HST)/i386-redhat-linux/*)))
|
---|
| 36 | ifeq ($(PATH_TOOL_VBoxXGccX86RedHatLinux),)
|
---|
| 37 | PATH_TOOL_VBoxXGccX86RedHatLinux := $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS_HST_ALT)/i386-redhat-linux/*)))
|
---|
[46390] | 38 | endif
|
---|
| 39 | endif
|
---|
[46564] | 40 | TOOL_VBoxXGccX86RedHatLinux_PREFIX := $(REDIRECT) -E COMPILER_PATH=$(PATH_TOOL_VBoxXGccX86RedHatLinux)/bin/ -- $(PATH_TOOL_VBoxXGccX86RedHatLinux)/bin/$(TOOL_VBoxXGccX86RedHatLinux_PREFIX)
|
---|
[46390] | 41 |
|
---|
[46564] | 42 | TOOL_VBoxXGccX86RedHatLinux_CC ?= $(TOOL_VBoxXGccX86RedHatLinux_PREFIX)gcc$(HOSTSUFF_EXE)
|
---|
| 43 | TOOL_VBoxXGccX86RedHatLinux_CXX ?= $(TOOL_VBoxXGccX86RedHatLinux_PREFIX)g++$(HOSTSUFF_EXE)
|
---|
| 44 | TOOL_VBoxXGccX86RedHatLinux_AS ?= $(TOOL_VBoxXGccX86RedHatLinux_PREFIX)gcc$(HOSTSUFF_EXE)
|
---|
| 45 | TOOL_VBoxXGccX86RedHatLinux_AR ?= $(TOOL_VBoxXGccX86RedHatLinux_PREFIX)ar$(HOSTSUFF_EXE)
|
---|
[50244] | 46 | TOOL_VBoxXGccX86RedHatLinux_LD ?= $(TOOL_VBoxXGccX86RedHatLinux_PREFIX)gcc$(HOSTSUFF_EXE) -Wl,-rpath-link,$(PATH_TOOL_VBoxXGccX86RedHatLinux)/i386-redhat-linux/lib
|
---|
[46564] | 47 | TOOL_VBoxXGccX86RedHatLinux_LD_SYSMOD ?= $(TOOL_VBoxXGccX86RedHatLinux_PREFIX)ld$(HOSTSUFF_EXE)
|
---|
[46390] | 48 |
|
---|
[46564] | 49 | 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)))
|
---|
| 50 | TOOL_VBoxXGccX86RedHatLinux_LD_MAP ?= -Wl,-Map -Wl,$(1) -Wl,--cref
|
---|
| 51 | TOOL_VBoxXGccX86RedHatLinux_LD_SYSMOD_MAP ?= -Map $(1) --cref
|
---|
| 52 | TOOL_VBoxXGccX86RedHatLinux_LDFLAGS.dll ?= -shared
|
---|
| 53 | TOOL_VBoxXGccX86RedHatLinux_LDFLAGS.sysmod ?= -r
|
---|
[46390] | 54 |
|
---|
| 55 | ifdef SLKRUNS
|
---|
[46564] | 56 | TOOL_VBoxXGccX86RedHatLinux_CC += -fmessage-length=0
|
---|
| 57 | TOOL_VBoxXGccX86RedHatLinux_CXX += -fmessage-length=0
|
---|
[46390] | 58 | endif
|
---|
| 59 |
|
---|
| 60 | # General Properties used by kBuild:
|
---|
[46564] | 61 | TOOL_VBoxXGccX86RedHatLinux_COBJSUFF ?= .o
|
---|
| 62 | TOOL_VBoxXGccX86RedHatLinux_CFLAGS ?= -g
|
---|
| 63 | TOOL_VBoxXGccX86RedHatLinux_CFLAGS.debug ?= -O0
|
---|
| 64 | TOOL_VBoxXGccX86RedHatLinux_CFLAGS.release ?= -O2
|
---|
| 65 | TOOL_VBoxXGccX86RedHatLinux_CFLAGS.profile ?= -O2
|
---|
| 66 | TOOL_VBoxXGccX86RedHatLinux_CINCS ?=
|
---|
| 67 | TOOL_VBoxXGccX86RedHatLinux_CDEFS ?=
|
---|
[46390] | 68 |
|
---|
[46564] | 69 | TOOL_VBoxXGccX86RedHatLinux_CXXOBJSUFF ?= .o
|
---|
| 70 | TOOL_VBoxXGccX86RedHatLinux_CXXOBJSUFF ?= .o
|
---|
| 71 | TOOL_VBoxXGccX86RedHatLinux_CXXFLAGS ?= -g
|
---|
| 72 | TOOL_VBoxXGccX86RedHatLinux_CXXFLAGS.debug ?= -O0
|
---|
| 73 | TOOL_VBoxXGccX86RedHatLinux_CXXFLAGS.release ?= -O2
|
---|
| 74 | TOOL_VBoxXGccX86RedHatLinux_CXXFLAGS.profile ?= -O2
|
---|
| 75 | TOOL_VBoxXGccX86RedHatLinux_CXXINCS ?=
|
---|
| 76 | TOOL_VBoxXGccX86RedHatLinux_CXXDEFS ?=
|
---|
[46390] | 77 |
|
---|
[46564] | 78 | TOOL_VBoxXGccX86RedHatLinux_ASFLAGS ?= -g -x assembler-with-cpp
|
---|
| 79 | TOOL_VBoxXGccX86RedHatLinux_ASOBJSUFF ?= .o
|
---|
[46390] | 80 |
|
---|
[46564] | 81 | TOOL_VBoxXGccX86RedHatLinux_ARFLAGS ?= cr
|
---|
| 82 | TOOL_VBoxXGccX86RedHatLinux_ARLIBSUFF ?= .a
|
---|
| 83 | TOOL_VBoxXGccX86RedHatLinux_LDFLAGS ?=
|
---|
| 84 | TOOL_VBoxXGccX86RedHatLinux_LDFLAGS.debug ?= -g
|
---|
| 85 | TOOL_VBoxXGccX86RedHatLinux_LDFLAGS.release ?= -s
|
---|
[46390] | 86 |
|
---|
[46564] | 87 | TOOL_VBoxXGccX86RedHatLinux_COMPILE_C_OUTPUT =
|
---|
| 88 | TOOL_VBoxXGccX86RedHatLinux_COMPILE_C_DEPEND =
|
---|
| 89 | TOOL_VBoxXGccX86RedHatLinux_COMPILE_C_DEPORD =
|
---|
| 90 | define TOOL_VBoxXGccX86RedHatLinux_COMPILE_C_CMDS
|
---|
| 91 | $(QUIET)$(TOOL_VBoxXGccX86RedHatLinux_CC) -c \
|
---|
[97991] | 92 | $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs)) \
|
---|
[46390] | 93 | -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP \
|
---|
| 94 | -o $(obj) \
|
---|
| 95 | $(abspath $(source))
|
---|
| 96 | endef
|
---|
| 97 |
|
---|
[46564] | 98 | TOOL_VBoxXGccX86RedHatLinux_COMPILE_CXX_OUTPUT =
|
---|
| 99 | TOOL_VBoxXGccX86RedHatLinux_COMPILE_CXX_DEPEND =
|
---|
| 100 | TOOL_VBoxXGccX86RedHatLinux_COMPILE_CXX_DEPORD =
|
---|
| 101 | define TOOL_VBoxXGccX86RedHatLinux_COMPILE_CXX_CMDS
|
---|
| 102 | $(QUIET)$(TOOL_VBoxXGccX86RedHatLinux_CXX) -c \
|
---|
[97991] | 103 | $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs)) \
|
---|
[46390] | 104 | -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP \
|
---|
| 105 | -o $(obj) \
|
---|
| 106 | $(abspath $(source))
|
---|
| 107 | endef
|
---|
| 108 |
|
---|
[46564] | 109 | TOOL_VBoxXGccX86RedHatLinux_COMPILE_AS_OUTPUT =
|
---|
| 110 | TOOL_VBoxXGccX86RedHatLinux_COMPILE_AS_DEPEND =
|
---|
| 111 | TOOL_VBoxXGccX86RedHatLinux_COMPILE_AS_DEPORD =
|
---|
| 112 | define TOOL_VBoxXGccX86RedHatLinux_COMPILE_AS_CMDS
|
---|
| 113 | $(QUIET)$(TOOL_VBoxXGccX86RedHatLinux_AS) -c \
|
---|
[97991] | 114 | $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs)) \
|
---|
[46390] | 115 | -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP \
|
---|
| 116 | -o $(obj) \
|
---|
| 117 | $(abspath $(source))
|
---|
| 118 | endef
|
---|
| 119 |
|
---|
[46564] | 120 | TOOL_VBoxXGccX86RedHatLinux_LINK_LIBRARY_OUTPUT = $(out).ar-script
|
---|
| 121 | TOOL_VBoxXGccX86RedHatLinux_LINK_LIBRARY_DEPEND = $(othersrc)
|
---|
| 122 | TOOL_VBoxXGccX86RedHatLinux_LINK_LIBRARY_DEPORD =
|
---|
| 123 | define TOOL_VBoxXGccX86RedHatLinux_LINK_LIBRARY_CMDS
|
---|
[46390] | 124 | $(QUIET)$(APPEND) $(out).ar-script 'CREATE $(out)'
|
---|
| 125 | $(QUIET)$(APPEND) -n $(out).ar-script \
|
---|
| 126 | $(foreach o,$(objs), 'ADDMOD $(o)') \
|
---|
| 127 | $(foreach o,$(othersrc), 'ADDLIB $(o)')
|
---|
| 128 | $(QUIET)$(APPEND) $(out).ar-script 'SAVE'
|
---|
| 129 | $(QUIET)$(APPEND) $(out).ar-script 'END'
|
---|
[46564] | 130 | $(QUIET)$(REDIRECT) -rti $(out).ar-script -- $(TOOL_VBoxXGccX86RedHatLinux_AR) -M
|
---|
[46390] | 131 | endef
|
---|
| 132 |
|
---|
[46564] | 133 | TOOL_VBoxXGccX86RedHatLinux_LINK_PROGRAM_OUTPUT = $(outbase).map
|
---|
| 134 | TOOL_VBoxXGccX86RedHatLinux_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
|
---|
| 135 | TOOL_VBoxXGccX86RedHatLinux_LINK_PROGRAM_DEPORD =
|
---|
| 136 | define TOOL_VBoxXGccX86RedHatLinux_LINK_PROGRAM_CMDS
|
---|
| 137 | $(QUIET)$(TOOL_VBoxXGccX86RedHatLinux_LD) $(flags) -o $(out) $(objs) \
|
---|
[46390] | 138 | $(foreach p,$(libpath), -L$(p)) \
|
---|
| 139 | $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) \
|
---|
[46564] | 140 | $(call TOOL_VBoxXGccX86RedHatLinux_LD_MAP,$(outbase).map)
|
---|
[46390] | 141 | endef
|
---|
| 142 |
|
---|
[46564] | 143 | TOOL_VBoxXGccX86RedHatLinux_LINK_DLL_OUTPUT = $(outbase).map
|
---|
| 144 | TOOL_VBoxXGccX86RedHatLinux_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
|
---|
| 145 | TOOL_VBoxXGccX86RedHatLinux_LINK_DLL_DEPORD =
|
---|
| 146 | define TOOL_VBoxXGccX86RedHatLinux_LINK_DLL_CMDS
|
---|
| 147 | $(QUIET)$(TOOL_VBoxXGccX86RedHatLinux_LD) $(TOOL_VBoxXGccX86RedHatLinux_LDFLAGS.dll) $(flags) -o $(out) \
|
---|
| 148 | $(if $(filter-out win32 os2, $(KBUILD_TARGET)),$(call TOOL_VBoxXGccX86RedHatLinux_LD_SONAME,$(target),$(out))) \
|
---|
[46390] | 149 | $(objs) \
|
---|
| 150 | $(foreach p,$(libpath), -L$(p)) \
|
---|
| 151 | $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) \
|
---|
[46564] | 152 | $(call TOOL_VBoxXGccX86RedHatLinux_LD_MAP,$(outbase).map)
|
---|
[46390] | 153 | endef
|
---|
| 154 |
|
---|
[46564] | 155 | TOOL_VBoxXGccX86RedHatLinux_LINK_SYSMOD_OUTPUT = $(outbase).map
|
---|
| 156 | TOOL_VBoxXGccX86RedHatLinux_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
|
---|
| 157 | TOOL_VBoxXGccX86RedHatLinux_LINK_SYSMOD_DEPORD =
|
---|
| 158 | define TOOL_VBoxXGccX86RedHatLinux_LINK_SYSMOD_CMDS
|
---|
| 159 | $(QUIET)$(TOOL_VBoxXGccX86RedHatLinux_LD_SYSMOD) $(TOOL_VBoxXGccX86RedHatLinux_LDFLAGS.sysmod) $(flags) -o $(out) $(objs) \
|
---|
[46390] | 160 | $(foreach p,$(libpath), -L$(p)) \
|
---|
| 161 | $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) \
|
---|
[46564] | 162 | $(call TOOL_VBoxXGccX86RedHatLinux_LD_SYSMOD_MAP,$(outbase).map)
|
---|
[46390] | 163 | endef
|
---|
| 164 |
|
---|