Ticket #8638: boost_trunk_address_model.patch

File boost_trunk_address_model.patch, 4.8 KB (added by Valentin Shtronda <valiko.ua@…>, 9 years ago)
  • boost/config/auto_link.hpp

     
    1515USAGE:
    1616~~~~~~
    1717
    18 Before including this header you must define one or more of define the following macros:
     18Before including this header you must define one or more of the following macros:
    1919
    2020BOOST_LIB_NAME:           Required: A string containing the basename of the library,
    2121                          for example boost_regex.
     
    4141
    4242BOOST_LIB_PREFIX
    4343   + BOOST_LIB_NAME
    44    + "_"
     44   + "-"
    4545   + BOOST_LIB_TOOLSET
    4646   + BOOST_LIB_THREAD_OPT
    4747   + BOOST_LIB_RT_OPT
     48   + BOOST_LIB_ADDR_OPT
    4849   "-"
    4950   + BOOST_LIB_VERSION
    5051
     
    6970                      p      STLport build.
    7071                      n      STLport build without its IOStreams.
    7172
     73BOOST_LIB_ADDR_OPT:   The address model: "-32" or "-64".
     74
    7275BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
    7376
    7477
     
    188191#  define BOOST_LIB_THREAD_OPT
    189192#endif
    190193
     194//
     195// select runtime opt:
     196//
    191197#if defined(_MSC_VER) || defined(__MWERKS__)
    192198
    193199#  ifdef _DLL
     
    347353#endif
    348354
    349355//
     356// select address model opt:
     357//
     358#if defined(__x86_64__) || defined(__x86_64) \
     359    || defined(__amd64__) || defined(__amd64) \
     360    || defined(_M_X64) || defined(_M_AMD64) \
     361    || defined(_M_IA64)
     362#  define BOOST_LIB_ADDR_OPT "-64"
     363#else
     364#  define BOOST_LIB_ADDR_OPT "-32"
     365#endif
     366
     367//
    350368// select linkage opt:
    351369//
    352370#if (defined(_DLL) || defined(_RTLDLL)) && defined(BOOST_DYN_LINK)
     
    365383      && defined(BOOST_LIB_TOOLSET) \
    366384      && defined(BOOST_LIB_THREAD_OPT) \
    367385      && defined(BOOST_LIB_RT_OPT) \
     386      && defined(BOOST_LIB_ADDR_OPT) \
    368387      && defined(BOOST_LIB_VERSION)
    369388
    370389#ifdef BOOST_AUTO_LINK_TAGGED
    371 #  pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib")
     390#  pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ADDR_OPT ".lib")
    372391#  ifdef BOOST_LIB_DIAGNOSTIC
    373 #     pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib")
     392#     pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ADDR_OPT ".lib")
    374393#  endif
    375394#elif defined(BOOST_AUTO_LINK_NOMANGLE)
    376395#  pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
     
    378397#     pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
    379398#  endif
    380399#else
    381 #  pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
     400#  pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ADDR_OPT "-" BOOST_LIB_VERSION ".lib")
    382401#  ifdef BOOST_LIB_DIAGNOSTIC
    383 #     pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
     402#     pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ADDR_OPT "-" BOOST_LIB_VERSION ".lib")
    384403#  endif
    385404#endif
    386405
     
    400419#if defined(BOOST_LIB_NAME)
    401420#  undef BOOST_LIB_NAME
    402421#endif
    403 // Don't undef this one: it can be set by the user and should be the 
     422// Don't undef this one: it can be set by the user and should be the
    404423// same for all libraries:
    405424//#if defined(BOOST_LIB_TOOLSET)
    406425//#  undef BOOST_LIB_TOOLSET
     
    411430#if defined(BOOST_LIB_RT_OPT)
    412431#  undef BOOST_LIB_RT_OPT
    413432#endif
     433#if defined(BOOST_LIB_ADDR_OPT)
     434#  undef BOOST_LIB_ADDR_OPT
     435#endif
    414436#if defined(BOOST_LIB_LINK_OPT)
    415437#  undef BOOST_LIB_LINK_OPT
    416438#endif
  • boostcpp.jam

     
    122122        if $(layout) = versioned
    123123        {
    124124            result = [ common.format-name
    125                 <base> <toolset> <threading> <runtime> -$(BOOST_VERSION_TAG)
     125                <base> <toolset> <threading> <runtime> <address-model> -$(BOOST_VERSION_TAG)
    126126                -$(BUILD_ID)
    127127                : $(name) : $(type) : $(property-set) ] ;
    128128        }
    129129        else if $(layout) = tagged
    130130        {
    131131            result = [ common.format-name
    132                 <base> <threading> <runtime>
     132                <base> <threading> <runtime> <address-model>
    133133                -$(BUILD_ID)
    134134                : $(name) : $(type) : $(property-set) ] ;
    135135        }