Ticket #583: tools-build-v2-tools-vacpp_jam.patch

File tools-build-v2-tools-vacpp_jam.patch, 4.7 KB (added by Thomas Witt, 15 years ago)
  • tools/build/v2/tools/vacpp.jam

    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  
    55# or copy at http://www.boost.org/LICENSE_1_0.txt)
    66
    77#
    8 # Boost.Build V2 toolset for the IBM VisualAge compiler
     8# Boost.Build V2 toolset for the IBM XL C++ compiler
    99#
    1010
    1111import toolset : flags ;
    1212import feature ;
    1313import common ;
    1414import generators ;
     15import os ;
    1516
    1617feature.extend toolset : vacpp ;
    1718toolset.inherit vacpp : unix ;
     
    1920generators.override vacpp.searched-lib-generator : searched-lib-generator ;
    2021feature.subfeature toolset vacpp : version ;
    2122
    22 # Configures the vacpp toolset.
     23# Configure the vacpp toolset
    2324rule init ( version ? : command * : options * )
    2425{
    2526}
    2627
    27 
    2828# Declare generators
    2929generators.register-c-compiler vacpp.compile.c : C : OBJ : <toolset>vacpp ;
    3030generators.register-c-compiler vacpp.compile.c++ : CPP : OBJ : <toolset>vacpp ;
    3131
    32 # Declare flags.
     32# Allow C++ style comments in C files
     33flags vacpp CFLAGS : -qcpluscmt ;
     34
     35# Declare flags
    3336flags vacpp CFLAGS <optimization>off : -qNOOPTimize ;
    3437flags vacpp CFLAGS <optimization>speed : -O3 -qstrict ;
    3538flags vacpp CFLAGS <optimization>space : -O2 -qcompact ;
    3639
     40# Discretionary inlining (not recommended)
    3741flags vacpp CFLAGS <inlining>off : -qnoinline ;
    3842flags vacpp CFLAGS <inlining>on : -qinline ;
    39 flags vacpp CFLAGS <inlining>full : -qinline ;
     43#flags vacpp CFLAGS <inlining>full : -qinline ;
     44flags vacpp CFLAGS <inlining>full : ;
    4045
     46# Exception handling
    4147flags vacpp C++FLAGS <exception-handling>off : -qnoeh ;
    4248flags vacpp C++FLAGS <exception-handling>on : -qeh ;
    4349
     50# Run-time Type Identification
    4451flags vacpp C++FLAGS <rtti>off : -qnortti ;
    4552flags vacpp C++FLAGS <rtti>on : -qrtti ;
    4653
    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
     55flags vacpp CFLAGS <address-model>64 : -q64 ;
     56flags vacpp LINKFLAGS <address-model>64 : -q64 ;
     57flags vacpp ARFLAGS <address-model>64 : -X 64 ;
     58
     59# Use absolute path when generating debug information
     60flags vacpp CFLAGS <debug-symbols>on : -g -qfullpath ;
     61flags vacpp LINKFLAGS <debug-symbols>on : -g -qfullpath ;
    5462flags vacpp LINKFLAGS <debug-symbols>off : -s ;
    5563
    56 # V2 does not have <shared-linkable>, not sure what this meant in V1.
    57 #flags vacpp CFLAGS <shared-linkable>true : +Z ;
     64if [ 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}
     75else
     76{
     77    # Linux PPC
     78    flags vacpp.compile CFLAGS <link>shared : -qpic ;
     79}
    5880
     81# Profiling
    5982flags vacpp CFLAGS <profiling>on : -pg ;
    6083flags vacpp LINKFLAGS <profiling>on : -pg ;
    6184
     
    79102flags vacpp VA_CXX_COMPILER <threading>single : xlC   ;
    80103flags vacpp VA_CXX_COMPILER <threading>multi : xlC_r ;
    81104
    82 ROOT = /usr/vacpp/bin ;
     105
    83106actions vacpp.link bind NEEDLIBS
    84107{
    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)
    86109}
    87110
    88111actions vacpp.link.dll bind NEEDLIBS
    89112{
    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)
    91114}
    92115
    93116actions 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 "$(<)" "$(>)"
    96119}
    97120
    98121actions vacpp.compile.c++
    99122{
    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 "$(<)" "$(>)"
    101124}
    102125
    103126actions updated together piecemeal vacpp.archive