]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/src/tools/vacpp.jam
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / tools / build / src / tools / vacpp.jam
1 # Copyright Vladimir Prus 2004.
2 # Copyright Toon Knapen 2004.
3 # Distributed under the Boost Software License, Version 1.0.
4 # (See accompanying file LICENSE.txt
5 # or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
6
7 #| tag::doc[]
8
9 [[bbv2.reference.tools.compiler.vacpp]]
10 = IBM Visual Age
11
12 The `vacpp` module supports the http://www.ibm.com/software/ad/vacpp[IBM
13 Visual Age] C++ Compiler, for the AIX operating system. Versions 7.1 and
14 8.0 are known to work.
15
16 The module is initialized using the following syntax:
17
18 ----
19 using vacpp ;
20 ----
21
22 The module does not accept any initialization options. The compiler
23 should be installed in the `/usr/vacpp/bin` directory.
24
25 Later versions of Visual Age are known as XL C/C++. They were not tested
26 with the the `vacpp` module.
27
28 |# # end::doc[]
29
30 #
31 # B2 V2 toolset for the IBM XL C++ compiler
32 #
33
34 import toolset : flags ;
35 import feature ;
36 import common ;
37 import generators ;
38 import os ;
39
40 feature.extend toolset : vacpp ;
41 toolset.inherit vacpp : unix ;
42 generators.override vacpp.prebuilt : builtin.prebuilt ;
43 generators.override vacpp.searched-lib-generator : searched-lib-generator ;
44
45 # Configure the vacpp toolset
46 rule init ( version ? : command * : options * )
47 {
48 local condition = [
49 common.check-init-parameters vacpp : version $(version) ] ;
50
51 command = [ common.get-invocation-command vacpp : xlC
52 : $(command) : "/usr/vacpp/bin/xlC" ] ;
53
54 common.handle-options vacpp : $(condition) : $(command) : $(options) ;
55 }
56
57 # Declare generators
58 generators.register-c-compiler vacpp.compile.c : C : OBJ : <toolset>vacpp ;
59 generators.register-c-compiler vacpp.compile.c++ : CPP : OBJ : <toolset>vacpp ;
60
61 # Allow C++ style comments in C files
62 flags vacpp CFLAGS : -qcpluscmt ;
63
64 # Declare flags
65 flags vacpp CFLAGS <optimization>off : -qNOOPTimize ;
66 flags vacpp CFLAGS <optimization>speed : -O3 -qstrict ;
67 flags vacpp CFLAGS <optimization>space : -O2 -qcompact ;
68
69 # Discretionary inlining (not recommended)
70 flags vacpp CFLAGS <inlining>off : -qnoinline ;
71 flags vacpp CFLAGS <inlining>on : -qinline ;
72 #flags vacpp CFLAGS <inlining>full : -qinline ;
73 flags vacpp CFLAGS <inlining>full : ;
74
75 # Exception handling
76 flags vacpp C++FLAGS <exception-handling>off : -qnoeh ;
77 flags vacpp C++FLAGS <exception-handling>on : -qeh ;
78
79 # Run-time Type Identification
80 flags vacpp C++FLAGS <rtti>off : -qnortti ;
81 flags vacpp C++FLAGS <rtti>on : -qrtti ;
82
83 # Enable 64-bit memory addressing model
84 flags vacpp CFLAGS <address-model>64 : -q64 ;
85 flags vacpp LINKFLAGS <address-model>64 : -q64 ;
86 flags vacpp ARFLAGS <target-os>aix/<address-model>64 : -X 64 ;
87
88 # Use absolute path when generating debug information
89 flags vacpp CFLAGS <debug-symbols>on : -g -qfullpath ;
90 flags vacpp LINKFLAGS <debug-symbols>on : -g -qfullpath ;
91 flags vacpp LINKFLAGS <debug-symbols>off : -s ;
92
93 if [ os.name ] = AIX
94 {
95 flags vacpp.compile C++FLAGS : -qfuncsect ;
96
97 # The -bnoipath strips the prepending (relative) path of libraries from
98 # the loader section in the target library or executable. Hence, during
99 # load-time LIBPATH (identical to LD_LIBRARY_PATH) or a hard-coded
100 # -blibpath (*similar* to -lrpath/-lrpath-link) is searched. Without
101 # this option, the prepending (relative) path + library name is
102 # hard-coded in the loader section, causing *only* this path to be
103 # searched during load-time. Note that the AIX linker does not have an
104 # -soname equivalent, this is as close as it gets.
105 #
106 # The above options are definitely for AIX 5.x, and most likely also for
107 # AIX 4.x and AIX 6.x. For details about the AIX linker see:
108 # http://download.boulder.ibm.com/ibmdl/pub/software/dw/aix/es-aix_ll.pdf
109 #
110 flags vacpp.link LINKFLAGS <link>shared : -bnoipath ;
111
112 # Run-time linking
113 flags vacpp.link EXE-LINKFLAGS <link>shared : -brtl ;
114 }
115 else
116 {
117 # Linux PPC
118 flags vacpp.compile CFLAGS <link>shared : -qpic=large ;
119 flags vacpp FINDLIBS : rt ;
120 }
121
122 # Profiling
123 flags vacpp CFLAGS <profiling>on : -pg ;
124 flags vacpp LINKFLAGS <profiling>on : -pg ;
125
126 flags vacpp.compile OPTIONS <cflags> ;
127 flags vacpp.compile.c++ OPTIONS <cxxflags> ;
128 flags vacpp DEFINES <define> ;
129 flags vacpp UNDEFS <undef> ;
130 flags vacpp HDRS <include> ;
131 flags vacpp STDHDRS <sysinclude> ;
132 flags vacpp.link OPTIONS <linkflags> ;
133 flags vacpp ARFLAGS <arflags> ;
134
135 flags vacpp LIBPATH <library-path> ;
136 flags vacpp NEEDLIBS <library-file> ;
137 flags vacpp FINDLIBS <find-shared-library> ;
138 flags vacpp FINDLIBS <find-static-library> ;
139
140 # Select the compiler name according to the threading model.
141 flags vacpp VA_C_COMPILER <threading>single : xlc ;
142 flags vacpp VA_C_COMPILER <threading>multi : xlc_r ;
143 flags vacpp VA_CXX_COMPILER <threading>single : xlC ;
144 flags vacpp VA_CXX_COMPILER <threading>multi : xlC_r ;
145
146 SPACE = " " ;
147
148 flags vacpp.link.dll HAVE_SONAME <target-os>linux : "" ;
149
150 actions vacpp.link bind NEEDLIBS
151 {
152 $(VA_CXX_COMPILER) $(EXE-LINKFLAGS) $(LINKFLAGS) -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) $(OPTIONS) $(USER_OPTIONS)
153 }
154
155 actions vacpp.link.dll bind NEEDLIBS
156 {
157 xlC_r -G $(LINKFLAGS) -o "$(<[1])" $(HAVE_SONAME)-Wl,-soname$(SPACE)-Wl,$(<[-1]:D=) -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) $(OPTIONS) $(USER_OPTIONS)
158 }
159
160 actions vacpp.compile.c
161 {
162 $(VA_C_COMPILER) -c $(OPTIONS) $(USER_OPTIONS) -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
163 }
164
165 actions vacpp.compile.c++
166 {
167 $(VA_CXX_COMPILER) -c $(OPTIONS) $(USER_OPTIONS) -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
168 }
169
170 actions updated together piecemeal vacpp.archive
171 {
172 ar $(ARFLAGS) ru "$(<)" "$(>)"
173 }