diff -ru boost_1_34_0/tools/build/v2/tools/vacpp.jam boost_1_34_0_ibm/tools/build/v2/tools/vacpp.jam
old
|
new
|
|
5 | 5 | # or copy at http://www.boost.org/LICENSE_1_0.txt) |
6 | 6 | |
7 | 7 | # |
8 | | # Boost.Build V2 toolset for the IBM VisualAge compiler |
| 8 | # Boost.Build V2 toolset for the IBM XL C++ compiler |
9 | 9 | # |
10 | 10 | |
11 | 11 | import toolset : flags ; |
12 | 12 | import feature ; |
13 | 13 | import common ; |
14 | 14 | import generators ; |
| 15 | import os ; |
15 | 16 | |
16 | 17 | feature.extend toolset : vacpp ; |
17 | 18 | toolset.inherit vacpp : unix ; |
… |
… |
|
19 | 20 | generators.override vacpp.searched-lib-generator : searched-lib-generator ; |
20 | 21 | feature.subfeature toolset vacpp : version ; |
21 | 22 | |
22 | | # Configures the vacpp toolset. |
| 23 | # Configure the vacpp toolset |
23 | 24 | rule init ( version ? : command * : options * ) |
24 | 25 | { |
25 | 26 | } |
26 | 27 | |
27 | | |
28 | 28 | # Declare generators |
29 | 29 | generators.register-c-compiler vacpp.compile.c : C : OBJ : <toolset>vacpp ; |
30 | 30 | generators.register-c-compiler vacpp.compile.c++ : CPP : OBJ : <toolset>vacpp ; |
31 | 31 | |
32 | | # Declare flags. |
| 32 | # Allow C++ style comments in C files |
| 33 | flags vacpp CFLAGS : -qcpluscmt ; |
| 34 | |
| 35 | # Declare flags |
33 | 36 | flags vacpp CFLAGS <optimization>off : -qNOOPTimize ; |
34 | 37 | flags vacpp CFLAGS <optimization>speed : -O3 -qstrict ; |
35 | 38 | flags vacpp CFLAGS <optimization>space : -O2 -qcompact ; |
36 | 39 | |
| 40 | # Discretionary inlining (not recommended) |
37 | 41 | flags vacpp CFLAGS <inlining>off : -qnoinline ; |
38 | 42 | flags vacpp CFLAGS <inlining>on : -qinline ; |
39 | | flags vacpp CFLAGS <inlining>full : -qinline ; |
| 43 | #flags vacpp CFLAGS <inlining>full : -qinline ; |
| 44 | flags vacpp CFLAGS <inlining>full : ; |
40 | 45 | |
| 46 | # Exception handling |
41 | 47 | flags vacpp C++FLAGS <exception-handling>off : -qnoeh ; |
42 | 48 | flags vacpp C++FLAGS <exception-handling>on : -qeh ; |
43 | 49 | |
| 50 | # Run-time Type Identification |
44 | 51 | flags vacpp C++FLAGS <rtti>off : -qnortti ; |
45 | 52 | flags vacpp C++FLAGS <rtti>on : -qrtti ; |
46 | 53 | |
47 | | # flags vacpp LINKFLAGS <runtime-link>static : -llibstd_v2.a ; |
48 | | # flags vacpp LINKFLAGS <runtime-link>shared : -llibstd_v2.sl ; |
49 | | |
50 | | # We want the full path to the sources in the debug symbols because otherwise |
51 | | # the debugger won't find the sources when we use boost.build. |
52 | | flags vacpp CFLAGS <debug-symbols>on : -g ; |
53 | | flags vacpp LINKFLAGS <debug-symbols>on : -g ; |
| 54 | # Enable 64-bit memory addressing model |
| 55 | flags vacpp CFLAGS <address-model>64 : -q64 ; |
| 56 | flags vacpp LINKFLAGS <address-model>64 : -q64 ; |
| 57 | flags vacpp ARFLAGS <address-model>64 : -X 64 ; |
| 58 | |
| 59 | # Use absolute path when generating debug information |
| 60 | flags vacpp CFLAGS <debug-symbols>on : -g -qfullpath ; |
| 61 | flags vacpp LINKFLAGS <debug-symbols>on : -g -qfullpath ; |
54 | 62 | flags vacpp LINKFLAGS <debug-symbols>off : -s ; |
55 | 63 | |
56 | | # V2 does not have <shared-linkable>, not sure what this meant in V1. |
57 | | #flags vacpp CFLAGS <shared-linkable>true : +Z ; |
| 64 | if [ os.name ] = AIX |
| 65 | { |
| 66 | # Tell the linker to discard unneeded object files from archive libraries. |
| 67 | # Please note that the static constructors contained by the discarded object |
| 68 | # files will not be invoked. |
| 69 | flags vacpp.compile C++FLAGS : -qfuncsect ; |
| 70 | flags vacpp.link LINKFLAGS <link>static : -qtwolink ; |
| 71 | |
| 72 | # Run-time linking |
| 73 | flags vacpp.link EXE-LINKFLAGS <link>shared : -brtl ; |
| 74 | } |
| 75 | else |
| 76 | { |
| 77 | # Linux PPC |
| 78 | flags vacpp.compile CFLAGS <link>shared : -qpic ; |
| 79 | } |
58 | 80 | |
| 81 | # Profiling |
59 | 82 | flags vacpp CFLAGS <profiling>on : -pg ; |
60 | 83 | flags vacpp LINKFLAGS <profiling>on : -pg ; |
61 | 84 | |
… |
… |
|
79 | 102 | flags vacpp VA_CXX_COMPILER <threading>single : xlC ; |
80 | 103 | flags vacpp VA_CXX_COMPILER <threading>multi : xlC_r ; |
81 | 104 | |
82 | | ROOT = /usr/vacpp/bin ; |
| 105 | |
83 | 106 | actions vacpp.link bind NEEDLIBS |
84 | 107 | { |
85 | | $(ROOT)/$(VA_CXX_COMPILER) $(LINKFLAGS) -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) |
| 108 | $(VA_CXX_COMPILER) $(EXE-LINKFLAGS) $(LINKFLAGS) -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) |
86 | 109 | } |
87 | 110 | |
88 | 111 | actions vacpp.link.dll bind NEEDLIBS |
89 | 112 | { |
90 | | xlC_r -qmkshrobj $(LINKFLAGS) -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) |
| 113 | xlC_r -G $(LINKFLAGS) -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) |
91 | 114 | } |
92 | 115 | |
93 | 116 | actions vacpp.compile.c |
94 | | { |
95 | | $(ROOT)/$(VA_C_COMPILER) -c -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" |
| 117 | { |
| 118 | $(VA_C_COMPILER) -c -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" |
96 | 119 | } |
97 | 120 | |
98 | 121 | actions vacpp.compile.c++ |
99 | 122 | { |
100 | | $(ROOT)/$(VA_CXX_COMPILER) -c -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" |
| 123 | $(VA_CXX_COMPILER) -c -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" |
101 | 124 | } |
102 | 125 | |
103 | 126 | actions updated together piecemeal vacpp.archive |