# $Id: VBoxXGccX86RedHatLinux.kmk 97991 2023-01-05 02:04:12Z vboxsync $ ## @file # kBuild Tool Config - GCC Cross compiler for CentOS 3 x86. # # # Copyright (C) 2013-2022 Oracle and/or its affiliates. # # This file is part of VirtualBox base platform packages, as # available from https://www.virtualbox.org. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, in version 3 of the # License. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # SPDX-License-Identifier: GPL-3.0-only # 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) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-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) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-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) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-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