Ticket #8638: boost_trunk_address_model.2.patch

File boost_trunk_address_model.2.patch, 4.8 KB (added by Valentin Shtronda <valiko.ua@…>, 9 years ago)

Updated patch to rev.86799.

  • 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
     
    193196#  define BOOST_LIB_THREAD_OPT
    194197#endif
    195198
     199//
     200// select runtime opt:
     201//
    196202#if defined(_MSC_VER) || defined(__MWERKS__)
    197203
    198204#  ifdef _DLL
     
    352358#endif
    353359
    354360//
     361// select address model opt:
     362//
     363#if defined(__x86_64__) || defined(__x86_64) \
     364    || defined(__amd64__) || defined(__amd64) \
     365    || defined(_M_X64) || defined(_M_AMD64) \
     366    || defined(_M_IA64)
     367#  define BOOST_LIB_ADDR_OPT "-64"
     368#else
     369#  define BOOST_LIB_ADDR_OPT "-32"
     370#endif
     371
     372//
    355373// select linkage opt:
    356374//
    357375#if (defined(_DLL) || defined(_RTLDLL)) && defined(BOOST_DYN_LINK)
     
    370388      && defined(BOOST_LIB_TOOLSET) \
    371389      && defined(BOOST_LIB_THREAD_OPT) \
    372390      && defined(BOOST_LIB_RT_OPT) \
     391      && defined(BOOST_LIB_ADDR_OPT) \
    373392      && defined(BOOST_LIB_VERSION)
    374393
    375394#ifdef BOOST_AUTO_LINK_TAGGED
    376 #  pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib")
     395#  pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ADDR_OPT ".lib")
    377396#  ifdef BOOST_LIB_DIAGNOSTIC
    378 #     pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib")
     397#     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")
    379398#  endif
    380399#elif defined(BOOST_AUTO_LINK_NOMANGLE)
    381400#  pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
     
    383402#     pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
    384403#  endif
    385404#else
    386 #  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")
     405#  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")
    387406#  ifdef BOOST_LIB_DIAGNOSTIC
    388 #     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")
     407#     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")
    389408#  endif
    390409#endif
    391410
     
    405424#if defined(BOOST_LIB_NAME)
    406425#  undef BOOST_LIB_NAME
    407426#endif
    408 // Don't undef this one: it can be set by the user and should be the 
     427// Don't undef this one: it can be set by the user and should be the
    409428// same for all libraries:
    410429//#if defined(BOOST_LIB_TOOLSET)
    411430//#  undef BOOST_LIB_TOOLSET
     
    416435#if defined(BOOST_LIB_RT_OPT)
    417436#  undef BOOST_LIB_RT_OPT
    418437#endif
     438#if defined(BOOST_LIB_ADDR_OPT)
     439#  undef BOOST_LIB_ADDR_OPT
     440#endif
    419441#if defined(BOOST_LIB_LINK_OPT)
    420442#  undef BOOST_LIB_LINK_OPT
    421443#endif
     
    426448#  undef BOOST_DYN_LINK
    427449#endif
    428450
    429 
  • 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        }