VirtualBox

source: vbox/trunk/tools/kBuildTools/VBoxXGccX86RedHatLinux.kmk@ 77809

Last change on this file since 77809 was 62534, checked in by vboxsync, 8 years ago

(C) 2016

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