]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/src/tools/intel-vxworks.jam
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / tools / build / src / tools / intel-vxworks.jam
1 # Copyright Wind River 2017.
2 # Distributed under the Boost Software License, Version 1.0.
3 # (See accompanying file LICENSE_1_0.txt
4 # or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6 import intel ;
7 import feature : feature ;
8 import os ;
9 import toolset ;
10 import toolset : flags ;
11 import gcc ;
12 import common ;
13 import errors ;
14 import generators ;
15
16 feature.extend-subfeature toolset intel : platform : vxworks ;
17
18 toolset.inherit-generators intel-vxworks
19 <toolset>intel <toolset-intel:platform>vxworks
20 : gcc
21 # Don't inherit PCH generators. They were not tested, and probably
22 # don't work for this compiler.
23 : gcc.mingw.link gcc.mingw.link.dll gcc.compile.c.pch gcc.compile.c++.pch
24 ;
25
26 generators.override intel-vxworks.prebuilt : builtin.lib-generator ;
27 generators.override intel-vxworks.prebuilt : builtin.prebuilt ;
28 generators.override intel-vxworks.searched-lib-generator : searched-lib-generator ;
29
30 toolset.inherit-rules intel-vxworks : gcc ;
31 toolset.inherit-flags intel-vxworks : gcc
32 : <inlining>off <inlining>on <inlining>full <optimization>space
33 <warnings>off <warnings>all <warnings>on
34 <architecture>x86/<address-model>32
35 <architecture>x86/<address-model>64
36 ;
37
38 if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
39 {
40 .debug-configuration = true ;
41 }
42
43 # Initializes the intel-vxworks toolset
44 # version in mandatory
45 # name (default icc) is used to invoke the specified intel compiler
46 # compile and link options allow you to specify addition command line options for each version
47 rule init ( version ? : command * : options * )
48 {
49 local condition = [ common.check-init-parameters intel-vxworks
50 : version $(version) ] ;
51
52 command = [ common.get-invocation-command intel-vxworks : icc
53 : $(command) : /opt/intel_cc_80/bin ] ;
54
55 common.handle-options intel-vxworks : $(condition) : $(command) : $(options) ;
56
57 # handle <library-path>
58 # local library-path = [ feature.get-values <library-path> : $(options) ] ;
59 # flags intel-vxworks.link USER_OPTIONS $(condition) : [ feature.get-values <dll-path> : $(options) ] ;
60
61 local root = [ feature.get-values <root> : $(options) ] ;
62 local bin ;
63 if $(command) || $(root)
64 {
65 bin ?= [ common.get-absolute-tool-path $(command[-1]) ] ;
66 root ?= $(bin:D) ;
67
68 if $(root)
69 {
70 # Libraries required to run the executable may be in either
71 # $(root)/lib (10.1 and earlier)
72 # or
73 # $(root)/lib/architecture-name (11.0 and later:
74 local lib_path = $(root)/lib $(root:P)/lib/$(bin:B) ;
75 if $(.debug-configuration)
76 {
77 ECHO notice\: using intel libraries "::" $(condition) "::" $(lib_path) ;
78 }
79 flags intel-vxworks.link RUN_PATH $(condition) : $(lib_path) ;
80 }
81 }
82
83 local m = [ MATCH (..).* : $(version) ] ;
84 local n = [ MATCH (.)\\. : $(m) ] ;
85 if $(n) {
86 m = $(n) ;
87 }
88
89 local major = $(m) ;
90
91
92 flags intel-vxworks.compile OPTIONS $(condition)/<inlining>off : -inline-level=0 ;
93 flags intel-vxworks.compile OPTIONS $(condition)/<inlining>on : -inline-level=1 ;
94 flags intel-vxworks.compile OPTIONS $(condition)/<inlining>full : -inline-level=2 ;
95
96 flags intel-vxworks.link OPTIONS $(condition)/<runtime-link>static : [ os.environ LDFLAGS_STATIC ] ;
97 flags intel-vxworks.link OPTIONS $(condition)/<runtime-link>shared : [ os.environ LDFLAGS_DYNAMIC ] ;
98 flags intel-vxworks.compile OPTIONS $(condition)/<link>shared : -fPIC ;
99
100 local minor = [ MATCH ".*\\.(.).*" : $(version) ] ;
101
102
103 }
104
105 SPACE = " " ;
106
107 flags intel-vxworks.compile OPTIONS <cflags> ;
108 flags intel-vxworks.compile.c++ OPTIONS <cxxflags> ;
109 flags intel-vxworks.compile INCLUDES <include> ;
110
111
112 .cpu-type-em64t = prescott nocona core2 corei7 corei7-avx core-avx-i
113 conroe conroe-xe conroe-l allendale merom
114 merom-xe kentsfield kentsfield-xe penryn wolfdale
115 yorksfield nehalem sandy-bridge ivy-bridge haswell ;
116 .cpu-type-amd64 = k8 opteron athlon64 athlon-fx k8-sse3 opteron-sse3
117 athlon64-sse3 amdfam10 barcelona bdver1 bdver2 bdver3 btver1 btver2 ;
118 .cpu-type-x86-64 = $(.cpu-type-em64t) $(.cpu-type-amd64) ;
119
120 #flags intel-vxworks.compile OPTIONS <instruction-set>$(.cpu-type-x86-64)/<address-model>32 : -m32 ; # -mcmodel=small ;
121 #flags intel-vxworks.compile OPTIONS <instruction-set>$(.cpu-type-x86-64)/<address-model>64 : -m64 ; # -mcmodel=large ;
122
123 flags intel-vxworks.compile.c OPTIONS <warnings>off : -w0 ;
124 flags intel-vxworks.compile.c OPTIONS <warnings>on : -w1 ;
125 flags intel-vxworks.compile.c OPTIONS <warnings>all : -w2 ;
126
127 flags intel-vxworks.compile.c++ OPTIONS <warnings>off : -w0 ;
128 flags intel-vxworks.compile.c++ OPTIONS <warnings>on : -w1 ;
129 flags intel-vxworks.compile.c++ OPTIONS <warnings>all : -w2 ;
130
131 actions compile.c
132 {
133 "$(CONFIG_COMMAND)" -xc $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
134 }
135
136 actions compile.c++
137 {
138 "$(CONFIG_COMMAND)" -xc++ $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
139 }
140
141 flags intel-vxworks ARFLAGS <archiveflags> ;
142
143 .AR = ar ;
144
145 rule archive ( targets * : sources * : properties * )
146 {
147 # Always remove archive and start again.
148 # of the archive.
149 #
150 local clean.a = $(targets[1])(clean) ;
151 TEMPORARY $(clean.a) ;
152 NOCARE $(clean.a) ;
153 LOCATE on $(clean.a) = [ on $(targets[1]) return $(LOCATE) ] ;
154 DEPENDS $(clean.a) : $(sources) ;
155 DEPENDS $(targets) : $(clean.a) ;
156 common.RmTemps $(clean.a) : $(targets) ;
157 }
158
159 actions piecemeal archive
160 {
161 "$(.AR)" $(AROPTIONS) rc "$(<)" "$(>)"
162 }
163
164 flags intel-vxworks.link USER_OPTIONS <linkflags> ;
165
166 # Declare actions for linking
167 rule link ( targets * : sources * : properties * )
168 {
169 SPACE on $(targets) = " " ;
170 # Serialize execution of the 'link' action, since
171 # running N links in parallel is just slower.
172 JAM_SEMAPHORE on $(targets) = <s>intel-vxworks-link-semaphore ;
173 }
174
175 actions link bind LIBRARIES
176 {
177 "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS)
178 }
179
180 actions link.dll bind LIBRARIES
181 {
182 "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS)
183 }