VirtualBox

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

Last change on this file since 46390 was 46390, checked in by vboxsync, 12 years ago

s/XGCCAMD64LINUXGNU/VBoxXGccAmd64LinuxGnu/g s/XGCCX86REDHATLINUX/VBoxXGccX86RedHatLinux/g, adding the two tools files to tools/kBuildTools/ instead of kBuild/tools since these are rather VBox specific and better kept here.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.8 KB
Line 
1# $Id: VBoxXGccX86RedHatLinux.kmk 46390 2013-06-04 22:08:52Z vboxsync $
2## @file
3# kBuild Tool Config - GCC Cross compiler for CentOS 3 x86.
4#
5
6#
7# Copyright (C) 2013 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
18VBoxXGccX86RedHatLinux := GCC Cross compiler for CentOS 3 x86.
19
20# Tool Specific Properties:
21ifndef VBoxXGccX86RedHatLinux_PREFIX
22 VBoxXGccX86RedHatLinux_PREFIX := i386-redhat-linux-
23endif
24ifndef PATH_VBoxXGccX86RedHatLinux
25 PATH_VBoxXGccX86RedHatLinux := $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS_HST)/i386-redhat-linux/*)))
26 ifeq ($(PATH_VBoxXGccX86RedHatLinux),)
27 PATH_VBoxXGccX86RedHatLinux := $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS_HST_ALT)/linux.x86/i386-redhat-linux/*)))
28 endif
29endif
30VBoxXGccX86RedHatLinux_PREFIX := $(REDIRECT) -E COMPILER_PATH=$(PATH_VBoxXGccX86RedHatLinux)/bin/ -- $(PATH_VBoxXGccX86RedHatLinux)/bin/$(VBoxXGccX86RedHatLinux_PREFIX)
31
32VBoxXGccX86RedHatLinux_CC ?= $(VBoxXGccX86RedHatLinux_PREFIX)gcc$(HOSTSUFF_EXE)
33VBoxXGccX86RedHatLinux_CXX ?= $(VBoxXGccX86RedHatLinux_PREFIX)g++$(HOSTSUFF_EXE)
34VBoxXGccX86RedHatLinux_AS ?= $(VBoxXGccX86RedHatLinux_PREFIX)gcc$(HOSTSUFF_EXE)
35VBoxXGccX86RedHatLinux_AR ?= $(VBoxXGccX86RedHatLinux_PREFIX)ar$(HOSTSUFF_EXE)
36VBoxXGccX86RedHatLinux_LD ?= $(VBoxXGccX86RedHatLinux_PREFIX)g++$(HOSTSUFF_EXE) -Wl,-rpath-link,$(PATH_VBoxXGccX86RedHatLinux)/i386-redhat-linux/lib
37VBoxXGccX86RedHatLinux_LD_SYSMOD ?= $(VBoxXGccX86RedHatLinux_PREFIX)ld$(HOSTSUFF_EXE)
38
39VBoxXGccX86RedHatLinux_LD_SONAME ?= -Wl,-soname=$(firstword $($(1)_SONAME.$(KBUILD_TARGET).$(KBUILD_TYPE)) $($(1)_SONAME.$(KBUILD_TARGET)) $($(1)_SONAME.$(KBUILD_TYPE)) $($(1)_SONAME) $(notdir $(2)))
40VBoxXGccX86RedHatLinux_LD_MAP ?= -Wl,-Map -Wl,$(1) -Wl,--cref
41VBoxXGccX86RedHatLinux_LD_SYSMOD_MAP ?= -Map $(1) --cref
42VBoxXGccX86RedHatLinux_LDFLAGS.dll ?= -shared
43VBoxXGccX86RedHatLinux_LDFLAGS.sysmod ?= -r
44
45ifdef SLKRUNS
46VBoxXGccX86RedHatLinux_CC += -fmessage-length=0
47VBoxXGccX86RedHatLinux_CXX += -fmessage-length=0
48endif
49
50# General Properties used by kBuild:
51VBoxXGccX86RedHatLinux_COBJSUFF ?= .o
52VBoxXGccX86RedHatLinux_CFLAGS ?= -g
53VBoxXGccX86RedHatLinux_CFLAGS.debug ?= -O0
54VBoxXGccX86RedHatLinux_CFLAGS.release ?= -O2
55VBoxXGccX86RedHatLinux_CFLAGS.profile ?= -O2
56VBoxXGccX86RedHatLinux_CINCS ?=
57VBoxXGccX86RedHatLinux_CDEFS ?=
58
59VBoxXGccX86RedHatLinux_CXXOBJSUFF ?= .o
60VBoxXGccX86RedHatLinux_CXXOBJSUFF ?= .o
61VBoxXGccX86RedHatLinux_CXXFLAGS ?= -g
62VBoxXGccX86RedHatLinux_CXXFLAGS.debug ?= -O0
63VBoxXGccX86RedHatLinux_CXXFLAGS.release ?= -O2
64VBoxXGccX86RedHatLinux_CXXFLAGS.profile ?= -O2
65VBoxXGccX86RedHatLinux_CXXINCS ?=
66VBoxXGccX86RedHatLinux_CXXDEFS ?=
67
68VBoxXGccX86RedHatLinux_ASFLAGS ?= -g -x assembler-with-cpp
69VBoxXGccX86RedHatLinux_ASOBJSUFF ?= .o
70
71VBoxXGccX86RedHatLinux_ARFLAGS ?= cr
72VBoxXGccX86RedHatLinux_ARLIBSUFF ?= .a
73
74VBoxXGccX86RedHatLinux_LDFLAGS ?=
75VBoxXGccX86RedHatLinux_LDFLAGS.debug ?= -g
76VBoxXGccX86RedHatLinux_LDFLAGS.release ?= -s
77
78VBoxXGccX86RedHatLinux_COMPILE_C_OUTPUT =
79VBoxXGccX86RedHatLinux_COMPILE_C_DEPEND =
80VBoxXGccX86RedHatLinux_COMPILE_C_DEPORD =
81define VBoxXGccX86RedHatLinux_COMPILE_C_CMDS
82 $(QUIET)$(VBoxXGccX86RedHatLinux_CC) -c \
83 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs)) \
84 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP \
85 -o $(obj) \
86 $(abspath $(source))
87endef
88
89VBoxXGccX86RedHatLinux_COMPILE_CXX_OUTPUT =
90VBoxXGccX86RedHatLinux_COMPILE_CXX_DEPEND =
91VBoxXGccX86RedHatLinux_COMPILE_CXX_DEPORD =
92define VBoxXGccX86RedHatLinux_COMPILE_CXX_CMDS
93 $(QUIET)$(VBoxXGccX86RedHatLinux_CXX) -c \
94 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs)) \
95 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP \
96 -o $(obj) \
97 $(abspath $(source))
98endef
99
100VBoxXGccX86RedHatLinux_COMPILE_AS_OUTPUT =
101VBoxXGccX86RedHatLinux_COMPILE_AS_DEPEND =
102VBoxXGccX86RedHatLinux_COMPILE_AS_DEPORD =
103define VBoxXGccX86RedHatLinux_COMPILE_AS_CMDS
104 $(QUIET)$(VBoxXGccX86RedHatLinux_AS) -c \
105 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs)) \
106 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP \
107 -o $(obj) \
108 $(abspath $(source))
109endef
110
111VBoxXGccX86RedHatLinux_LINK_LIBRARY_OUTPUT = $(out).ar-script
112VBoxXGccX86RedHatLinux_LINK_LIBRARY_DEPEND = $(othersrc)
113VBoxXGccX86RedHatLinux_LINK_LIBRARY_DEPORD =
114define VBoxXGccX86RedHatLinux_LINK_LIBRARY_CMDS
115 $(QUIET)$(APPEND) $(out).ar-script 'CREATE $(out)'
116 $(QUIET)$(APPEND) -n $(out).ar-script \
117 $(foreach o,$(objs), 'ADDMOD $(o)') \
118 $(foreach o,$(othersrc), 'ADDLIB $(o)')
119 $(QUIET)$(APPEND) $(out).ar-script 'SAVE'
120 $(QUIET)$(APPEND) $(out).ar-script 'END'
121 $(QUIET)$(REDIRECT) -rti $(out).ar-script -- $(VBoxXGccX86RedHatLinux_AR) -M
122endef
123
124VBoxXGccX86RedHatLinux_LINK_PROGRAM_OUTPUT = $(outbase).map
125VBoxXGccX86RedHatLinux_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
126VBoxXGccX86RedHatLinux_LINK_PROGRAM_DEPORD =
127define VBoxXGccX86RedHatLinux_LINK_PROGRAM_CMDS
128 $(QUIET)$(VBoxXGccX86RedHatLinux_LD) $(flags) -o $(out) $(objs) \
129 $(foreach p,$(libpath), -L$(p)) \
130 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) \
131 $(call VBoxXGccX86RedHatLinux_LD_MAP,$(outbase).map)
132endef
133
134VBoxXGccX86RedHatLinux_LINK_DLL_OUTPUT = $(outbase).map
135VBoxXGccX86RedHatLinux_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
136VBoxXGccX86RedHatLinux_LINK_DLL_DEPORD =
137define VBoxXGccX86RedHatLinux_LINK_DLL_CMDS
138 $(QUIET)$(VBoxXGccX86RedHatLinux_LD) $(VBoxXGccX86RedHatLinux_LDFLAGS.dll) $(flags) -o $(out) \
139 $(if $(filter-out win32 os2, $(KBUILD_TARGET)),$(call VBoxXGccX86RedHatLinux_LD_SONAME,$(target),$(out))) \
140 $(objs) \
141 $(foreach p,$(libpath), -L$(p)) \
142 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) \
143 $(call VBoxXGccX86RedHatLinux_LD_MAP,$(outbase).map)
144endef
145
146VBoxXGccX86RedHatLinux_LINK_SYSMOD_OUTPUT = $(outbase).map
147VBoxXGccX86RedHatLinux_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
148VBoxXGccX86RedHatLinux_LINK_SYSMOD_DEPORD =
149define VBoxXGccX86RedHatLinux_LINK_SYSMOD_CMDS
150 $(QUIET)$(VBoxXGccX86RedHatLinux_LD_SYSMOD) $(VBoxXGccX86RedHatLinux_LDFLAGS.sysmod) $(flags) -o $(out) $(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 VBoxXGccX86RedHatLinux_LD_SYSMOD_MAP,$(outbase).map)
154endef
155
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